Skip to content

Commit 59b2100

Browse files
authored
Update README.md (#27)
* Update README.md * Update README.md Add install info and link to SQLite site.
1 parent 5122f51 commit 59b2100

File tree

1 file changed

+32
-23
lines changed

1 file changed

+32
-23
lines changed

README.md

Lines changed: 32 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,25 @@
11
# loopback-connector-sqlite3
22

3-
The official SQLite3 connector module for the LoopBack framework.
3+
[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.
44

5-
## Connector settings
5+
## Installation
66

7-
The connector can be configured using the following settings from the data source.
8-
* file: The path to the database file or `:memory:`
9-
* debug (default to false)
7+
Enter the following in the top-level directory of your LoopBack application:
108

11-
The SQLite3 connector uses [node-sqlite3](https://github.com/mapbox/node-sqlite3) as the driver.
9+
```
10+
$ npm install loopback-connector-sqlite3 --save
11+
```
12+
13+
The `--save` option adds the dependency to the application's `package.json` file.
14+
15+
## Connector settings
1216

13-
## Discovering Models
17+
Configure the connector with the following data source properties:
1418

15-
The SQLite3 connector does not currently support discovery of models.
19+
* `file`: The path to the database file or `:memory:`
20+
* `debug`: Display debug information. Default is false.
21+
22+
The SQLite3 connector uses [node-sqlite3](https://github.com/mapbox/node-sqlite3) as the driver.
1623

1724
## Model definition for SQLite3
1825

@@ -76,23 +83,25 @@ The model definition consists of the following properties:
7683

7784
## Type Mapping
7885

79-
- Number
80-
- Primary key is stored as INTEGER
81-
- Others are stored as REAL
82-
- Boolean
83-
- Stored as INTEGER 1 or 0
84-
- Date
85-
- Stored as INTEGER (Millis since Jan 01 1970 00:00:00 0000)
86-
- String
87-
- Complex types (GeoPoint, Point, List, Array, Object, Sub-models)
88-
- Stored as TEXT in JSON form
89-
- JSON
90-
- Stored as TEXT
91-
92-
SQLite3 does not enforce types. I.e. any data can be stored in any column regardless of definiton.
86+
| LoopBack type | Mapped to SQLite3 type |
87+
|-----|-----|
88+
| Number| Primary key stored as INTEGER, others as REAL |
89+
| Boolean | INTEGER 1 or 0 |
90+
| Date | INTEGER (ms since Jan 01 1970 00:00:00 0000) |
91+
| String | ? |
92+
| Complex types: GeoPoint, Point, List, Array, Object, and sub-models | TEXT in JSON format |
93+
| JSON | TEXT |
94+
95+
SQLite3 does not enforce types. Any data can be stored in any column regardless of definiton.
9396
This connector attempts to check for invalid Date, Number and JSON types.
9497

95-
## Auto Migrate / Auto Update
98+
## Unsupported features
99+
100+
### Discovering Models
101+
102+
The SQLite3 connector does not currently support model discovery.
103+
104+
### Auto Migrate / Auto Update
96105

97106
The SQLite3 connector does not currently support auto-migrate or auto-upgrade.
98107

0 commit comments

Comments
 (0)