{"id":49235,"library":"rm","title":"rm","description":"An ORM-like object storage layer for Riak, version 0.1.8. Provides a simple API for storing and retrieving JSON objects in Riak with schema stored in the database. No SQL, no complexity—just basic CRUD operations via promises. Designed for Node.js, relies on riak-dc for HTTP communication with Riak. Release cadence unknown; last update likely circa 2014. Differentiator: minimalistic, synchronous-like API using Q promises, no relational features, schema-light. Not actively maintained.","status":"abandoned","version":"0.1.8","language":"javascript","source_language":"en","source_url":"https://github.com/janearc/rm","tags":["javascript","riak","synchronous","simple","promises","q","orm","object","relational"],"install":[{"cmd":"npm install rm","lang":"bash","label":"npm"},{"cmd":"yarn add rm","lang":"bash","label":"yarn"},{"cmd":"pnpm add rm","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"HTTP client for Riak","package":"riak-dc","optional":false},{"reason":"Promise library","package":"q","optional":false}],"imports":[{"note":"ESM default import; commonjs require also works but not recommended","wrong":"const rm = require('rm')","symbol":"rm","correct":"import rm from 'rm'"},{"note":"Named export, can also use default and destructure","wrong":"import rm from 'rm'; rm.add_object","symbol":"add_object","correct":"import { add_object } from 'rm'"},{"note":"Named export","wrong":"","symbol":"get_objects","correct":"import { get_objects } from 'rm'"},{"note":"Named export","wrong":"","symbol":"del_object","correct":"import { del_object } from 'rm'"}],"quickstart":{"code":"import rm from 'rm';\nimport riakdc from 'riak-dc';\n\n// configure riak-dc if not using default localhost:8098\nriakdc.init({ host: 'localhost', port: 8098 });\n\n// add a new object\nrm.add_object('automobile', { make: 'Toyota', model: 'Camry', year: 2020 })\n  .then(obj => {\n    console.log('Saved with serial:', obj.serial);\n  })\n  .catch(err => console.error(err));\n\n// get all objects of a type\nrm.get_objects('automobile')\n  .then(objs => {\n    objs.forEach(o => console.log(o.make, o.model));\n  });\n\n// delete an object (must have serial)\nrm.del_object('automobile', { serial: 'some-serial' })\n  .then(() => console.log('Deleted'));","lang":"typescript","description":"Demonstrates basic CRUD: adding an object, retrieving all objects of a type, and deleting an object using the RM library with riak-dc configured for a local Riak instance."},"warnings":[{"fix":"Migrate to a maintained Riak client or alternative ORM.","message":"Package is abandoned; no updates since 2014. May have security vulnerabilities in dependencies (e.g., q, riak-dc).","severity":"abandoned","affected_versions":">=0.0.0"},{"fix":"Ensure objects retrieved via get_objects have serials; for new objects, serial is assigned after add_object.","message":"Objects must have a 'serial' property to be updated or deleted; otherwise an exception is thrown.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Validate objects manually before storing.","message":"Schema is not enforced; objects can violate the schema template.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Wrap Q promises with native Promise or use a promise wrapper.","message":"Uses Q promises, which are outdated; modern code should use native Promises or async/await.","severity":"deprecated","affected_versions":">=0.0.0"}],"env_vars":null,"search_vec":"'0.1.8':12 '2014':61 'activ':78 'api':16,67 'basic':36 'cadenc':55 'circa':60 'communic':51 'complex':34 'crud':37 'databas':30 'dc':48 'design':41 'differenti':62 'featur':73 'http':50 'javascript':80 'json':21 'last':57 'layer':8 'light':76 'like':5,59,66 'maintain':79 'minimalist':63 'node.js':43 'object':6,22,87 'oper':38 'orm':4,86 'orm-lik':3 'promis':40,70,84 'provid':13 'q':69,85 'relat':72,88 'releas':54 'reli':44 'retriev':20 'riak':10,24,47,53,81 'riak-dc':46 'rm':1 'schema':26,75 'schema-light':74 'simpl':15,83 'sql':32 'storag':7 'store':18,27 'synchron':65,82 'synchronous-lik':64 'unknown':56 'updat':58 'use':68 'version':11 'via':39","created_at":"2026-06-07T17:00:44.701437+00:00","updated_at":"2026-06-07T17:00:44.701437+00:00","problems":[{"fix":"Use update_object instead for existing objects.","cause":"Calling add_object on an object that already has a serial or is duplicate.","error":"Error: Object already exists"},{"fix":"Ensure object has a serial (from a prior add_object or get_objects).","cause":"Calling del_object or update_object on an object without a serial property.","error":"Error: Object has no serial"},{"fix":"Run npm install riak-dc and import riakdc before using rm.","cause":"riak-dc not installed or imported.","error":"TypeError: Cannot read property 'init' of undefined"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/janearc/rm","github":"https://github.com/janearc/rm","docs":null,"changelog":null,"pypi":null,"npm":"rm","openapi_spec":null,"status_page":null,"smithery":null,"categories":["database"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}