1.2.0 • Published 7 years ago
reql-schema v1.2.0
ReQL Schema
Query RethinkDB with (a subset of) JSON Schema.
Installation
Install reql-schema by running:
npm install --save reql-schemaDocumentation
const rethinkdb = require('rethinkdb')
const reqlSchema = require('reql-schema')
const connection = await rethinkdb.connect({ ... })
const cursor = await reqlSchema('myDb', 'myTable', {
type: 'object',
required: [ 'foo' ],
properties: {
foo: {
type: 'string'
}
}
}).run(connection)
const array = await cursor.toArray()
console.log(array)The following JSON Schema properties have been implemented:
typeconstpatternformat(supportsuuid,email, anddate-time)minimummaximumenumcontainsallOfanyOfnot
Tests
Run the following command:
npm testContribute
- Issue Tracker: github.com/resin-io-modules/reql-schema/issues
- Source Code: github.com/resin-io-modules/reql-schema
Before submitting a PR, please make sure that you include tests, and that the linter runs without any warning:
npm run lintSupport
If you're having any problem, please raise an issue on GitHub.
License
This project is free software, and may be redistributed under the terms specified in the license.