orientdb-schema

0.0.2 • Public • Published

orientdb-schema

Deploys a schema to an OrientDB database.

Usage:

const schemaMaker = require('orientdb-schema');
const { ODatabase } = require('orientjs');

const db = new ODatabase(...);

const plan = schemaMaker(db, [
  {
    "name": "Player",
    "superClass": "V",
    "properties": [
      { "name": "name", "type": "String" },
      ...
    ],
    "indexes": [
      { "name": "Player.name", "type": "unique", properties: ["name"] }
    ]
  },
  ...
]);

console.log(plan.explain());

plan.execute().then(() => {
  console.log("Done!");
  db.close();
});

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.2
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.2
    1
  • 0.0.1
    0

Package Sidebar

Install

npm i orientdb-schema

Weekly Downloads

1

Version

0.0.2

License

ISC

Last publish

Collaborators

  • alancnet