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: wrap values in array if it is object, so it can be spreaded #882

Merged
merged 15 commits into from
Nov 22, 2024

Conversation

SamuelBrucksch
Copy link
Contributor

@SamuelBrucksch SamuelBrucksch commented Nov 5, 2024

A query with no properties remaining caused a TypeError earlier, as we try to destructure an object:

Uncaught TypeError: Found non-callable @@iterator

So if it is wrapped as array, the TypeError does not exist anymore.

@SamuelBrucksch SamuelBrucksch changed the title fix: wrap vars in array so it behaves as expected from values fix: wrap values in array, so it can be spreaded Nov 5, 2024
@SamuelBrucksch SamuelBrucksch changed the title fix: wrap values in array, so it can be spreaded fix: wrap values in array if it is object, so it can be spreaded Nov 5, 2024
db-service/lib/cqn2sql.js Outdated Show resolved Hide resolved
db-service/lib/cqn2sql.js Outdated Show resolved Hide resolved
@SamuelBrucksch SamuelBrucksch marked this pull request as ready for review November 12, 2024 11:51
@SamuelBrucksch SamuelBrucksch enabled auto-merge (squash) November 12, 2024 12:16
@johannes-vogel johannes-vogel added the next release pr to be checked for next release label Nov 22, 2024
@SamuelBrucksch SamuelBrucksch merged commit 11f3e8b into main Nov 22, 2024
3 checks passed
@SamuelBrucksch SamuelBrucksch deleted the fix-typeerror-values branch November 22, 2024 13:15
@cap-bots cap-bots mentioned this pull request Nov 22, 2024
johannes-vogel added a commit that referenced this pull request Nov 25, 2024
🤖 I have created a release *beep* *boop*
---


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

##
[1.16.0](db-service-v1.15.1...db-service-v1.16.0)
(2024-11-25)


### Changed

* single column in `search` function is also treated as CQN `list`
([#898](#898))
([f6593e6](f6593e6))


### Fixed

* foreignKeys aspect on association may not be set
([#903](#903))
([732a2f3](732a2f3))
* insert on uuid with default value
([#911](#911))
([545e489](545e489))
* `session_context`, `current_date`, `current_time` and
`current_timestamp` are treated as SAP HANA functions and are callable
in upper case ([#910](#910))
([50ebd10](50ebd10))
* wrap values in array if it is object, so it can be spreaded
([#882](#882))
([11f3e8b](11f3e8b))
</details>

<details><summary>hana: 1.5.0</summary>

##
[1.5.0](hana-v1.4.1...hana-v1.5.0)
(2024-11-25)


### Added

* config options for fuzzy search
([#898](#898))
([f6593e6](f6593e6))
* support current_utctimestamp
([#865](#865))
([aaf39ad](aaf39ad))


### Fixed

* `current_date`, `current_time`, `current_timestamp` and
`current_utctimestamp` are SAP HANA functions and are callable in upper
case ([#910](#910))
([50ebd10](50ebd10))
</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 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
next release pr to be checked for next release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants