Skip to content

Commit 5f77cd6

Browse files
Merge branch 'main' into sqlite-compliance-tests
2 parents 4f57174 + 1b8b2d9 commit 5f77cd6

7 files changed

Lines changed: 13 additions & 260 deletions

File tree

.github/workflows/conventional-commits.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ jobs:
2525
types: |
2626
feat
2727
fix
28+
changed
2829
docs
2930
style
3031
refactor

CONTRIBUTING.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,9 @@ The prefix is used to calculate the semver release level, and the section of the
5656
| **type** | When to Use | Release Level | Release Note Section |
5757
| ---------- | ----------------------------------- | ------------- | -------------------- |
5858
| feat | A feature has been added | `minor` | **Added** |
59+
| changed | Changes to the dependencies | `minor` | **Changed** |
5960
| fix | A bug has been patched | `patch` | **Fixed** |
60-
| deps | Changes to the dependencies | `patch` | **Changed** |
61+
| deps | Changes to the dependencies | `patch` | **Changed** |
6162
| perf | Performance improvements | none | **Performance Improvements** |
6263
| chore | Any changes that aren't user-facing | none | none |
6364
| docs | Documentation updates | none | none |

db-service/lib/SQLService.js

Lines changed: 5 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -57,24 +57,18 @@ class SQLService extends DatabaseService {
5757
return super.init()
5858
}
5959

60-
_changeToStreams(columns, rows, one, compat) {
60+
_changeToStreams(columns, rows, one) {
6161
if (!rows || !columns) return
6262
if (!Array.isArray(rows)) rows = [rows]
63-
if (!rows.length || !Object.keys(rows[0]).length) return
64-
65-
// REVISIT: remove after removing stream_compat feature flag
66-
if (compat) {
67-
rows[0][Object.keys(rows[0])[0]] = this._stream(Object.values(rows[0])[0])
68-
return
69-
}
63+
if (!rows.length || !Object.keys(rows[0]).length) return
7064

7165
let changes = false
7266
for (let col of columns) {
7367
const name = col.as || col.ref?.[col.ref.length - 1] || (typeof col === 'string' && col)
7468
if (col.element?.isAssociation) {
75-
if (one) this._changeToStreams(col.SELECT.columns, rows[0][name], false, compat)
69+
if (one) this._changeToStreams(col.SELECT.columns, rows[0][name], false)
7670
else
77-
changes = rows.some(row => !this._changeToStreams(col.SELECT.columns, row[name], false, compat))
71+
changes = rows.some(row => !this._changeToStreams(col.SELECT.columns, row[name], false))
7872
} else if (col.element?.type === 'cds.LargeBinary') {
7973
changes = true
8074
if (one) rows[0][name] = this._stream(rows[0][name])
@@ -141,23 +135,7 @@ class SQLService extends DatabaseService {
141135
if (expand) rows = rows.map(r => (typeof r._json_ === 'string' ? JSON.parse(r._json_) : r._json_ || r))
142136

143137
if (!iterator) {
144-
// REVISIT: remove after removing stream_compat feature flag
145-
if (cds.env.features.stream_compat) {
146-
if (query._streaming) {
147-
if (!rows.length) return
148-
this._changeToStreams(cqn.SELECT.columns, rows, true, true)
149-
const result = rows[0]
150-
151-
// stream is always on position 0. Further properties like etag are inserted later.
152-
let [key, val] = Object.entries(result)[0]
153-
result.value = val
154-
delete result[key]
155-
156-
return result
157-
}
158-
} else {
159-
this._changeToStreams(cqn.SELECT.columns, rows, query.SELECT.one, false)
160-
}
138+
this._changeToStreams(cqn.SELECT.columns, rows, query.SELECT.one)
161139
} else if (objectMode) {
162140
const converter = (row) => this._changeToStreams(cqn.SELECT.columns, row, true)
163141
const changeToStreams = new Transform({

postgres/test/service-types.test.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ const { resolve } = require('path')
22
const cds = require('../../test/cds.js')
33
if (cds.env.fiori) cds.env.fiori.lean_draft = true
44
else cds.env.features.lean_draft = true
5-
// REVISIT: remove after streaming PR is merged in cds
6-
cds.env.features.stream_compat = true
75

86
const project = resolve(__dirname, 'beershop')
97

postgres/test/streaming.compat.test.js

Lines changed: 0 additions & 4 deletions
This file was deleted.

release-please-config.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@
2525
"type": "perf",
2626
"section": "Performance Improvements",
2727
"hidden": false
28+
},
29+
{
30+
"type": "changed",
31+
"section": "Changed",
32+
"hidden": false
2833
}
2934
]
3035
}

sqlite/test/general/stream.compat.test.js

Lines changed: 0 additions & 226 deletions
This file was deleted.

0 commit comments

Comments
 (0)