{"id":18544725,"url":"https://github.com/131/umod","last_synced_at":"2025-05-15T05:34:15.142Z","repository":{"id":57385735,"uuid":"59009654","full_name":"131/umod","owner":"131","description":"Micro data model for nodejs","archived":false,"fork":false,"pushed_at":"2017-12-01T15:37:22.000Z","size":18,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-18T22:26:07.524Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/131.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":"2016-05-17T09:38:56.000Z","updated_at":"2017-02-05T22:25:38.000Z","dependencies_parsed_at":"2022-08-29T13:42:04.392Z","dependency_job_id":null,"html_url":"https://github.com/131/umod","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/131%2Fumod","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/131%2Fumod/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/131%2Fumod/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/131%2Fumod/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/131","download_url":"https://codeload.github.com/131/umod/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254282595,"owners_count":22045127,"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":[],"created_at":"2024-11-06T20:17:26.099Z","updated_at":"2025-05-15T05:34:15.099Z","avatar_url":"https://github.com/131.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# umod\nMicro data model mapper for nodejs, works best with [pg-aa](https://github.com/131/pg-co).\n\n[![Build Status](https://travis-ci.org/131/umod.svg?branch=master)](https://travis-ci.org/131/umod)\n[![Coverage Status](https://coveralls.io/repos/github/131/umod/badge.svg?branch=master)](https://coveralls.io/github/131/umod?branch=master)\n[![NPM version](https://img.shields.io/npm/v/umod.svg)](https://www.npmjs.com/package/umod)\n\n\n# Example\n```\nconst uMod = require('umod');\n\nclass File extends uMod {\n  //dostuff\n  static get sql_table() { return \"some_table\"; }\n  static get sql_key() { return \"some_key\"; }\n}\n\nvar lnk = pg.connect(\"somecreds@somehost\");\n\n(async function(){\n  var foo = await File.instanciate(lnk, some_guid);\n    //results in SELECT * FROM sometable WHERE some_key=?, some_guid\n    //return a simple File instance with all columns as properties\n\n\n  var foos = await File.from_ids(lnk, [some_guid, some_other_guid]);\n    //same thing here\n}();\n\n```\n\n# API\n## Static instanciate \nSearch for a model through data connector, throw if missing\n\n## Static from_ids\nInstanciate a list of model, return a key indexed dictionnary\n\n\n\n# TODO\n* Get rich or die tryin'\n\n# Shoutbox, keywords, SEO love\nmodel, data model, micro model, co, sql, yks, static inheritance, pg, pg-aa, model collection, \"Let's have a beer \u0026 talk in Paris\"\n\n\n# Credits\n* [131](https://github.com/131)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F131%2Fumod","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F131%2Fumod","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F131%2Fumod/lists"}