Skip to content

Conversation

@w3nl
Copy link
Owner

@w3nl w3nl commented Apr 3, 2025

Pull-Request Checklist

  • Code is up-to-date with the master branch
  • npm run format to apply prettier formatting
  • npm run test passes with this change
  • This pull request links relevant issues as Fixes #0000
  • There are new or updated unit tests validating the change
  • Documentation has been updated to reflect this change
  • The new commits follow conventions explained in CONTRIBUTING.md

alumni and others added 8 commits April 1, 2025 20:54
…11356)

* fix(sap): SAP HANA Cloud data types

* fix(sap): fall back to regular index when fulltext is not supported

* fix: remove dead code
* Add ExpoDriverFactory to create ExpoLegacyDriver

* Add driver for new Expo SQLite API

---------

Co-authored-by: Ruben Grimm <[email protected]>
Co-authored-by: Lucian Mocanu <[email protected]>
…11082)

* fix: resolve issues in insert query orUpdate method with postgres driver

This fix make use of table name alias in WHERE clause of onUpdate method with postgres driver to avoid throwing error

Closes: #11077

* test: update insert on conflict test

---------

Co-authored-by: Lucian Mocanu <[email protected]>
@w3nl w3nl requested a review from Copilot April 3, 2025 09:20
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR synchronizes changes from origin, updating various tests and driver implementations to improve compatibility and functionality. Key updates include refactored version checks in PostgreSQL and SAP drivers, revised query builder logic, and enhanced support for Expo and SAP HANA Cloud.

Reviewed Changes

Copilot reviewed 20 out of 21 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test/github-issues/9318/issue-9318.ts Reordered imports and updated driver version comparison using DriverUtils
test/functional/query-builder/insert-on-conflict/query-builder-insert-on-conflict.ts Switched test variable names from connections to dataSources and updated test descriptions
test/functional/database-schema/column-types/sap/column-types-sap.ts Adjusted column type assertions to reflect SAP HANA Cloud behavior
test/functional/database-schema/column-length/sap/column-length-sap.ts Corrected import order and updated entity import for SAP column length tests
test/functional/cube/postgres/cube-postgres.ts Updated Postgres version check using DriverUtils
src/query-builder/InsertQueryBuilder.ts Revised SQL query construction logic in the insert query builder
src/driver/sap/SapQueryRunner.ts Removed unnecessary charset/collation handling and adjusted fulltext index logic
src/driver/sap/SapDriver.ts Normalized deprecated/removed SAP data types and adjusted float conversion logic
src/driver/postgres/PostgresQueryRunner.ts Updated version query comments and logic for improved compatibility
src/driver/expo/legacy/ExpoLegacyQueryRunner.ts Added comprehensive transaction and query execution handling for Expo legacy driver
src/driver/expo/legacy/ExpoLegacyDriver.ts Provided proper disconnect and query runner creation for Expo legacy driver
src/driver/expo/ExpoQueryRunner.ts Reworked query execution to use async/await with prepared statements
src/driver/expo/ExpoDriverFactory.ts Introduced a factory to choose between Expo and Expo legacy drivers based on configuration
src/driver/expo/ExpoDriver.ts Updated connection creation and query runner instantiation for Expo driver
src/driver/DriverFactory.ts Revised Expo driver instantiation to use the new factory
docs/entities.md Updated documentation to include SAP column types and behavior notes
CHANGELOG.md Documented SAP changes and other bug fixes/features introduced in this release
.github/workflows/publish-package.yml Added workflow to publish package to npm on release events
Files not reviewed (1)
  • package.json: Language not supported
Comments suppressed due to low confidence (1)

src/query-builder/InsertQueryBuilder.ts:581

  • The removal of an appended whitespace (previously added via 'query += " "') could lead to SQL syntax errors if subsequent query parts are concatenated without proper separation. Please verify that the generated SQL query contains all necessary spaces between clauses.
query += updatePart.join(", ")

@coveralls
Copy link

Pull Request Test Coverage Report for Build 14239482233

Details

  • 28 of 170 (16.47%) changed or added relevant lines in 10 files are covered.
  • 4 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.1%) to 76.245%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/driver/DriverFactory.ts 1 2 50.0%
src/driver/expo/ExpoDriverFactory.ts 3 8 37.5%
src/driver/expo/ExpoDriver.ts 0 6 0.0%
src/driver/sap/SapDriver.ts 10 17 58.82%
src/driver/expo/legacy/ExpoLegacyDriver.ts 3 25 12.0%
src/driver/expo/ExpoQueryRunner.ts 0 27 0.0%
src/driver/expo/legacy/ExpoLegacyQueryRunner.ts 8 82 9.76%
Files with Coverage Reduction New Missed Lines %
src/driver/expo/ExpoQueryRunner.ts 1 14.58%
src/driver/expo/ExpoDriver.ts 3 21.43%
Totals Coverage Status
Change from base Build 14197578778: -0.1%
Covered Lines: 18706
Relevant Lines: 23831

💛 - Coveralls

dependabot bot and others added 2 commits April 3, 2025 19:37
Bumps [tar-fs](https://github.com/mafintosh/tar-fs) from 2.1.1 to 2.1.2.
- [Commits](mafintosh/tar-fs@v2.1.1...v2.1.2)

---
updated-dependencies:
- dependency-name: tar-fs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* feat: add new foreign key decorator, and entity schemas options

This new feature adds the ability to create foreign key constraints without entity relations, using `@ForeignKey()` decorator or entity schema options.

Closes: #4569
@w3nl w3nl merged commit d8515b8 into w3nl:master Apr 4, 2025
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.

8 participants