@quatrain/backend-sqlite 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +15 -0
- package/README.md +26 -0
- package/package.json +40 -43
- package/src/SQLiteAdapter.ts +916 -0
- package/src/__test__/CRUD.test.ts +67 -0
- package/src/__test__/SQLiteAdapter.test.ts +433 -0
- package/src/__test__/Search.test.ts +325 -0
- package/src/__test__/common.ts +61 -0
- package/src/index.ts +3 -0
- package/lib/SQLiteAdapter.d.ts +0 -55
- package/lib/SQLiteAdapter.js +0 -696
- package/lib/index.d.ts +0 -2
- package/lib/index.js +0 -5
package/LICENSE.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# LICENSE UPDATE NOTICE
|
|
2
|
+
|
|
3
|
+
As of 01/01/2026, Quatrain Core is licensed under the **GNU Affero General Public License v3.0 (AGPL v3)**.
|
|
4
|
+
Previous versions remain under the MIT License.
|
|
5
|
+
|
|
6
|
+
## Why AGPL?
|
|
7
|
+
|
|
8
|
+
We believe in open collaboration for the development ecosystem. The AGPL ensures that any modification or deployment of this BaaS stack, including over a network, benefits the entire community.
|
|
9
|
+
|
|
10
|
+
## Commercial Services & Enterprise Usage
|
|
11
|
+
|
|
12
|
+
We provide official deployment services, technical training, and certification for Quatrain Core.
|
|
13
|
+
For organizations requiring a non-copyleft license (commercial license) or custom proprietary integrations, please contact the copyright holder: **Quatrain Technologies**.
|
|
14
|
+
|
|
15
|
+
Copyright © 2024-2026 Quatrain Technologies. All Rights Reserved.
|
package/README.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# @quatrain/backend-sqlite
|
|
2
|
+
|
|
3
|
+
A backend adapter for SQLite. This package is perfect for local development, testing, and small-scale applications that require a simple, file-based database.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- Implements the `@quatrain/backend` abstract adapter.
|
|
8
|
+
- Zero-configuration setup for rapid development.
|
|
9
|
+
- Stores the entire database in a single file.
|
|
10
|
+
- Uses the `better-sqlite3` library for performance.
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npm install @quatrain/backend-sqlite better-sqlite3
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
import { Backend } from '@quatrain/backend'
|
|
22
|
+
import { SqliteAdapter } from '@quatrain/backend-sqlite'
|
|
23
|
+
|
|
24
|
+
const adapter = new SqliteAdapter({ config: { filename: './dev.db' } })
|
|
25
|
+
Backend.addAdapter(adapter, 'default', true)
|
|
26
|
+
```
|
package/package.json
CHANGED
|
@@ -1,44 +1,41 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
"publish:process": "yarn version patch && yarn build && yarn npm publish --access public && yarn hash:persist"
|
|
43
|
-
}
|
|
44
|
-
}
|
|
2
|
+
"name": "@quatrain/backend-sqlite",
|
|
3
|
+
"version": "1.0.3",
|
|
4
|
+
"license": "AGPL-3.0-only",
|
|
5
|
+
"description": "Backend adapter for SQLite",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"bun": "src/index.ts",
|
|
9
|
+
"files": [
|
|
10
|
+
"LICENSE.md",
|
|
11
|
+
"dist/",
|
|
12
|
+
"src/",
|
|
13
|
+
"README.md"
|
|
14
|
+
],
|
|
15
|
+
"author": "Quatrain Développement SAS <developers@quatrain.com>",
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@quatrain/backend": "^1.1.26",
|
|
18
|
+
"@quatrain/core": "workspace:^",
|
|
19
|
+
"sqlite": "^5.1.1",
|
|
20
|
+
"sqlite3": "^5.1.7"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"@faker-js/faker": "^7.6.0",
|
|
24
|
+
"@jest/expect": "^30.0.0",
|
|
25
|
+
"@tsconfig/recommended": "^1.0.1",
|
|
26
|
+
"@types/jest": "^30.0.0",
|
|
27
|
+
"@types/node": "^22.10.1",
|
|
28
|
+
"@types/sqlite3": "^3.1.11",
|
|
29
|
+
"jest": "^30.2.0",
|
|
30
|
+
"trace-unhandled": "^2.0.1",
|
|
31
|
+
"ts-jest": "^29.4.1",
|
|
32
|
+
"ts-node": "^10.9.1",
|
|
33
|
+
"typescript": "^5.2.2"
|
|
34
|
+
},
|
|
35
|
+
"scripts": {
|
|
36
|
+
"test-ci": "jest --runInBand",
|
|
37
|
+
"build": "tsc",
|
|
38
|
+
"wbuild": "tsc --watch",
|
|
39
|
+
"bump-to": "yarn version"
|
|
40
|
+
}
|
|
41
|
+
}
|