{"id":40474419,"url":"https://github.com/emeraldion/adelia","last_synced_at":"2026-01-20T18:22:01.010Z","repository":{"id":57173349,"uuid":"76653454","full_name":"emeraldion/adelia","owner":"emeraldion","description":"🐧 Antarctic-friendly ORM for Node","archived":false,"fork":false,"pushed_at":"2017-02-14T23:18:36.000Z","size":150,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-13T22:21:25.062Z","etag":null,"topics":["activerecord","dao","mysql","mysql-orm","nodejs","orm","sqlite3"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/emeraldion.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-16T12:50:09.000Z","updated_at":"2017-02-14T22:36:04.000Z","dependencies_parsed_at":"2022-08-24T14:41:08.020Z","dependency_job_id":null,"html_url":"https://github.com/emeraldion/adelia","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/emeraldion/adelia","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emeraldion%2Fadelia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emeraldion%2Fadelia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emeraldion%2Fadelia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emeraldion%2Fadelia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emeraldion","download_url":"https://codeload.github.com/emeraldion/adelia/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emeraldion%2Fadelia/sbom","scorecard":{"id":375170,"data":{"date":"2025-08-11","repo":{"name":"github.com/emeraldion/adelia","commit":"8f0012b9d0d0cf89f16c06cb13ef4193f511e9da"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: MIT License: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-18T14:04:35.405Z","repository_id":57173349,"created_at":"2025-08-18T14:04:35.405Z","updated_at":"2025-08-18T14:04:35.405Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28608945,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T16:10:39.856Z","status":"ssl_error","status_checked_at":"2026-01-20T16:10:39.493Z","response_time":117,"last_error":"SSL_read: 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":["activerecord","dao","mysql","mysql-orm","nodejs","orm","sqlite3"],"created_at":"2026-01-20T18:22:00.337Z","updated_at":"2026-01-20T18:22:00.988Z","avatar_url":"https://github.com/emeraldion.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/emeraldion/adelia.svg?branch=master)](https://travis-ci.org/emeraldion/adelia)\n[![Coverage Status](https://coveralls.io/repos/github/emeraldion/adelia/badge.svg?branch=master)](https://coveralls.io/github/emeraldion/adelia?branch=master)\n\n# adelia\n\n:penguin: Antarctic-friendly ORM for Node\n\n[![Adélie penguins on an iceberg](https://c3.staticflickr.com/4/3426/3212303306_aed5d043e5_z.jpg)](https://www.flickr.com/photos/10004136@N05/3212303306)\n\n_\u003csmall\u003ePhoto (c) by Jason Auch\u003c/small\u003e_\n\n## Design Principles\n\nAdelia is meant to be a fast, simple, promise-based ORM for Node, loosely inspired to Martin Fowler's [ActiveRecord](http://www.martinfowler.com/eaaCatalog/activeRecord.html) pattern popularized by [Ruby on Rails](http://rubyonrails.org/). Due to the async IO nature of Node and DB clients, the API must be async. Adelia uses [Promises](https://promisesaplus.com/) to offer a clean, uncluttered API that's easy to compose and reason about.\n\n## Features\n\n* Accessors: `has`, `get`, `set`, `unset`.\n* Persistence: `save`, `delete`.\n* Query: `find`, `findById`, `findAll`, `findByQuery`, `countAll`.\n* Relationships: `hasOne`, `hasMany`, `belongsTo`, `hasAndBelongsToMany`.\n* Specialization: `create`.\n\n## Configuration\n\nSet these environment variables in your script:\n\n* `DB` one of the supported databases: `mysql` (default), or `sqlite` (experimental).\n\n### MySQL\n\nSet these variables to configure Adelia to use a MySQL database server: \n\n* `MYSQL_HOST` host of the MySQL database server.\n* `MYSQL_PORT` port of the MySQL database server.\n* `MYSQL_USER` username to connect to the MySQL database server.\n* `MYSQL_PASSWORD` password of the user of the MySQL database server.\n* `MYSQL_DB` name of the MySQL database.\n\nThis assumes you already have a MySQL server to use. For local development, see the [Development](https://github.com/emeraldion/adelia/blob/master/README.md#development) section below.\n\n### SQLite\n\nSet this variable to configure Adelia to use a SQLite database:\n\n* `SQLITE_DB` path to the SQLite database file.\n\n## Usage\n\nAdelia has a concise, promise-based API that allows you to perform chained operations to query and fetch model objects, access their properties, persist, and delete them. Here's an example:\n\n```js\nconst Model = require('adelia').Model;\n\n// Creates a specialized model class\nconst Penguin = Model.create('penguin');\n\n// Instantiates a penguin\nconst emperor = new Penguin({\n  species: 'Emperor'\n});\n\nlet emperor_id;\n\n// Saves the penguin to DB\nemperor.save()\n\t.then(model =\u003e model.get('id'))\n\t.then(id =\u003e { emperor_id = id; });\n\n// Fetches a model from the DB\nPenguin.find(emperor_id)\n\t.then(model =\u003e model.get('species'))\n\t.then(name =\u003e console.log(`My species is ${name}`));\n// =\u003e My species is Emperor\n```\n\n## Status\n\n* MySQL support: **STABLE**\n* SQLite support: **EXPERIMENTAL**\n\nMySQL support is currently stable, with some known issues.\nSQLite support is currently experimental. Tests are failing locally and in TravisCI. If you'd like to use Adelia on SQLite and can contribute fixes and enhancements, please submit a PR!\n\n## Contributing\n\nThank you for your interest in Adelia! Feel free to open issues or submit a PR. See the [Contributing Guidelines](https://github.com/emeraldion/adelia/blob/master/CONTRIBUTING.md) for detailed instructions.\n\n## Development\n\nAdelia is a Node module. If you are unsure what to do, follow these steps:\n\n### Installing a local MySQL server\n\nFor development, it's best to use a [local MySQL server](https://dev.mysql.com/doc/mysql-getting-started/). I use [MAMP](https://www.mamp.info/) on Mac OS X, but you can also run MySQL server in [a Docker container](https://hub.docker.com/r/mysql/mysql-server/).\n\n### Install dependencies\n\n```sh\nnpm install\n```\n\n### Run tests\n\nThe default test target should be sufficient for most contributors:\n\n```sh\nnpm test\n```\n\nIf you want to run tests for MySQL alone, run:\n\n```sh\nnpm run test-mysql\n```\n\nThere are also SQLite specific tests:\n\n```sh\nnpm run test-sqlite\n```\n\n## Code of Conduct\n\nPlease note that this project is released with a [Contributor Code of Conduct](https://github.com/emeraldion/adelia/blob/master/CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.\n\n## License\n\n[MIT](https://opensource.org/licenses/MIT)\n\nCopyright (c) 2016, 2017 Claudio Procida\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femeraldion%2Fadelia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femeraldion%2Fadelia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femeraldion%2Fadelia/lists"}