Home Applications isc-cache-node

isc-cache-node Works

InterSystems does not provide technical support for this project. Please contact its developer for the technical assistance.
0
0 reviews
0
Awards
232
Views
0
IPM installs
0
0
Details
Releases (1)
Reviews
Issues
CNDO (Caché Node Data Object) - easiest access to database using object data model.

What's new in this version

Initial Release

JavaScript ODM for InterSystems Caché

JavaScript Object Data Model - easiest workflow with InterSystems Caché objects from client JavaScript or NodeJS.

Note

This project is a result of InterSystems Innovations School hackathon which had its place 2015, by the team of Anton Gnibeda, Irene Mychailova and Nikita Savchenko. The code in this repository is provided “as-is” and is not ready for potential production use. For any further info, questions or requests please, submit an issue.

Usage

  1. Include the scripts to your application (see https://github.com/intersystems-ru/isc-cache-node/blob/master/https://github.com/intersystems-ru/isc-cache-node/blob/master/src/index.html example file);
  2. Import and compile https://github.com/intersystems-ru/isc-cache-node/blob/master/DemoInstaller.xml to Caché (or import from sources, https://github.com/intersystems-ru/isc-cache-node/blob/master/src directory);
  3. A new web application named “CJS” will be created during compilation;
  4. Now, serve the https://github.com/intersystems-ru/isc-cache-node/blob/master/https://github.com/intersystems-ru/isc-cache-node/blob/master/src/client directory and check the demo. Demo defaults to localhost and port number 57772, see test.js.

Features

// .connect("Server address and port", "Namespace", [Any Packages/classes], callback())
// Note: all the callbacks represented here are asynchronous and may be triggered in any order.
cjs.connector.connect("http://localhost:57772", "USER", ["School2015"], function (cache) {

// creating a new object var p = new cache.School2015.Participant(); p.Name = "Anton"; p.Surname = "Gnibeda"; p.$save(function(obj) { console.log("Participant with name " + obj.name + " saved!"); });

// opening existing object cache.School2015.Group.openById(1, function (group) { console.log("Points: " + group.Points); });

// executing class method cache.School2015.Group.AddPoints(1, 1);

// executing instance method cache.School2015.Group.openById(1, function (group) { group.PrintInfo(function (res) { console.log(res); }); });

// executing linq-like queries

cache.School2015.Participant .query() .where("Carma < 100 OR Carma > 140") .where("$id > 10") .orderByDesc("Carma") .orderBy("Name") .exec(function(res) { console.table(res); });

});

Version
1.21.301 Jun, 2018
Ideas portal
Category
Frameworks
Works with
Caché
First published
27 Sep, 2018
Last edited
01 Jun, 2018
Last checked by moderator
07 May, 2024Works