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

feat: support current_utctimestamp #865

Merged
merged 16 commits into from
Nov 22, 2024
Merged

Conversation

johannes-vogel
Copy link
Contributor

@johannes-vogel johannes-vogel commented Oct 24, 2024

works locally with SAP HANA Cloud but does not work with HXE

@johannes-vogel johannes-vogel marked this pull request as ready for review November 21, 2024 14:44
@johannes-vogel johannes-vogel added the next release pr to be checked for next release label Nov 22, 2024
@@ -0,0 +1,50 @@
const cds = require('../../test/cds')
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we add this function definition into the other databases?
Then the test can be move here:

describe('CURRENT_UTCTIME', () => {
test.skip('missing', () => {
throw new Error('not supported')
})
})
describe('CURRENT_UTCTIMESTAMP', () => {
test.skip('missing', () => {
throw new Error('not supported')
})
})

Copy link
Contributor Author

@johannes-vogel johannes-vogel Nov 22, 2024

Choose a reason for hiding this comment

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

I initially started there but the other databases don't support the argument, I could also split: noargs in compliance and args in hana native section.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

#909 but I don't like the different behavior on the dbs

Copy link
Contributor

Choose a reason for hiding this comment

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

It is a good finding that the databases have different response formats. The purpose of the cal-functions is to define them in a way that they response in the correct format. Most likely adding a cast or element to the original func can apply the correct output converter for each database.

@johannes-vogel johannes-vogel enabled auto-merge (squash) November 22, 2024 12:23
@johannes-vogel johannes-vogel merged commit aaf39ad into main Nov 22, 2024
3 of 4 checks passed
@johannes-vogel johannes-vogel deleted the johannes-vogel-patch-2 branch November 22, 2024 12:31
@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]>
This was referenced Mar 4, 2025
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