Please note that this package is in a very early state and is experimental.
loopback-connector-crate
is the Crate connector module for loopback-datasource-juggler.
It is derived from the mysql implementation at loopback-connector-mysql
npm install loopback-connector-crateio --save
To use it you need loopback-datasource-juggler
.
- Setup dependencies in
package.json
:
{
...
"dependencies": {
"loopback-datasource-juggler": "latest",
"loopback-connector-crateio": "latest"
},
...
}
- Use:
var DataSource = require('loopback-datasource-juggler').DataSource;
var dataSource = new DataSource('crateio', {
host: 'localhost',
port: 4200
});
Models can be defined with object properties:
var ModelWithSchemaObject = db.define('ModelWithSchemaObject', {
o: {
type: Object,
policy: 'STRICT',
schema: 'ObjectModel'
}
});
alterTable can only add/create new properties.
It is not possible to create indices.
To run tests a instance crate must be running on port 4200.
Simplest way to install and run crate:
bash -c "$(curl -L try.crate.io)"