{"id":19165720,"url":"https://github.com/loopbackio/loopback-connector-sqlite3","last_synced_at":"2025-05-07T12:23:54.511Z","repository":{"id":33895026,"uuid":"37608558","full_name":"loopbackio/loopback-connector-sqlite3","owner":"loopbackio","description":"SQLite3 Connector for LoopBack","archived":false,"fork":false,"pushed_at":"2023-12-15T11:36:37.000Z","size":126,"stargazers_count":13,"open_issues_count":20,"forks_count":22,"subscribers_count":32,"default_branch":"master","last_synced_at":"2025-04-19T22:02:49.396Z","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/loopbackio.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","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":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-06-17T17:00:38.000Z","updated_at":"2021-09-30T15:55:48.000Z","dependencies_parsed_at":"2023-12-15T12:48:40.227Z","dependency_job_id":null,"html_url":"https://github.com/loopbackio/loopback-connector-sqlite3","commit_stats":null,"previous_names":["strongloop/loopback-connector-sqlite3"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loopbackio%2Floopback-connector-sqlite3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loopbackio%2Floopback-connector-sqlite3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loopbackio%2Floopback-connector-sqlite3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loopbackio%2Floopback-connector-sqlite3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/loopbackio","download_url":"https://codeload.github.com/loopbackio/loopback-connector-sqlite3/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252874821,"owners_count":21817912,"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-09T09:29:07.998Z","updated_at":"2025-05-07T12:23:54.466Z","avatar_url":"https://github.com/loopbackio.png","language":"JavaScript","readme":"# loopback-connector-sqlite3\n\n[SQLite](https://sqlite.org/) is a self-contained, high-reliability, embedded, full-featured, public-domain, SQL database engine. This is the official SQLite3 connector module for the LoopBack framework.\n\n## Installation\n\nEnter the following in the top-level directory of your LoopBack application:\n\n```\n$ npm install loopback-connector-sqlite3 --save\n```\n\nThe `--save` option adds the dependency to the application's `package.json` file.\n\n## Connector settings\n\nConfigure the connector with the following data source properties:\n\n* `file`: The path to the database file or `:memory:`\n* `debug`: Display debug information. Default is false.\n\nThe SQLite3 connector uses [node-sqlite3](https://github.com/mapbox/node-sqlite3) as the driver.\n\n## Model definition for SQLite3\n\nThe model definition consists of the following properties:\n\n* name: Name of the model, by default, it's the camel case of the table\n* properties: Property definitions, including default value mapping\n\n```json\n\n    {\"name\": \"Inventory\", \"options\": {\n      \"idInjection\": false,\n    }, \"properties\": {\n      \"id\": {\n        \"type\": \"String\",\n        \"required\": false,\n        \"length\": 64,\n        \"precision\": null,\n        \"scale\": null\n      },\n      \"productId\": {\n        \"type\": \"String\",\n        \"required\": false,\n        \"length\": 20,\n        \"precision\": null,\n        \"scale\": null,\n        \"id\": 1\n      },\n      \"locationId\": {\n        \"type\": \"String\",\n        \"required\": false,\n        \"length\": 20,\n        \"precision\": null,\n        \"scale\": null,\n        \"id\": 1\n      },\n      \"available\": {\n        \"type\": \"Number\",\n        \"required\": false,\n        \"length\": null,\n        \"precision\": 32,\n        \"scale\": 0\n      },\n      \"total\": {\n        \"type\": \"Number\",\n        \"required\": false,\n        \"length\": null,\n        \"precision\": 32,\n        \"scale\": 0\n      },\n      \"createdOn\": {\n       \"type\": \"Date\",\n        \"required\": false,\n        \"sqlite3\": {\n          \"dbDefault\": \"now\"\n        }\n      }\n    }}\n\n```\n\n## Type Mapping\n\n| LoopBack type | Mapped to SQLite3 type |\n|-----|-----|\n| Number| Primary key stored as INTEGER, others as REAL |\n| Boolean | INTEGER 1 or 0 |\n| Date | INTEGER (ms since Jan 01 1970 00:00:00 0000) |\n| String | ? |\n| Complex types: GeoPoint, Point, List, Array, Object, and sub-models | TEXT in JSON format |\n| JSON | TEXT |\n\nSQLite3 does not enforce types. Any data can be stored in any column regardless of definiton.\nThis connector attempts to check for invalid Date, Number and JSON types.\n\n## Unsupported features\n\n### Discovering Models\n\nThe SQLite3 connector does not currently support model discovery.\n\n### Auto Migrate / Auto Update\n\nThe SQLite3 connector does not currently support auto-migrate or auto-upgrade.\n\n## Running tests\n\nThe tests in this repository are mainly integration tests, meaning you will need\nto run them using our preconfigured test server.\n\n1. Ask a core developer for instructions on how to set up test server\n   credentials on your machine\n2. `npm test`\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floopbackio%2Floopback-connector-sqlite3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floopbackio%2Floopback-connector-sqlite3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floopbackio%2Floopback-connector-sqlite3/lists"}