0.0.3 • Published 8 years ago
hi-db v0.0.3
Hi DB
HiDB is nodejs database based on Leveldb
API
- new HiDB(location, options)
- HiDB.prototype.create(table_name, config)
- config = {"primaryKey" : "", "requiredKeys" : [], "uniqueKeys" : [], "indexKeys" : []}
- HiDB.prototype.select(table_name) return a Table Object
- HiDB.prototype.drop(table_name)
- HiDB.prototype.tables
- HiDB.prototype.create(table_name, config)
- Table Object
- Table.name
- Table.prototype.count()
- Table.prototype.insert(data, ...)
- Table.prototype.inserts(datas)
- Table.prototype.query(pattern, offset, limit) return a Query Result
- pattern = "date = '2017-10-06' && value > 10 && value < 10"
- Table.prototype.truncate()
- Table.prototype.getIterator(offset, limit)
- Table.prototype.getDataByID(id)
- Table Query Result
- Result.prototype.length
- Result.prototype.IDs
- Result.prototype.get(id)
- Result.prototype.toList()
- Result.prototype.forEach(callback)
- Result.prototype.delete()
- Result.prototype.update(data | callback)
- Result.prototype.modify(data | callback)