- 
 
- 
  Notifications
 You must be signed in to change notification settings 
- Fork 3.7k
Values clause support in HQL/Criteria #7067
 
 
 beikov
 
 
 
 started this conversation in
 Design Proposals
 
 -
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)* ')'
Beta Was this translation helpful? Give feedback.
All reactions
- 
 👍 1
Replies: 1 comment
-
Beta Was this translation helpful? Give feedback.
All reactions
 
 0 replies
 
 
 
 
 Sign up for free
 to join this conversation on GitHub.
 Already have an account?
 Sign in to comment