@cap-js/sqlite 1.7.2 → 1.7.4
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/CHANGELOG.md +15 -0
- package/README.md +3 -5
- package/lib/SQLiteService.js +5 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,21 @@
|
|
|
4
4
|
- The format is based on [Keep a Changelog](http://keepachangelog.com/).
|
|
5
5
|
- This project adheres to [Semantic Versioning](http://semver.org/).
|
|
6
6
|
|
|
7
|
+
## [1.7.4](https://github.com/cap-js/cds-dbs/compare/sqlite-v1.7.3...sqlite-v1.7.4) (2024-10-15)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
* enforce db file to be existent before server start ([#742](https://github.com/cap-js/cds-dbs/issues/742)) ([64a9018](https://github.com/cap-js/cds-dbs/commit/64a90186aaf44b3426df2e9adbf9a1b4cf2f92b7))
|
|
13
|
+
* Improved behavioral consistency between the database services ([#837](https://github.com/cap-js/cds-dbs/issues/837)) ([b6f7187](https://github.com/cap-js/cds-dbs/commit/b6f718701e48dfb1c4c3d98ee016ec45930f8e7b))
|
|
14
|
+
|
|
15
|
+
## [1.7.3](https://github.com/cap-js/cds-dbs/compare/sqlite-v1.7.2...sqlite-v1.7.3) (2024-07-09)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
|
|
20
|
+
* expand reach of `cds.features.ieee754compatible` to `int64` ([#722](https://github.com/cap-js/cds-dbs/issues/722)) ([7eef5e9](https://github.com/cap-js/cds-dbs/commit/7eef5e9c5ec286285b2552abd1e673175c59fdc1))
|
|
21
|
+
|
|
7
22
|
## [1.7.2](https://github.com/cap-js/cds-dbs/compare/sqlite-v1.7.1...sqlite-v1.7.2) (2024-06-19)
|
|
8
23
|
|
|
9
24
|
|
package/README.md
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
# CDS database service for SQLite
|
|
2
2
|
|
|
3
|
-
Welcome to the
|
|
3
|
+
Welcome to the SQLite database service for [SAP Cloud Application Programming Model](https://cap.cloud.sap) Node.js, based on streamlined database architecture and [*better-sqlite* driver](https://www.npmjs.com/package/better-sqlite3).
|
|
4
4
|
|
|
5
5
|
## Setup
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Using SQLite for development:
|
|
7
|
+
If you want to use SQLite for development, all you need to do is to install the database package, as follows
|
|
10
8
|
|
|
11
9
|
```sh
|
|
12
10
|
npm add @cap-js/sqlite -D
|
|
@@ -33,4 +31,4 @@ We as members, contributors, and leaders pledge to make participation in our com
|
|
|
33
31
|
|
|
34
32
|
## Licensing
|
|
35
33
|
|
|
36
|
-
Copyright
|
|
34
|
+
Copyright 2024 SAP SE or an SAP affiliate company and cds-dbs contributors. Please see our [LICENSE](LICENSE) for copyright and license information. Detailed information including third-party components and their licensing/copyright information is available [via the REUSE tool](https://api.reuse.software/info/github.com/cap-js/cds-dbs).
|
package/lib/SQLiteService.js
CHANGED
|
@@ -217,10 +217,13 @@ class SQLiteService extends SQLService {
|
|
|
217
217
|
Timestamp: undefined,
|
|
218
218
|
// int64 is stored as native int64 for best comparison
|
|
219
219
|
// Reading int64 as string to not loose precision
|
|
220
|
-
Int64: expr => `CAST(${expr} as TEXT)
|
|
220
|
+
Int64: cds.env.features.ieee754compatible ? expr => `CAST(${expr} as TEXT)` : undefined,
|
|
221
221
|
// REVISIT: always cast to string in next major
|
|
222
222
|
// Reading decimal as string to not loose precision
|
|
223
|
-
Decimal: cds.env.features.
|
|
223
|
+
Decimal: cds.env.features.ieee754compatible ? (expr, elem) => elem?.scale
|
|
224
|
+
? `CASE WHEN ${expr} IS NULL THEN NULL ELSE format('%.${elem.scale}f', ${expr}) END`
|
|
225
|
+
: `CAST(${expr} as TEXT)`
|
|
226
|
+
: undefined,
|
|
224
227
|
// Binary is not allowed in json objects
|
|
225
228
|
Binary: expr => `${expr} || ''`,
|
|
226
229
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cap-js/sqlite",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.4",
|
|
4
4
|
"description": "CDS database service for SQLite",
|
|
5
5
|
"homepage": "https://github.com/cap-js/cds-dbs/tree/main/sqlite#cds-database-service-for-sqlite",
|
|
6
6
|
"repository": {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"CHANGELOG.md"
|
|
24
24
|
],
|
|
25
25
|
"scripts": {
|
|
26
|
-
"test": "
|
|
26
|
+
"test": "cds-test $(../test/find)"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@cap-js/db-service": "^1.9.0",
|