From 9bb0d44ba3184c951728319e3d8042941f290b15 Mon Sep 17 00:00:00 2001 From: Rand McKinney Date: Fri, 11 Nov 2016 17:26:06 -0800 Subject: [PATCH 1/2] Update README.md --- README.md | 43 +++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index a54e87c..a71bf42 100644 --- a/README.md +++ b/README.md @@ -4,15 +4,12 @@ The official SQLite3 connector module for the LoopBack framework. ## Connector settings -The connector can be configured using the following settings from the data source. -* file: The path to the database file or `:memory:` -* debug (default to false) +Configure the connector with the following data source properties: -The SQLite3 connector uses [node-sqlite3](https://github.com/mapbox/node-sqlite3) as the driver. - -## Discovering Models +* `file`: The path to the database file or `:memory:` +* `debug`: Display debug information. Default is false. -The SQLite3 connector does not currently support discovery of models. +The SQLite3 connector uses [node-sqlite3](https://github.com/mapbox/node-sqlite3) as the driver. ## Model definition for SQLite3 @@ -76,23 +73,25 @@ The model definition consists of the following properties: ## Type Mapping - - Number - - Primary key is stored as INTEGER - - Others are stored as REAL - - Boolean - - Stored as INTEGER 1 or 0 - - Date - - Stored as INTEGER (Millis since Jan 01 1970 00:00:00 0000) - - String - - Complex types (GeoPoint, Point, List, Array, Object, Sub-models) - - Stored as TEXT in JSON form - - JSON - - Stored as TEXT - -SQLite3 does not enforce types. I.e. any data can be stored in any column regardless of definiton. +| LoopBack type | Mapped to SQLite3 type | +|-----|-----| +| Number| Primary key stored as INTEGER, others as REAL | +| Boolean | INTEGER 1 or 0 | +| Date | INTEGER (ms since Jan 01 1970 00:00:00 0000) | +| String | ? | +| Complex types: GeoPoint, Point, List, Array, Object, and sub-models | TEXT in JSON format | +| JSON | TEXT | + +SQLite3 does not enforce types. Any data can be stored in any column regardless of definiton. This connector attempts to check for invalid Date, Number and JSON types. -## Auto Migrate / Auto Update +## Unsupported features + +### Discovering Models + +The SQLite3 connector does not currently support model discovery. + +### Auto Migrate / Auto Update The SQLite3 connector does not currently support auto-migrate or auto-upgrade. From fda1cb0b36ca65202bccea4358971aefa896922f Mon Sep 17 00:00:00 2001 From: Rand McKinney Date: Mon, 14 Nov 2016 14:55:16 -0800 Subject: [PATCH 2/2] Update README.md Add install info and link to SQLite site. --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a71bf42..20c94f4 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,16 @@ # loopback-connector-sqlite3 -The official SQLite3 connector module for the LoopBack framework. +[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. + +## Installation + +Enter the following in the top-level directory of your LoopBack application: + +``` +$ npm install loopback-connector-sqlite3 --save +``` + +The `--save` option adds the dependency to the application's `package.json` file. ## Connector settings