Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(sqlite): default [development] URL to :memory: #926

Merged
merged 1 commit into from
Dec 2, 2024

Conversation

swaldmann
Copy link
Contributor

@swaldmann swaldmann commented Dec 2, 2024

cds init bookshop && cd bookshop
cds env get requires.db

currently gives you

{
  impl: '@cap-js/sqlite',
  credentials: { url: 'db.sqlite', database: ':memory:' }, 💣 "url" and "database" don't match
  kind: 'sqlite'
}

There are a few ways to solve this but I think @cap-js/sqlite should determine itself that the default URL for [development] is :memory:, and not rely on the default defined in @sap/cds (see the _databases section in cds-requires.js), which it currently does.

This is a non-breaking change, as today the cds-provided url: ':memory:' wins, so even before we deployed to an in-memory DB by default. This just fixes a confusing log and prepares for the next major version, where we can then remove the redundant and outdated credentials.database.

@swaldmann swaldmann marked this pull request as ready for review December 2, 2024 14:41
@patricebender patricebender merged commit 51e8aa7 into main Dec 2, 2024
10 checks passed
@patricebender patricebender deleted the default-url branch December 2, 2024 15:13
@cap-bots cap-bots mentioned this pull request Dec 2, 2024
johannes-vogel added a commit that referenced this pull request Dec 17, 2024
🤖 I have created a release *beep* *boop*
---


<details><summary>db-service: 1.16.1</summary>

##
[1.16.1](db-service-v1.16.0...db-service-v1.16.1)
(2024-12-16)


### Fixed

* handle undefined DEBUG
([#942](#942))
([dd2da3a](dd2da3a)),
closes [#941](#941)
* only expand partial foreign key if explicitly requested
([#916](#916))
([96911ad](96911ad))
* quoted mode ([#937](#937))
([9e62b22](9e62b22))
* sort property is case insensitive
([#924](#924))
([2c72c87](2c72c87))
* wildcard expand with aggregation
([#923](#923))
([bbe7be0](bbe7be0))
</details>

<details><summary>sqlite: 1.7.8</summary>

##
[1.7.8](sqlite-v1.7.7...sqlite-v1.7.8)
(2024-12-16)


### Fixed

* default `[development]` URL to `:memory:`
([#926](#926))
([51e8aa7](51e8aa7))
</details>

<details><summary>postgres: 1.10.5</summary>

##
[1.10.5](postgres-v1.10.4...postgres-v1.10.5)
(2024-12-16)


### Fixed

* sort property is case insensitive
([#924](#924))
([2c72c87](2c72c87))
</details>

<details><summary>hana: 1.5.1</summary>

##
[1.5.1](hana-v1.5.0...hana-v1.5.1)
(2024-12-16)


### Fixed

* deep groupby ([#919](#919))
([ce24264](ce24264))
* expressions with not on HANA
([#925](#925))
([e67a31b](e67a31b))
* quoted mode ([#937](#937))
([9e62b22](9e62b22))
* sort property is case insensitive
([#924](#924))
([2c72c87](2c72c87))
* track expression type through expressions
([#950](#950))
([a083f74](a083f74))


### Performance Improvements

* Remove `$$RN$$` and additional sub selects
([#929](#929))
([b3743a1](b3743a1))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: Johannes Vogel <31311694+johannes-vogel@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants