
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Functional toolkit for rethinkdb.
Currently, Compitable with rethinkdb 2.2.x
id
, createdAt
, updatedAt
.npm install -S nothinkdb
import Joi from 'joi';
import r from 'rethinkdb';
import { Table, schema } from 'nothinkdb';
const userTable = new Table({
tableName: 'user',
schema: () => ({
id: schema.id,
name: Joi.string().required(),
isPremium: Joi.boolean().default(false),
}),
});
async function run() {
// open rethinkdb connection
const connection = await r.connect({ db: 'test' });
// sync table
await userTable.sync(connection);
await followingTable.sync(connection);
// create user data
const normalUser = userTable.create({ name: 'user1' });
const premiumUser = userTable.create({ name: 'user2', isPremium: true });
// insert user data into rethinkdb server
await userTable.insert([
normalUser,
premiumUser,
]).run(connection);
// getAll users
const users = await userTable.query().coerceTo('array').run(connection);
console.log(users);
// close rethinkdb connection
await connection.close();
}
run();
If you want to see more examples, See the Examples
See the API Reference.
FAQs
Functional toolkit for rethinkdb
We found that nothinkdb 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.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.