{"id":16981969,"url":"https://github.com/1602/orm","last_synced_at":"2026-04-08T18:31:58.343Z","repository":{"id":1157930,"uuid":"1045431","full_name":"1602/orm","owner":"1602","description":"simple object redis mapper","archived":false,"fork":false,"pushed_at":"2010-12-22T06:34:52.000Z","size":152,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-21T23:43:01.391Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/1602.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-11-02T18:00:05.000Z","updated_at":"2023-03-28T07:56:41.000Z","dependencies_parsed_at":"2022-07-06T10:53:03.603Z","dependency_job_id":null,"html_url":"https://github.com/1602/orm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/1602/orm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1602%2Form","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1602%2Form/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1602%2Form/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1602%2Form/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/1602","download_url":"https://codeload.github.com/1602/orm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1602%2Form/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31568617,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-10-14T02:06:58.780Z","updated_at":"2026-04-08T18:31:58.323Z","avatar_url":"https://github.com/1602.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"About\n=====\n\nORM is simple Object-redis-mapper, which provides simple object interface to redis data storage.\nIt adds some methods to the selected model: create, find, exists, etc..\n\nCheck out test to learn how to use this lib.\n\nPrerequisites\n=============\n\n 1. Redis server version 2.0.3\n 2. node version 0.2.2\n 3. nodeunit (for running tests)\n\nInstallation\n============\n\nInstall usin NPM\n\n    npm install node-redis-mapper\n\nOr from sources on github\n\n    mkdir vendor\n    git clone git://github.com/1602/orm.git vendor/orm\n\nUsage\n=====\n\n    var m = require('node-redis-mapper').apply_to_models(__dirname + '/app/models/');\n\nor\n\n    // load models namespace\n    var models = require('./lib/your_models');\n    // or define model\n    var models = {\n        User: function User() {\n            User.attributes = {\n                name: 'string',\n                email: 'string',\n                birthdate: 'datetime'\n            };\n        }\n    };\n\n    // add persistence\n    require('node-redis-mapper').mix_persistence_methods(models);\n\n    models.User.create(function () {\n        var user = this;\n        console.log(user.created_at);\n        user.name = 'John Doe';\n        user.email = 'john@example.com';\n        user.save(function (err) {\n            if (!err) {\n                console.log('User saved');\n            } else {\n                console.log('Could not save user');\n            }\n        });\n    });\n\n    models.User.connection.select(10);\n\nTest\n====\n\n    # please note, tests by default running on database 9\n    nodeunit test/orm.js\n\nContributing\n============\n\nContributions to the project are most welcome, so feel free to fork and improve. When submitting a pull request, please ensure that JSLint coding style is met.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1602%2Form","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F1602%2Form","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1602%2Form/lists"}