Releases: Tlantic/couchbaselib
Releases · Tlantic/couchbaselib
v2.0.5
v2.0.4
Reverted removal of operation callbacks from last version.
v2.0.3
update(package) 2.0.3
v2.0.2
Changelog 2.0.0 & 2.0.1
- Changed schema validator to AJV;
- Added environment feature;
- Support for "model instance" operations;
- Support for "model type" operations.
Shared Environment
Couchbaselib instanciates into a shared environment, gathering/caching known schemas and bucket connections.
Model Definition
Define a model by using the environment model method (i.e.: couchbase.model( bucketName, modelName, modelSchema, classMethods, instanceMethods ) ).
Class Methods
Model definition creates a class that inherits from an abstract Model class that contains standard crud operations.
const
Model = couchbaselib.Model;
/* retrieving document data and map and instanciates to the defined type*/
Model.get("User::489a598e-259c-4e25-974e-5de00b29f707", (error, couchResult) => couchResult.value instanceOf Model ); // true
Model Instances
Model prototype defines a set of crud operations and their result is mapped to the instance that called such method.
const
Model = couchbaselib.Model;
let instance = new Model('User');
/* retrieving document data and map it to the instance properties */
instance.update((error, couchResult) => couchResult.value._uId === instance._uId ); // true
v2.0.0
refactoring(couchbaselib) 2.0 MRS-202 #resolved #time 3d #comment Reformulação da lib.
v1.1.11
v1.1.11
v1.1.10
fix(params) fixed meth parameters
v1.1.8
Changelog
- Added the ability to pass an options object instead of multiple arguments on some functions;
- Added getAndLock operation.
v1.1.7
Version 1.1.6 Release
<feat>(package): Version 1.1.6 Update Couchbase