@rulodb/rulodb
v0.0.7
Published
Typescript SDK for RuloDB
Readme
RuloDB TypeScript SDK
A strongly-typed TypeScript client for RuloDB with a fluent query builder API similar to RethinkDB.
Installation
npm install @rulodb/rulodbQuick Start
import { RuloDB, r } from '@rulodb/rulodb';
// Create and connect to RuloDB
const client = new RuloDB({
host: 'localhost',
port: 6090,
timeout: 30000
});
await client.connect();
// Insert a document
await r
.table('users')
.insert({
name: 'John Doe',
email: '[email protected]',
age: 30
})
.run(client);
// Query documents
const users = await r.table('users')
.filter({ active: true })
.orderBy('name')
.limit(10)
.run(client);
// Collect cursor and display users
console.table(await users.toArray());
await client.disconnect();Contributing
See CONTRIBUTING.md for development setup and contribution guidelines.
License
This project is licensed under the Apache 2.0 License - see the LICENSE file for details.
