Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@cap-js/sqlite

cap-js598.3kSEE LICENSE1.11.0

CDS database service for SQLite

CAP, CDS, SQLite

readme

CDS database service for SQLite

Welcome to the SQLite database service for SAP Cloud Application Programming Model Node.js, based on streamlined database architecture and better-sqlite driver.

Setup

If you want to use SQLite for development, all you need to do is to install the database package, as follows

npm add @cap-js/sqlite -D

Learn more about setup and usage in the respective database guide.

Support

This project is open to feature requests/suggestions, bug reports etc. via GitHub issues.

Contribution

Contribution and feedback are encouraged and always welcome. For more information about how to contribute, the project structure, as well as additional contribution information, see our Contribution Guidelines.

Versioning

This library follows Semantic Versioning. All notable changes are documented in CHANGELOG.md.

Code of Conduct

We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone. By participating in this project, you agree to abide by its Code of Conduct at all times.

Licensing

Copyright 2024 SAP SE or an SAP affiliate company and cds-dbs contributors. Please see our LICENSE for copyright and license information. Detailed information including third-party components and their licensing/copyright information is available via the REUSE tool.

changelog

Changelog

1.11.0 (2025-04-17)

Added

1.10.0 (2025-03-31)

Added

1.9.0 (2025-03-04)

Added

  • pass through of arbitrary client options (#1024) (b090ccd)

1.8.0 (2025-01-28)

Added

1.7.8 (2024-12-16)

Fixed

  • default [development] URL to :memory: (#926) (51e8aa7)

1.7.7 (2024-11-14)

Fixed

1.7.6 (2024-10-30)

Fixed

  • increase min version cap-js/db-service (#876) (e20eef8)

1.7.5 (2024-10-28)

Fixed

  • properly support default, cds.on.insert and cds.on.update for UPSERT queries (#425) (338e9f5)

1.7.4 (2024-10-15)

Fixed

  • enforce db file to be existent before server start (#742) (64a9018)
  • Improved behavioral consistency between the database services (#837) (b6f7187)

1.7.3 (2024-07-09)

Fixed

  • expand reach of cds.features.ieee754compatible to int64 (#722) (7eef5e9)

1.7.2 (2024-06-19)

Fixed

  • deps: update dependency better-sqlite3 to v11 (#669) (7167ec5)

1.7.1 (2024-05-16)

Fixed

  • deps: update dependency better-sqlite3 to v10 (#636) (0cc60e7)

1.7.0 (2024-05-08)

Added

  • select decimals as strings if cds.env.features.string_decimals (#616) (39addbf)

Fixed

  • Change sql property to query for errors (#611) (585577a)
  • Improved placeholders and limit clause (#567) (d5d5dbb)

1.6.0 (2024-03-22)

Added

  • forUpdate and forShareLock (#148) (99a1170)
  • hana: drop prepared statements after end of transaction (#537) (b1f864e)

Fixed

  • sqlite: use keyword list from compiler (#526) (a227c61)

Changed

  • this package now requires @cap-js/db-service >= v1.7.0 (#545) (2cec27d)

1.5.1 (2024-02-16)

Fixed

  • sqlite: Retain Error object for unique constraint violation (#446) (d27ee79)

1.5.0 (2024-02-02)

Added

  • SELECT returns LargeBinaries as streams unless feature flag "stream_compat" is set (#251) (8165a4a)
  • Support Readable Streams inside INSERT.entries (#343) (f6faf89)

Fixed

1.4.0 (2023-11-20)

Added

  • temporal data: add time slice key to conflict clause (#249) (67b8edf)

Fixed

Changed

1.3.1 (2023-10-10)

Changed

  • Updated minimum required version of @cap-js/db-service.

Version 1.3.0 - 2023-10-06

Fixed

  • CURRENT_TIMESTAMP in view definition preserves the timezone. #254

Version 1.2.1 - 2023-09-08

Fixed

  • Adapt implementation to comply with implication of SQLite version 3.43 which is included in `better-sqlite3@8.6.0`. #210

Version 1.2.0 - 2023-09-06

Changed

  • cds.Decimal and cds.Float return numbers instead of strings

Version 1.1.0 - 2023-08-01

Changed

  • Updated minimum required version of @cap-js/db-service.

Version 1.0.1 - 2023-07-03

Changed

  • Updated minimum required version of @cap-js/db-service

Version 1.0.0 - 2023-06-23

  • First official release

Version 0.2.0 - 2023-05-03

  • Continuous improvements

Version 0.1.0 - 2023-04-04

  • Initial release