Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Values clause support in HQL/Criteria #7067

beikov started this conversation in Design Proposals
Discussion options

Currently we only support the VALUES clause in insert statements, but it might be nice to support this anywhere in HQL where a subquery from clause item is allowed. Use cases range from emulating generate_series up to some reporting where people want to join fixed values like e.g. time periods against aggregated data. I propose the following syntax:

values_from_item
 : '(' VALUES values_item ( ',' values_item )* ')' (AS? alias column_aliases?)?
 ;
values_item : '(' expression ( ',' expression )* ')' ;
value_count : INTEGER;
column_aliases : '(' identifier (',' identifier)* ')'
You must be logged in to vote

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants

AltStyle によって変換されたページ (->オリジナル) /