Range types implemented
plus and minus infinity keyword tests implemented range table tests added skip cockroach db added select test case added for range fields generator modified to generate correct types generator tests modified to include sample range table model and template generators modified to support range fields returning the T in UPPER and LOWER functions raw ranges implemented bounds set as optional dep modified dependencies modified and issue fixed range expression with templates implemented rangeExpression change to make it more type safe third parameter of constructor function fixed literals removed, functions added tests modified constructor functions used for creating range expressions NumRange converted to a constructor function from literal range_lower and range_upper renamed to lower_bound and upper_bound range literal removed PlusInfinity and MinusInfinity implemented int4 and int8 castings added issues fixed and tests checked number, ts, tstz literal and cast implemented date range literal expression modified and raw function used parent type converted from RangeExpression to Expression range type implemented for postgres range column type, function and literal expression implemented CONTAINS and OVERLAP operations added for range expressions range expressions implemented
This commit is contained in:
parent
a9cbf94d68
commit
893567daca
20 changed files with 1062 additions and 19 deletions
|
|
@ -267,6 +267,18 @@ var TO_HEX = jet.TO_HEX
|
|||
|
||||
//----------Data Type Formatting Functions ----------------------//
|
||||
|
||||
// LOWER_BOUND returns range expressions lower bound
|
||||
func LOWER_BOUND[T Expression](expression jet.Range[T]) T {
|
||||
return jet.LOWER_BOUND[T](expression)
|
||||
}
|
||||
|
||||
// UPPER_BOUND returns range expressions upper bound
|
||||
func UPPER_BOUND[T Expression](expression jet.Range[T]) T {
|
||||
return jet.UPPER_BOUND[T](expression)
|
||||
}
|
||||
|
||||
//----------Data Type Formatting Functions ----------------------//
|
||||
|
||||
// TO_CHAR converts expression to string with format
|
||||
var TO_CHAR = jet.TO_CHAR
|
||||
|
||||
|
|
@ -421,3 +433,18 @@ var CUBE = jet.CUBE
|
|||
// It can be also used with multiple parameters to check if a set of columns is included in the current grouping set. The result
|
||||
// of the GROUPING function would then be an integer bit mask having 1’s for the arguments which have GROUPING(argument) as 1.
|
||||
var GROUPING = jet.GROUPING
|
||||
|
||||
var (
|
||||
// DATE_RANGE constructor function to create a date range
|
||||
DATE_RANGE = jet.DateRange
|
||||
// NUM_Range constructor function to create a numeric range
|
||||
NUM_Range = jet.NumRange
|
||||
// TIMESTAMP_RANGE constructor function to create a timestamp range
|
||||
TIMESTAMP_RANGE = jet.TimestampRange
|
||||
// TIMESTAMPTZ_RANGE constructor function to create a timestampz range
|
||||
TIMESTAMPTZ_RANGE = jet.TimestampzRange
|
||||
// INT4_RANGE constructor function to create a int4 range
|
||||
INT4_RANGE = jet.Int4Range
|
||||
// INT8_RANGE constructor function to create a int8 range
|
||||
INT8_RANGE = jet.Int8Range
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue