Skip to content
This repository has been archived by the owner on Sep 27, 2021. It is now read-only.

lovelysystems/loopback-connector-crateio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

loopback-connector-crateio

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

Installation

npm install loopback-connector-crateio --save

Basic use

To use it you need loopback-datasource-juggler.

  1. Setup dependencies in package.json:
{
  ...
  "dependencies": {
    "loopback-datasource-juggler": "latest",
    "loopback-connector-crateio": "latest"
  },
  ...
}
  1. Use:
var DataSource = require('loopback-datasource-juggler').DataSource;
var dataSource = new DataSource('crateio', {
  host: 'localhost',
  port: 4200
});

Crate Features

Models can be defined with object properties:

var ModelWithSchemaObject = db.define('ModelWithSchemaObject', {
  o: {
    type: Object,
    policy: 'STRICT',
    schema: 'ObjectModel'
  }
});

Limitations

alterTable can only add/create new properties.

It is not possible to create indices.

Testing

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)"

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •