@cap-js/postgres 1.9.1 → 1.10.0
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 +7 -0
- package/README.md +5 -5
- package/cds-plugin.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,13 @@
|
|
|
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.10.0](https://github.com/cap-js/cds-dbs/compare/postgres-v1.9.1...postgres-v1.10.0) (2024-07-25)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
* build script generates cds8 dependency in deployer app ([#758](https://github.com/cap-js/cds-dbs/issues/758)) ([5c21a67](https://github.com/cap-js/cds-dbs/commit/5c21a6758ccc927cde857e98145c3f4393deb739))
|
|
13
|
+
|
|
7
14
|
## [1.9.1](https://github.com/cap-js/cds-dbs/compare/postgres-v1.9.0...postgres-v1.9.1) (2024-07-09)
|
|
8
15
|
|
|
9
16
|
|
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# CDS database service for Postgres
|
|
2
2
|
|
|
3
|
-
Welcome to the
|
|
3
|
+
Welcome to the PostgreSQL database service for [SAP Cloud Application Programming Model](https://cap.cloud.sap) Node.js, based on streamlined database architecture and [*pg* driver](https://www.npmjs.com/package/pg) .
|
|
4
4
|
|
|
5
5
|
## Setup
|
|
6
6
|
|
|
7
|
-
In general, all you need to do is to install
|
|
7
|
+
In general, all you need to do is to install the database package, as follows:
|
|
8
8
|
|
|
9
9
|
```sh
|
|
10
10
|
npm add @cap-js/postgres
|
|
@@ -38,7 +38,7 @@ Copyright 2023 SAP SE or an SAP affiliate company and cds-dbs contributors. Plea
|
|
|
38
38
|
`@cap-js/postgres` works as a drop-in replacement for `cds-pg`.
|
|
39
39
|
However, some preliminary checks and cleanups help:
|
|
40
40
|
|
|
41
|
-
- for using the BTP Postgres Hyperscaler as database,
|
|
41
|
+
- for using the BTP Postgres Hyperscaler as database,
|
|
42
42
|
- know that the credentials are picked up automatically by from the enviornment (`VCAP_SERVICES.postgres`)
|
|
43
43
|
- the service binding label is `postgresql-db`
|
|
44
44
|
- `cds-dbm` is replaced by a hand-crafted "db-deployer" app → see below
|
|
@@ -134,11 +134,11 @@ now, re-use the CDS definitions: `SELECT.from(Beers).columns('brewery_ID').group
|
|
|
134
134
|
|
|
135
135
|
So please adjust your `CQL` statements accordingly.
|
|
136
136
|
|
|
137
|
-
### timezones (potential
|
|
137
|
+
### timezones (potential **BREAKING CHANGE**)
|
|
138
138
|
|
|
139
139
|
any date- + time-type will get stored in [`UTC`](https://en.wikipedia.org/wiki/Coordinated_Universal_Time) **without any timezone identifier in the actual data field**.
|
|
140
140
|
CAP's inbound- and outbound adapters take care of converting incoming and outgoing data from/to the desired time zones.
|
|
141
|
-
So when a `
|
|
141
|
+
So when a `datetime` comes in being in [an ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) compatible format
|
|
142
142
|
`2009-01-01T15:00:00+01:00` (15:00:00 on January 1 2009 in Vienna (CEST))
|
|
143
143
|
will get stored as
|
|
144
144
|
`2009-01-01T13:00:00` (13:00:00 on January 1 2009 in UTC).
|
package/cds-plugin.js
CHANGED
|
@@ -27,7 +27,7 @@ cds.build?.register?.('postgres', class PostgresBuildPlugin extends cds.build.Pl
|
|
|
27
27
|
} else {
|
|
28
28
|
promises.push(
|
|
29
29
|
this.write({
|
|
30
|
-
dependencies: { '@sap/cds': '^
|
|
30
|
+
dependencies: { '@sap/cds': '^8', '@cap-js/postgres': '^1' },
|
|
31
31
|
scripts: { start: 'cds-deploy' },
|
|
32
32
|
}).to('package.json'),
|
|
33
33
|
)
|
package/package.json
CHANGED