0.0.3 • Published 8 years ago

hi-db v0.0.3

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

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
  • 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)
0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago