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: add types for cds.ql.SELECT.hints() #408

Merged
merged 3 commits into from
Feb 13, 2025
Merged

feat: add types for cds.ql.SELECT.hints() #408

merged 3 commits into from
Feb 13, 2025

Conversation

schwma
Copy link
Member

@schwma schwma commented Feb 13, 2025

part of cdsnode/issues/2186

see docs: cap-js/docs#1619

@daogrady
Copy link
Contributor

Hi Marcel,

thanks for the contribution, looks pretty good! Can hints be any arbitrary string, or do we have a list of valid values (IGNORE_PLAN_CACHE, ...) that can be passed into this parameter?

Best,
Daniel

@schwma
Copy link
Member Author

schwma commented Feb 13, 2025

Hi @daogrady,

No, we do not have a list of valid hint strings. Any arbitrary string can be passed as an argument.

Best regards,
Marcel

@schwma schwma merged commit e5a7853 into main Feb 13, 2025
10 checks passed
@schwma schwma deleted the cds.ql.SELECT.hints branch February 13, 2025 09:32
@johannes-vogel
Copy link
Contributor

@daogrady
Copy link
Contributor

If it really is restricted to a fixed list of strings, even if that list is in flux, then I'd be in favour of explicitly listing these strings. Maybe another package provides them already, or we can automatically keep the list up to date.

If, of course, users can define arbitrary flags they can come up with in their personal project, then string is absolutely fine.

@johannes-vogel
Copy link
Contributor

The strings are dynamic e. g. CALL P1() WITH HINT( ROUTE_BY_CARDINALITY(T1,T2,T3)); while T1,T2,T3 refer to tables

@daogrady
Copy link
Contributor

daogrady commented Feb 13, 2025

That can also be expressed, but I guess it strongly depends on much auto-completion/ type safety we want to provide the users with at this particular point. Ultimately you (as in: "the runtime team") have to make that call. 🙂

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.

3 participants