{"id":22012448,"url":"https://github.com/nikitaeverywhere/cache-javascript-odm","last_synced_at":"2025-03-23T08:16:12.164Z","repository":{"id":69124889,"uuid":"42647078","full_name":"nikitaeverywhere/cache-javascript-odm","owner":"nikitaeverywhere","description":"CJS (Caché JavaScript) - easiest access to database through JavaScript using object data model","archived":false,"fork":false,"pushed_at":"2017-07-05T14:47:52.000Z","size":320,"stargazers_count":2,"open_issues_count":0,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-28T14:48:39.931Z","etag":null,"topics":["cacheobjectscript-udl","intersystems","intersystems-cache"],"latest_commit_sha":null,"homepage":"","language":"Apex","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nikitaeverywhere.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-09-17T09:21:44.000Z","updated_at":"2019-01-30T15:07:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"3603b7a6-69b7-4caa-9874-8f4bd85fe2cb","html_url":"https://github.com/nikitaeverywhere/cache-javascript-odm","commit_stats":null,"previous_names":["nikitaeverywhere/cache-javascript-odm"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikitaeverywhere%2Fcache-javascript-odm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikitaeverywhere%2Fcache-javascript-odm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikitaeverywhere%2Fcache-javascript-odm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikitaeverywhere%2Fcache-javascript-odm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nikitaeverywhere","download_url":"https://codeload.github.com/nikitaeverywhere/cache-javascript-odm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245072266,"owners_count":20556353,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cacheobjectscript-udl","intersystems","intersystems-cache"],"created_at":"2024-11-30T03:12:53.278Z","updated_at":"2025-03-23T08:16:12.136Z","avatar_url":"https://github.com/nikitaeverywhere.png","language":"Apex","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JavaScript ODM for InterSystems Caché\n\nJavaScript Object Data Model - easiest workflow with InterSystems Caché objects from client JavaScript or NodeJS.\n\n### Note\n\nThis project is a result of InterSystems Innovations School hackathon which had its place 2015, by the team of [Anton Gnibeda](https://github.com/gnibeda), [Irene Mychailova](https://github.com/Gra-ach) and [Nikita Savchenko](https://github.com/ZitRos). 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](https://github.com/ZitRos/isc-cache-node/issues).\n\n### Usage\n\n1. Include the scripts to your application (see [src/index.html](src/index.html) example file);\n2. Import and compile [DemoInstaller.xml](DemoInstaller.xml) to Caché (or import from sources, [src](src) directory);\n3. A new web application named \"CJS\" will be created during compilation;\n4. Now, serve the [src/client](src/client) directory and check the demo. Demo defaults to localhost and port number 57772, see [test.js](src/client/test.js).\n\n### Features\n\n```js\n// .connect(\"Server address and port\", \"Namespace\", [Any Packages/classes], callback())\n// Note: all the callbacks represented here are asynchronous and may be triggered in any order.\ncjs.connector.connect(\"http://localhost:57772\", \"USER\", [\"School2015\"], function (cache) {\n\n  // creating a new object\n  var p = new cache.School2015.Participant();\n  p.Name = \"Anton\";\n  p.Surname = \"Gnibeda\";\n  p.$save(function(obj) {\n    console.log(\"Participant with name \" + obj.name + \" saved!\");\n  });\n\t\n  // opening existing object\n  cache.School2015.Group.openById(1, function (group) {\n    console.log(\"Points: \" + group.Points);\n  });\n\t\n  // executing class method\n  cache.School2015.Group.AddPoints(1, 1);\n\n  // executing instance method\n  cache.School2015.Group.openById(1, function (group) {\n    group.PrintInfo(function (res) {\n      console.log(res);\n    });\n  });\n\t\n\t// executing linq-like queries\n  cache.School2015.Participant\n    .query()\n    .where(\"Carma \u003c 100 OR Carma \u003e 140\")\n    .where(\"$id \u003e 10\")\n    .orderByDesc(\"Carma\")\n    .orderBy(\"Name\")\n    .exec(function(res) {\n      console.table(res);\n    });\n\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikitaeverywhere%2Fcache-javascript-odm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnikitaeverywhere%2Fcache-javascript-odm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikitaeverywhere%2Fcache-javascript-odm/lists"}