Skip to content

Releases: appscot/sails-orientdb

OrientJS

07 Jul 23:07
Compare
Choose a tag to compare

Replace oriento for orientjs #124

RIP Oriento

07 Jul 23:00
Compare
Choose a tag to compare

This release is aimed at those still using Oriento and adds fixes that were awaiting in master, namely:

  • fix error on edge creation: #116
  • test for Undefined query parameters generated when populating optional one-way associations #131
  • update dependencies

Bug in `join` and a performance improvement

03 Jun 19:33
Compare
Choose a tag to compare
  • When expanding results (in joins) make sure to only cache RIDs #110
  • Make matchRecordId() quicker #111

Increment

02 Jun 10:36
Compare
Choose a tag to compare

Adds custom method .increment() #109

.increment (criteria, field[, amount][, cb])

Increments the given field by amount (defaults to 1). This can be used to generate sequencial numbers, more about this in OrientDB docs.

usage:

  // Given a model Counter with attributes `name` and `value`
  Counter.increment({ name: 'counter1' }, 'value', function (err, counter) {
    console.log('counter1 has increased by 1 to:', counter.value);
  });

  // To decrement use negative numbers
  Counter.increment({ name: 'counter1' }, 'value', -2)
  .then(function (counter) {
    console.log('counter1 haas decreased by 2 to:', counter.value);
  });

Schemaless, connection pool, and promises

01 Jun 09:55
Compare
Choose a tag to compare
  • Full support for schemaless mode (passes all waterline integration tests) #85;
  • .query(), .createEdge() and .deleteEdges() return promises: #97;
  • Adds support for connection pooling #92;
  • Explicitly implement the new waterline SQL interface;
  • Support for DB only credentials (thanks @matanshukry!) #86;
  • Bug fix: delete vertex with custom PK #105;
  • Allows sails-orientdb to be initialised without model definitions: #90;
  • Adds mores tests (#81, #82).

NOTE: This was meant to be v0.10.51 but I had to bump it up due to https://github.com/npm/npm-www/issues/537

sails-orientdb

26 Mar 20:38
Compare
Choose a tag to compare

waterline-orientdb is dead, long live sails-orientdb

In the interest of the community Srinath, Gaurav and Dário are combining their efforts in a single Waterline/Sails OrientDB adapter. We've decided to name it after the original adapter: sails-orientdb hence these changes. More about this in the history section.

This release doesn't have any real code changes, it was mostly about renaming waterline-orientdb to sails-orientdb and making the appropriate config changes.

It seems that the old gitter room vanished, our apologies for that.

Better Index Support

24 Mar 20:10
Compare
Choose a tag to compare
  • Add support for all SB-Tree and Hash indexes: #68, example:

      indexFulltext : {
        type : 'string',
        index : 'fulltext'
      },
  • Bug fix: Exception was thrown when using decodeURIComponent with criteria modifiers: #67;

  • Added a couple of tests: 7ddb7a2 and aede793.

runFunction() and performance improvements

11 Mar 17:50
Compare
Choose a tag to compare
  • Adds runFunction method to adapter;
  • native(), getDB(), getServer() and removeCircularReferences() are now synced. The async calls with callback will still be supported for backwards compatibility but are no longer the preferred way of using these methods;
  • Performance: define() will now create properties at once instead of one by one. Added a quicker unsafeDrop option;
  • Added examples and tests;
  • Exposes Oriento logger config to adapter;
  • Performance: replaced decodeURIComponent for string.replace as it's around 25% faster.

The big refactor ("2.0")

26 Feb 18:54
Compare
Choose a tag to compare

Changes

  • Many-to-many join tables are now edges (#29)
  • Make code simpler by alleviating connection.js and creating a new class Collection. Collection itself can be a Document, Edge or Vertex. This makes it simpler to segregate class logic and to extend behaviour.
  • Support Syncable
  • Support interface "migratable"
  • Improve code coverage
  • Add more tests
  • Move all default configs to adapter
  • Add support to document databases (in addition to graph dbs)
  • orientdbClass: ability to force a model to be a given class
  • decodeURIComponent config, when enabled id is decoded (makes it sails/blueprints friendly)
  • support schemaless: actually pay attention to the schema flag to avoid the need for hacks like this.

Notes

Given the size and extension of these changes it's possible that this new version will behave differently in extreme scenarios. All has been done to mitigate that, including adding more automated tests. Changes to be aware:

Associations: many-to-many join tables will now be edges

If database type is set to graph then waterline-orientdb will use edges instead of join tables.

Migratabable

One change to be aware is the way waterline-orientdb will handle classes creation at start up. In the past waterline-orientdb would not touch existing classes and would create missing ones. Now it conforms to the waterline Auto Migration Strategies:

  • "safe" (default in production env)
    • do nothing
  • "drop" (default in development env)
    • drop all tables and recreate them each time the server starts-- useful for development
  • "alter"
    • experimental automigrations
orientdbClass

From now on it will be possible to force the class of a model by adding the property orientdbClass to the definition. Generally this is not required as waterline-orientdb can determine which is the best class to use, so it should only be used in special cases. Possible values:

  • undefined - waterline-orientdb will determine which class to use. In graph dbs it will be vertex for non junction collections and edge for association junction tables
  • "" or "document" - class will be the default OrientDB document class;
  • "V"- class will be Vertex;
  • "E"- class will be Edge.

Example:

{
  identity : 'post',
  orientdbClass : 'V'

  attributes : {
    name : 'string'
  }
}

Note, when using a document database (through config.options.databaseType), orientdbClass class will be ignored and all classes will be documents

Adds support for id declarations on model

24 Feb 11:00
Compare
Choose a tag to compare
  • Made waterline-orientdb more robust when id is declared in the model to improve blueprints compatibility
  • Added workaround for issue introduced with [email protected] where it was impossible to save json (embedded) records.