
Security News
ECMAScript 2025 Finalized with Iterator Helpers, Set Methods, RegExp.escape, and More
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Hoaxdb is a simple implementation of a database written in 100% pure ruby. It offers an interface to insert,update,query and delete records like any other databse but does not offer complex features of a database. You set specific data types for your fields and you can also have default values on top of that it validates the records you enter. In terms of queries you can choose specific fields, limits and also sort according to a specific field which can be ascending or descending. Queries are written using ruby hence no external knowledge is needed.
Add this line to your application's Gemfile:
gem 'hoaxdb'
And then execute:
$ bundle
Or install it yourself as:
$ gem install hoaxdb
Using the hoaxdb is very simple once you have installed it, the following are the basics:
require 'hoaxdb'
db = Hoaxdb.new('products.db') #This reads an existing database or creates a database
db.create_table("products",{
"name"=>{"type"=>"String","default"=>""}, #setting default prevents nil values
"price"=>{"type"=>"Float","default"=>0.0}
})
products.insert({"name"=>"Iphone","price"=>100.67}) #insert a record
products.update('this["name"].eql? "Iphone"',{"quantity"=>200})
products.select_if('this["name"].eql? "Iphone"')
products.del_if('this["name"].eql? "Iphone"')
More information is available via rdoc when the gem is installed
Bug reports and pull requests are welcome on GitHub at https://github.com/njaneambrose/hoaxdb.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that hoaxdb demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.