Documentation
¶
Overview ¶
Package expr provides thin, typed SQL expressions in explicit source scopes. Example: expr.At(rows.Scope(members), orm.TextExpr(Members.Name)).
Index ¶
- func Filter[S any, A FilterableAggregate[S, A]](a A, predicates ...Predicate[S]) A
- func FoundryAggregate[S, V any](a AggregateExpression[S, V], seal sqlowner.ExpressionSeal) (ormcore.Expression, ormcore.Column[V])
- func FoundryExpression[S, V, P any](e Expression[S, V, P], seal sqlowner.ExpressionSeal) ormcore.Expression
- func FoundryGroup[S any](key GroupKey[S], seal sqlowner.ExpressionSeal) ormcore.Expression
- func FoundryHaving[S any](p HavingPredicate[S], seal sqlowner.ExpressionSeal) ormcore.Predicate
- func FoundryKey[S any](key ProjectionKey[S], seal sqlowner.ExpressionSeal) ormcore.Expression
- func FoundryNullableScopeData[S, M any](scope NullableScope[S, M], seal sqlowner.ExpressionSeal) ormcore.Scope
- func FoundryOrder[S any](o Order[S], seal sqlowner.ExpressionSeal) ormcore.Order
- func FoundryPredicate[S any](p Predicate[S], seal sqlowner.ExpressionSeal) ormcore.Predicate
- func FoundryProjectionOrder[S any](order ProjectionOrder[S], seal sqlowner.ExpressionSeal) ormcore.Order
- func FoundryRowValue[S, V any](e RowValue[S, V], seal sqlowner.ExpressionSeal) ormcore.Expression
- func FoundryScopeData[S, M any](s Scope[S, M], seal sqlowner.ExpressionSeal) ormcore.Scope
- func FoundrySelected[S, V any](e Selected[S, V], seal sqlowner.ExpressionSeal) ormcore.Expression
- func FoundrySelectedColumn[S, V any](e Selected[S, V], seal sqlowner.ExpressionSeal) ormcore.Column[V]
- func OrderBy[M any](q orm.Query[M], orders ...Order[M]) orm.Query[M]
- func Related[M, N, V any](source orm.AggregateSource[M, N], computation AggregateExpression[N, V]) orm.AggregateRelation[M, V]
- func RelationFilter[M, N any](r orm.ExistenceRelation[M, N], p Predicate[N]) orm.Predicate[N]
- func RelationOrder[M, N any](r orm.ExistenceRelation[M, N], o Order[N]) orm.Order[N]
- func RelationPivotOrder[M, N, P any](r orm.ThroughRelation[M, N, P], o Order[P]) orm.Order[P]
- func Where[M any](q orm.Query[M], predicates ...Predicate[M]) orm.Query[M]
- type Aggregate
- type AggregateExpression
- type Case
- type CompareFilterAdapter
- type DateUnit
- type Expression
- func At[S, M, V, P any](scope Scope[S, M], column orm.ExpressionColumn[M, V, P]) Expression[S, V, P]
- func AtNullable[S, M, V any](scope NullableScope[S, M], column orm.ExpressionColumn[M, V, V]) Expression[S, V, value.Nullable[V]]
- func AtNullableValue[S, M, V any](scope NullableScope[S, M], ...) Expression[S, V, value.Nullable[V]]
- func Value[M, V, P any](column orm.ExpressionColumn[M, V, P]) Expression[M, V, P]
- type FilterableAggregate
- type FrameBoundary
- type FrameOffset
- type FramePosition
- type GeographicPoint
- type GroupKey
- type HavingPredicate
- func DistinctFromValue[S any, V any](left, right Selected[S, V]) HavingPredicate[S]
- func EqValue[S, V any](source ValueOperand[S, V], v V) HavingPredicate[S]
- func EqualValue[S any, V any](left, right Selected[S, V]) HavingPredicate[S]
- func GreaterNullableValue[S any, V orderedScalar](left, right Selected[S, value.Nullable[V]]) HavingPredicate[S]
- func GreaterOrEqualNullableValue[S any, V orderedScalar](left, right Selected[S, value.Nullable[V]]) HavingPredicate[S]
- func GreaterOrEqualValue[S any, V orderedScalar](left, right Selected[S, V]) HavingPredicate[S]
- func GreaterValue[S any, V orderedScalar](left, right Selected[S, V]) HavingPredicate[S]
- func Grouped[S any](condition Predicate[S]) HavingPredicate[S]
- func GtValue[S, V any](source OrderedValueOperand[S, V], v V) HavingPredicate[S]
- func GteValue[S, V any](source OrderedValueOperand[S, V], v V) HavingPredicate[S]
- func HavingAnd[S any](predicates ...HavingPredicate[S]) HavingPredicate[S]
- func HavingNot[S any](p HavingPredicate[S]) HavingPredicate[S]
- func HavingOr[S any](predicates ...HavingPredicate[S]) HavingPredicate[S]
- func InValue[S, V any](source ValueOperand[S, V], vs ...V) HavingPredicate[S]
- func IsNotNullValue[S, V any](source NullValueOperand[S, V]) HavingPredicate[S]
- func IsNullValue[S, V any](source NullValueOperand[S, V]) HavingPredicate[S]
- func LessNullableValue[S any, V orderedScalar](left, right Selected[S, value.Nullable[V]]) HavingPredicate[S]
- func LessOrEqualNullableValue[S any, V orderedScalar](left, right Selected[S, value.Nullable[V]]) HavingPredicate[S]
- func LessOrEqualValue[S any, V orderedScalar](left, right Selected[S, V]) HavingPredicate[S]
- func LessValue[S any, V orderedScalar](left, right Selected[S, V]) HavingPredicate[S]
- func LikeNullableValue[S any, V ~string](left, right Selected[S, value.Nullable[V]]) HavingPredicate[S]
- func LikeValue[S any, V ~string](left, right Selected[S, V]) HavingPredicate[S]
- func LtValue[S, V any](source OrderedValueOperand[S, V], v V) HavingPredicate[S]
- func LteValue[S, V any](source OrderedValueOperand[S, V], v V) HavingPredicate[S]
- func NeValue[S, V any](source ValueOperand[S, V], v V) HavingPredicate[S]
- func NotDistinctFromValue[S any, V any](left, right Selected[S, V]) HavingPredicate[S]
- func NotEqualValue[S any, V any](left, right Selected[S, V]) HavingPredicate[S]
- func TextContainsValue[S any, V ~string](source TextValueOperand[S, V], v V) HavingPredicate[S]
- func TextEndsWithValue[S any, V ~string](source TextValueOperand[S, V], v V) HavingPredicate[S]
- func TextIContainsValue[S any, V ~string](source TextValueOperand[S, V], v V) HavingPredicate[S]
- func TextIEndsWithValue[S any, V ~string](source TextValueOperand[S, V], v V) HavingPredicate[S]
- func TextILikeValue[S any, V ~string](source TextValueOperand[S, V], v V) HavingPredicate[S]
- func TextIStartsWithValue[S any, V ~string](source TextValueOperand[S, V], v V) HavingPredicate[S]
- func TextLikeValue[S any, V ~string](source TextValueOperand[S, V], v V) HavingPredicate[S]
- func TextStartsWithValue[S any, V ~string](source TextValueOperand[S, V], v V) HavingPredicate[S]
- type JSONField
- type JSONFixedArray
- type JSONPath
- func JSONArrayElement[S, P, V any](parent JSONPath[S, P], array JSONFixedArray[P, V], index int32) JSONPath[S, V]
- func JSONDocument[S, P any](path JSONPath[S, value.JSON[P]]) JSONPath[S, P]
- func JSONIndex[S any, P ~[]V, V any](parent JSONPath[S, P], index int32) JSONPath[S, V]
- func JSONMapKey[S any, P ~map[K]V, K comparable, V any](parent JSONPath[S, P], key K) JSONPath[S, V]
- func JSONNullable[S, P any](path JSONPath[S, value.Nullable[P]]) JSONPath[S, P]
- func JSONNullableRoot[S, P any](input RowValue[S, value.Nullable[value.JSON[P]]]) JSONPath[S, P]
- func JSONOptional[S, P any](path JSONPath[S, value.Optional[P]]) JSONPath[S, P]
- func JSONPointer[S, P any](path JSONPath[S, *P]) JSONPath[S, P]
- func JSONProperty[S, P, V any](parent JSONPath[S, P], field JSONField[P, V]) JSONPath[S, V]
- func JSONRoot[S, P any](input RowValue[S, value.JSON[P]]) JSONPath[S, P]
- type LocalResolution
- type NullValueOperand
- type NullableCompareFilterAdapter
- func (a NullableCompareFilterAdapter[S, V]) Eq(v V) Predicate[S]
- func (a NullableCompareFilterAdapter[S, V]) In(vs ...V) Predicate[S]
- func (a NullableCompareFilterAdapter[S, V]) IsNotNull() Predicate[S]
- func (a NullableCompareFilterAdapter[S, V]) IsNull() Predicate[S]
- func (a NullableCompareFilterAdapter[S, V]) Ne(v V) Predicate[S]
- type NullableOrderFilterAdapter
- func (a NullableOrderFilterAdapter[S, V]) Eq(v V) Predicate[S]
- func (a NullableOrderFilterAdapter[S, V]) Gt(v V) Predicate[S]
- func (a NullableOrderFilterAdapter[S, V]) Gte(v V) Predicate[S]
- func (a NullableOrderFilterAdapter[S, V]) In(vs ...V) Predicate[S]
- func (a NullableOrderFilterAdapter[S, V]) IsNotNull() Predicate[S]
- func (a NullableOrderFilterAdapter[S, V]) IsNull() Predicate[S]
- func (a NullableOrderFilterAdapter[S, V]) Lt(v V) Predicate[S]
- func (a NullableOrderFilterAdapter[S, V]) Lte(v V) Predicate[S]
- func (a NullableOrderFilterAdapter[S, V]) Ne(v V) Predicate[S]
- type NullableOrderValueFilterAdapter
- func (a NullableOrderValueFilterAdapter[S, V]) Eq(v V) HavingPredicate[S]
- func (a NullableOrderValueFilterAdapter[S, V]) Gt(v V) HavingPredicate[S]
- func (a NullableOrderValueFilterAdapter[S, V]) Gte(v V) HavingPredicate[S]
- func (a NullableOrderValueFilterAdapter[S, V]) In(vs ...V) HavingPredicate[S]
- func (a NullableOrderValueFilterAdapter[S, V]) IsNotNull() HavingPredicate[S]
- func (a NullableOrderValueFilterAdapter[S, V]) IsNull() HavingPredicate[S]
- func (a NullableOrderValueFilterAdapter[S, V]) Lt(v V) HavingPredicate[S]
- func (a NullableOrderValueFilterAdapter[S, V]) Lte(v V) HavingPredicate[S]
- func (a NullableOrderValueFilterAdapter[S, V]) Ne(v V) HavingPredicate[S]
- type NullableOrderedAggregate
- func Avg[S any, V interface{ ... }, P any, C orderedColumn[S, V, P]](column C) NullableOrderedAggregate[S, decimal.Decimal]
- func AvgAt[S, M any, V interface{ ... }, P any, C orderedColumn[M, V, P]](scope Scope[S, M], column C) NullableOrderedAggregate[S, decimal.Decimal]
- func AvgFloat[S any, V interface{ ... }, P any, C orderedColumn[S, V, P]](column C) NullableOrderedAggregate[S, float64]
- func AvgFloatAt[S, M any, V interface{ ... }, P any, C orderedColumn[M, V, P]](scope Scope[S, M], column C) NullableOrderedAggregate[S, float64]
- func AvgFloatNullableRow[S any, V interface{ ... }](input RowExpression[S, value.Nullable[V]]) NullableOrderedAggregate[S, float64]
- func AvgFloatRow[S any, V interface{ ... }](input RowExpression[S, V]) NullableOrderedAggregate[S, float64]
- func AvgInterval[S, P any, C orderedColumn[S, temporal.Interval, P]](column C) NullableOrderedAggregate[S, temporal.Interval]
- func AvgIntervalAt[S, M, P any, C orderedColumn[M, temporal.Interval, P]](scope Scope[S, M], column C) NullableOrderedAggregate[S, temporal.Interval]
- func AvgIntervalNullableRow[S any, V temporal.Interval](input RowExpression[S, value.Nullable[V]]) NullableOrderedAggregate[S, temporal.Interval]
- func AvgIntervalRow[S any, V temporal.Interval](input RowExpression[S, V]) NullableOrderedAggregate[S, temporal.Interval]
- func AvgNullableRow[S any, V exactNumber](input RowExpression[S, value.Nullable[V]]) NullableOrderedAggregate[S, decimal.Decimal]
- func AvgRow[S any, V exactNumber](input RowExpression[S, V]) NullableOrderedAggregate[S, decimal.Decimal]
- func Max[S any, V orderedScalar, P any, C orderedColumn[S, V, P]](column C) NullableOrderedAggregate[S, V]
- func MaxAt[S, M any, V orderedScalar, P any, C orderedColumn[M, V, P]](scope Scope[S, M], column C) NullableOrderedAggregate[S, V]
- func MaxNullableRow[S any, V orderedScalar](input RowExpression[S, value.Nullable[V]]) NullableOrderedAggregate[S, V]
- func MaxRow[S any, V orderedScalar](input RowExpression[S, V]) NullableOrderedAggregate[S, V]
- func Min[S any, V orderedScalar, P any, C orderedColumn[S, V, P]](column C) NullableOrderedAggregate[S, V]
- func MinAt[S, M any, V orderedScalar, P any, C orderedColumn[M, V, P]](scope Scope[S, M], column C) NullableOrderedAggregate[S, V]
- func MinNullableRow[S any, V orderedScalar](input RowExpression[S, value.Nullable[V]]) NullableOrderedAggregate[S, V]
- func MinRow[S any, V orderedScalar](input RowExpression[S, V]) NullableOrderedAggregate[S, V]
- func Sum[S any, V interface{ ... }, P any, C orderedColumn[S, V, P]](column C) NullableOrderedAggregate[S, decimal.Decimal]
- func SumAt[S, M any, V interface{ ... }, P any, C orderedColumn[M, V, P]](scope Scope[S, M], column C) NullableOrderedAggregate[S, decimal.Decimal]
- func SumFloat[S any, V interface{ ... }, P any, C orderedColumn[S, V, P]](column C) NullableOrderedAggregate[S, float64]
- func SumFloatAt[S, M any, V interface{ ... }, P any, C orderedColumn[M, V, P]](scope Scope[S, M], column C) NullableOrderedAggregate[S, float64]
- func SumFloatNullableRow[S any, V interface{ ... }](input RowExpression[S, value.Nullable[V]]) NullableOrderedAggregate[S, float64]
- func SumFloatRow[S any, V interface{ ... }](input RowExpression[S, V]) NullableOrderedAggregate[S, float64]
- func SumInterval[S, P any, C orderedColumn[S, temporal.Interval, P]](column C) NullableOrderedAggregate[S, temporal.Interval]
- func SumIntervalAt[S, M, P any, C orderedColumn[M, temporal.Interval, P]](scope Scope[S, M], column C) NullableOrderedAggregate[S, temporal.Interval]
- func SumIntervalNullableRow[S any, V temporal.Interval](input RowExpression[S, value.Nullable[V]]) NullableOrderedAggregate[S, temporal.Interval]
- func SumIntervalRow[S any, V temporal.Interval](input RowExpression[S, V]) NullableOrderedAggregate[S, temporal.Interval]
- func SumNullableRow[S any, V exactNumber](input RowExpression[S, value.Nullable[V]]) NullableOrderedAggregate[S, decimal.Decimal]
- func SumRow[S any, V exactNumber](input RowExpression[S, V]) NullableOrderedAggregate[S, decimal.Decimal]
- type NullableOrderedRowExpression
- func AbsNullable[S any, V numericValue](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, V]
- func AddClockElapsedNullable[S any](input RowValue[S, value.Nullable[temporal.Time]], duration time.Duration) NullableOrderedRowExpression[S, temporal.Time]
- func AddDateDaysNullable[S any](input RowValue[S, value.Nullable[temporal.Date]], days int32) NullableOrderedRowExpression[S, temporal.Date]
- func AddDateIntervalNullable[S any](input RowValue[S, value.Nullable[temporal.Date]], interval temporal.Interval) NullableOrderedRowExpression[S, temporal.LocalDateTime]
- func AddInstantIntervalNullable[S any, V instantValue](input RowValue[S, value.Nullable[V]], interval temporal.Interval, ...) NullableOrderedRowExpression[S, V]
- func AddIntervalsNullable[S any](left RowValue[S, value.Nullable[temporal.Interval]], ...) NullableOrderedRowExpression[S, temporal.Interval]
- func AddLocalIntervalNullable[S any](input RowValue[S, value.Nullable[temporal.LocalDateTime]], ...) NullableOrderedRowExpression[S, temporal.LocalDateTime]
- func AddNullable[S any, V numericValue](left, right RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, V]
- func CenturyNullable[S any, V calendarValue](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, int64]
- func ClockDifferenceNullable[S any](left RowValue[S, value.Nullable[temporal.Time]], ...) NullableOrderedRowExpression[S, temporal.Interval]
- func CombineDateTimeNullable[S any](date RowValue[S, value.Nullable[temporal.Date]], ...) NullableOrderedRowExpression[S, temporal.LocalDateTime]
- func DateDifferenceNullable[S any](left RowValue[S, value.Nullable[temporal.Date]], ...) NullableOrderedRowExpression[S, int64]
- func DateOfNullable[S any](input RowValue[S, value.Nullable[temporal.LocalDateTime]]) NullableOrderedRowExpression[S, temporal.Date]
- func DayNullable[S any, V calendarValue](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, int64]
- func DayOfWeekNullable[S any, V calendarValue](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, int64]
- func DayOfYearNullable[S any, V calendarValue](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, int64]
- func DecadeNullable[S any, V calendarValue](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, int64]
- func DecimalNullable[S any, V exactNumber](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, decimal.Decimal]
- func DivideNullable[S any, V numericValue](left, right RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, V]
- func FloatNullable[S any, V numericValue](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, float64]
- func FromUnixMillisNullable[S any, V integerNumber](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, temporal.DateTime]
- func HourNullable[S any, V clockValue](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, int64]
- func ISODayOfWeekNullable[S any, V calendarValue](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, int64]
- func ISOWeekNullable[S any, V calendarValue](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, int64]
- func ISOYearNullable[S any, V calendarValue](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, int64]
- func InstantDifferenceNullable[S any, L, R instantValue](left RowValue[S, value.Nullable[L]], right RowValue[S, value.Nullable[R]]) NullableOrderedRowExpression[S, temporal.Interval]
- func IntervalDaysNullable[S any](input RowValue[S, value.Nullable[temporal.Interval]]) NullableOrderedRowExpression[S, int32]
- func IntervalElapsedNullable[S any](input RowValue[S, value.Nullable[temporal.Interval]]) NullableOrderedRowExpression[S, time.Duration]
- func IntervalMonthsNullable[S any](input RowValue[S, value.Nullable[temporal.Interval]]) NullableOrderedRowExpression[S, int32]
- func JSONLength[S, P any](input RowValue[S, value.JSON[P]]) NullableOrderedRowExpression[S, int64]
- func JSONLengthNullable[S, P any](input RowValue[S, value.Nullable[value.JSON[P]]]) NullableOrderedRowExpression[S, int64]
- func JulianDayNullable[S any, V calendarValue](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, decimal.Decimal]
- func LengthNullable[S any, V ~string](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, int64]
- func LocalAtNullable[S any, V instantValue](input RowValue[S, value.Nullable[V]], zone TimeZone) NullableOrderedRowExpression[S, temporal.LocalDateTime]
- func LocalDifferenceNullable[S any](left RowValue[S, value.Nullable[temporal.LocalDateTime]], ...) NullableOrderedRowExpression[S, temporal.Interval]
- func MicrosecondsNullable[S any, V clockValue](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, int64]
- func MillenniumNullable[S any, V calendarValue](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, int64]
- func MillisecondsNullable[S any, V clockValue](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, decimal.Decimal]
- func MinuteNullable[S any, V clockValue](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, int64]
- func MonthNullable[S any, V calendarValue](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, int64]
- func MultiplyNullable[S any, V numericValue](left, right RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, V]
- func NegateIntervalNullable[S any](input RowValue[S, value.Nullable[temporal.Interval]]) NullableOrderedRowExpression[S, temporal.Interval]
- func NegateNullable[S any, V numericValue](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, V]
- func OctetLengthNullable[S any, V ~string](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, int64]
- func OrderNullableRow[S any, V orderedScalar](v RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, V]
- func QuarterNullable[S any, V calendarValue](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, int64]
- func RemainderNullable[S any, V exactNumber](left, right RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, V]
- func ResolveLocalNullable[S any](input RowValue[S, value.Nullable[temporal.LocalDateTime]], zone TimeZone, ...) NullableOrderedRowExpression[S, temporal.DateTime]
- func SecondNullable[S any, V clockValue](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, decimal.Decimal]
- func ShiftDateNullable[S any](input RowValue[S, value.Nullable[temporal.Date]], ...) NullableOrderedRowExpression[S, temporal.LocalDateTime]
- func ShiftInstantNullable[S any, V instantValue](input RowValue[S, value.Nullable[V]], ...) NullableOrderedRowExpression[S, V]
- func ShiftLocalNullable[S any](input RowValue[S, value.Nullable[temporal.LocalDateTime]], ...) NullableOrderedRowExpression[S, temporal.LocalDateTime]
- func SphericalDistanceNullable[S any, V numericValue](latitude, longitude RowValue[S, value.Nullable[V]], origin GeographicPoint) NullableOrderedRowExpression[S, float64]
- func SubtractClockElapsedNullable[S any](input RowValue[S, value.Nullable[temporal.Time]], duration time.Duration) NullableOrderedRowExpression[S, temporal.Time]
- func SubtractDateIntervalNullable[S any](input RowValue[S, value.Nullable[temporal.Date]], interval temporal.Interval) NullableOrderedRowExpression[S, temporal.LocalDateTime]
- func SubtractInstantIntervalNullable[S any, V instantValue](input RowValue[S, value.Nullable[V]], interval temporal.Interval, ...) NullableOrderedRowExpression[S, V]
- func SubtractIntervalsNullable[S any](left RowValue[S, value.Nullable[temporal.Interval]], ...) NullableOrderedRowExpression[S, temporal.Interval]
- func SubtractLocalIntervalNullable[S any](input RowValue[S, value.Nullable[temporal.LocalDateTime]], ...) NullableOrderedRowExpression[S, temporal.LocalDateTime]
- func SubtractNullable[S any, V numericValue](left, right RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, V]
- func TimeOfNullable[S any](input RowValue[S, value.Nullable[temporal.LocalDateTime]]) NullableOrderedRowExpression[S, temporal.Time]
- func TruncateDateNullable[S any](input RowValue[S, value.Nullable[temporal.Date]], unit DateUnit) NullableOrderedRowExpression[S, temporal.Date]
- func TruncateInstantNullable[S any, V instantValue](input RowValue[S, value.Nullable[V]], unit TimestampUnit, zone TimeZone) NullableOrderedRowExpression[S, V]
- func TruncateLocalNullable[S any](input RowValue[S, value.Nullable[temporal.LocalDateTime]], unit TimestampUnit) NullableOrderedRowExpression[S, temporal.LocalDateTime]
- func UnixMillisecondsNullable[S any, V instantValue](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, int64]
- func UnixSecondsNullable[S any, V instantValue](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, decimal.Decimal]
- func YearNullable[S any, V calendarValue](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, int64]
- type NullableOrderedValueComparison
- type NullableRowComparison
- type NullableScope
- type NullableTextFilterAdapter
- func (a NullableTextFilterAdapter[S, V]) Contains(v V) Predicate[S]
- func (a NullableTextFilterAdapter[S, V]) Eq(v V) Predicate[S]
- func (a NullableTextFilterAdapter[S, V]) Gt(v V) Predicate[S]
- func (a NullableTextFilterAdapter[S, V]) Gte(v V) Predicate[S]
- func (a NullableTextFilterAdapter[S, V]) IContains(v V) Predicate[S]
- func (a NullableTextFilterAdapter[S, V]) In(vs ...V) Predicate[S]
- func (a NullableTextFilterAdapter[S, V]) IsNotNull() Predicate[S]
- func (a NullableTextFilterAdapter[S, V]) IsNull() Predicate[S]
- func (a NullableTextFilterAdapter[S, V]) Like(v V) Predicate[S]
- func (a NullableTextFilterAdapter[S, V]) Lt(v V) Predicate[S]
- func (a NullableTextFilterAdapter[S, V]) Lte(v V) Predicate[S]
- func (a NullableTextFilterAdapter[S, V]) Ne(v V) Predicate[S]
- type NullableTextRowExpression
- func ConcatNullable[S any, V, W ~string](input RowValue[S, value.Nullable[V]], other RowValue[S, value.Nullable[W]]) NullableTextRowExpression[S, string]
- func JSONTextScalar[S any, P ~string](path JSONPath[S, P], c codec.Codec[P]) NullableTextRowExpression[S, P]
- func LowerNullable[S any, V ~string](input RowValue[S, value.Nullable[V]]) NullableTextRowExpression[S, string]
- func ReplaceNullable[S any, V, W, X ~string](input RowValue[S, value.Nullable[V]], other RowValue[S, value.Nullable[W]], ...) NullableTextRowExpression[S, string]
- func SubstringAtNullable[S any, V ~string, I integerNumber](input RowValue[S, value.Nullable[V]], start, count RowValue[S, I]) NullableTextRowExpression[S, string]
- func SubstringFromNullable[S any, V ~string](input RowValue[S, value.Nullable[V]], start int32) NullableTextRowExpression[S, string]
- func SubstringNullable[S any, V ~string](input RowValue[S, value.Nullable[V]], start int32, count int32) NullableTextRowExpression[S, string]
- func TextNullableRow[S any, V ~string](column orm.TextExpressionColumn[S, V, value.Nullable[V]]) NullableTextRowExpression[S, V]
- func TextNullableRowAt[S, M any, V ~string](scope Scope[S, M], column orm.TextExpressionColumn[M, V, value.Nullable[V]]) NullableTextRowExpression[S, V]
- func TextNullableRowValue[S any, V ~string](v RowValue[S, value.Nullable[V]]) NullableTextRowExpression[S, V]
- func TrimCharsNullable[S any, V, W ~string](input RowValue[S, value.Nullable[V]], other RowValue[S, value.Nullable[W]]) NullableTextRowExpression[S, string]
- func TrimLeftCharsNullable[S any, V, W ~string](input RowValue[S, value.Nullable[V]], other RowValue[S, value.Nullable[W]]) NullableTextRowExpression[S, string]
- func TrimLeftNullable[S any, V ~string](input RowValue[S, value.Nullable[V]]) NullableTextRowExpression[S, string]
- func TrimNullable[S any, V ~string](input RowValue[S, value.Nullable[V]]) NullableTextRowExpression[S, string]
- func TrimRightCharsNullable[S any, V, W ~string](input RowValue[S, value.Nullable[V]], other RowValue[S, value.Nullable[W]]) NullableTextRowExpression[S, string]
- func TrimRightNullable[S any, V ~string](input RowValue[S, value.Nullable[V]]) NullableTextRowExpression[S, string]
- func UpperNullable[S any, V ~string](input RowValue[S, value.Nullable[V]]) NullableTextRowExpression[S, string]
- type NullableTextValueComparison
- type NullableTextValueFilterAdapter
- func (a NullableTextValueFilterAdapter[S, V]) Contains(v V) HavingPredicate[S]
- func (a NullableTextValueFilterAdapter[S, V]) Eq(v V) HavingPredicate[S]
- func (a NullableTextValueFilterAdapter[S, V]) Gt(v V) HavingPredicate[S]
- func (a NullableTextValueFilterAdapter[S, V]) Gte(v V) HavingPredicate[S]
- func (a NullableTextValueFilterAdapter[S, V]) IContains(v V) HavingPredicate[S]
- func (a NullableTextValueFilterAdapter[S, V]) In(vs ...V) HavingPredicate[S]
- func (a NullableTextValueFilterAdapter[S, V]) IsNotNull() HavingPredicate[S]
- func (a NullableTextValueFilterAdapter[S, V]) IsNull() HavingPredicate[S]
- func (a NullableTextValueFilterAdapter[S, V]) Like(v V) HavingPredicate[S]
- func (a NullableTextValueFilterAdapter[S, V]) Lt(v V) HavingPredicate[S]
- func (a NullableTextValueFilterAdapter[S, V]) Lte(v V) HavingPredicate[S]
- func (a NullableTextValueFilterAdapter[S, V]) Ne(v V) HavingPredicate[S]
- type NullableValueFilterAdapter
- func (a NullableValueFilterAdapter[S, V]) Eq(v V) HavingPredicate[S]
- func (a NullableValueFilterAdapter[S, V]) In(vs ...V) HavingPredicate[S]
- func (a NullableValueFilterAdapter[S, V]) IsNotNull() HavingPredicate[S]
- func (a NullableValueFilterAdapter[S, V]) IsNull() HavingPredicate[S]
- func (a NullableValueFilterAdapter[S, V]) Ne(v V) HavingPredicate[S]
- type Order
- type OrderFilterAdapter
- func (a OrderFilterAdapter[S, V]) Eq(v V) Predicate[S]
- func (a OrderFilterAdapter[S, V]) Gt(v V) Predicate[S]
- func (a OrderFilterAdapter[S, V]) Gte(v V) Predicate[S]
- func (a OrderFilterAdapter[S, V]) In(vs ...V) Predicate[S]
- func (a OrderFilterAdapter[S, V]) Lt(v V) Predicate[S]
- func (a OrderFilterAdapter[S, V]) Lte(v V) Predicate[S]
- func (a OrderFilterAdapter[S, V]) Ne(v V) Predicate[S]
- type OrderValueFilterAdapter
- func (a OrderValueFilterAdapter[S, V]) Eq(v V) HavingPredicate[S]
- func (a OrderValueFilterAdapter[S, V]) Gt(v V) HavingPredicate[S]
- func (a OrderValueFilterAdapter[S, V]) Gte(v V) HavingPredicate[S]
- func (a OrderValueFilterAdapter[S, V]) In(vs ...V) HavingPredicate[S]
- func (a OrderValueFilterAdapter[S, V]) Lt(v V) HavingPredicate[S]
- func (a OrderValueFilterAdapter[S, V]) Lte(v V) HavingPredicate[S]
- func (a OrderValueFilterAdapter[S, V]) Ne(v V) HavingPredicate[S]
- type OrderedAggregate
- func Count[S any]() OrderedAggregate[S, int64]
- func CountDistinctField[S any, V, P any](column orm.ExpressionColumn[S, V, P]) OrderedAggregate[S, int64]
- func CountDistinctFieldAt[S, M any, V, P any](scope Scope[S, M], column orm.ExpressionColumn[M, V, P]) OrderedAggregate[S, int64]
- func CountDistinctRow[S, V any](input RowExpression[S, V]) OrderedAggregate[S, int64]
- func CountField[S any, V, P any](column orm.ExpressionColumn[S, V, P]) OrderedAggregate[S, int64]
- func CountFieldAt[S, M any, V, P any](scope Scope[S, M], column orm.ExpressionColumn[M, V, P]) OrderedAggregate[S, int64]
- func CountRow[S, V any](input RowExpression[S, V]) OrderedAggregate[S, int64]
- type OrderedRowExpression
- func Abs[S any, V numericValue](input RowValue[S, V]) OrderedRowExpression[S, V]
- func Add[S any, V numericValue](left, right RowValue[S, V]) OrderedRowExpression[S, V]
- func AddClockElapsed[S any](input RowValue[S, temporal.Time], duration time.Duration) OrderedRowExpression[S, temporal.Time]
- func AddDateDays[S any](input RowValue[S, temporal.Date], days int32) OrderedRowExpression[S, temporal.Date]
- func AddDateInterval[S any](input RowValue[S, temporal.Date], interval temporal.Interval) OrderedRowExpression[S, temporal.LocalDateTime]
- func AddInstantInterval[S any, V instantValue](input RowValue[S, V], interval temporal.Interval, zone TimeZone) OrderedRowExpression[S, V]
- func AddIntervals[S any](left RowValue[S, temporal.Interval], right RowValue[S, temporal.Interval]) OrderedRowExpression[S, temporal.Interval]
- func AddLocalInterval[S any](input RowValue[S, temporal.LocalDateTime], interval temporal.Interval) OrderedRowExpression[S, temporal.LocalDateTime]
- func Century[S any, V calendarValue](input RowValue[S, V]) OrderedRowExpression[S, int64]
- func ClockDifference[S any](left RowValue[S, temporal.Time], right RowValue[S, temporal.Time]) OrderedRowExpression[S, temporal.Interval]
- func CombineDateTime[S any](date RowValue[S, temporal.Date], clock RowValue[S, temporal.Time]) OrderedRowExpression[S, temporal.LocalDateTime]
- func DateDifference[S any](left RowValue[S, temporal.Date], right RowValue[S, temporal.Date]) OrderedRowExpression[S, int64]
- func DateOf[S any](input RowValue[S, temporal.LocalDateTime]) OrderedRowExpression[S, temporal.Date]
- func Day[S any, V calendarValue](input RowValue[S, V]) OrderedRowExpression[S, int64]
- func DayOfWeek[S any, V calendarValue](input RowValue[S, V]) OrderedRowExpression[S, int64]
- func DayOfYear[S any, V calendarValue](input RowValue[S, V]) OrderedRowExpression[S, int64]
- func Decade[S any, V calendarValue](input RowValue[S, V]) OrderedRowExpression[S, int64]
- func DecimalOf[S any, V exactNumber](input RowValue[S, V]) OrderedRowExpression[S, decimal.Decimal]
- func Divide[S any, V numericValue](left, right RowValue[S, V]) OrderedRowExpression[S, V]
- func FloatOf[S any, V numericValue](input RowValue[S, V]) OrderedRowExpression[S, float64]
- func FromUnixMillis[S any, V integerNumber](input RowValue[S, V]) OrderedRowExpression[S, temporal.DateTime]
- func Hour[S any, V clockValue](input RowValue[S, V]) OrderedRowExpression[S, int64]
- func ISODayOfWeek[S any, V calendarValue](input RowValue[S, V]) OrderedRowExpression[S, int64]
- func ISOWeek[S any, V calendarValue](input RowValue[S, V]) OrderedRowExpression[S, int64]
- func ISOYear[S any, V calendarValue](input RowValue[S, V]) OrderedRowExpression[S, int64]
- func InstantDifference[S any, L, R instantValue](left RowValue[S, L], right RowValue[S, R]) OrderedRowExpression[S, temporal.Interval]
- func IntervalDays[S any](input RowValue[S, temporal.Interval]) OrderedRowExpression[S, int32]
- func IntervalElapsed[S any](input RowValue[S, temporal.Interval]) OrderedRowExpression[S, time.Duration]
- func IntervalMonths[S any](input RowValue[S, temporal.Interval]) OrderedRowExpression[S, int32]
- func JulianDay[S any, V calendarValue](input RowValue[S, V]) OrderedRowExpression[S, decimal.Decimal]
- func Length[S any, V ~string](input RowValue[S, V]) OrderedRowExpression[S, int64]
- func LocalAt[S any, V instantValue](input RowValue[S, V], zone TimeZone) OrderedRowExpression[S, temporal.LocalDateTime]
- func LocalDifference[S any](left RowValue[S, temporal.LocalDateTime], ...) OrderedRowExpression[S, temporal.Interval]
- func Microseconds[S any, V clockValue](input RowValue[S, V]) OrderedRowExpression[S, int64]
- func Millennium[S any, V calendarValue](input RowValue[S, V]) OrderedRowExpression[S, int64]
- func Milliseconds[S any, V clockValue](input RowValue[S, V]) OrderedRowExpression[S, decimal.Decimal]
- func Minute[S any, V clockValue](input RowValue[S, V]) OrderedRowExpression[S, int64]
- func Month[S any, V calendarValue](input RowValue[S, V]) OrderedRowExpression[S, int64]
- func Multiply[S any, V numericValue](left, right RowValue[S, V]) OrderedRowExpression[S, V]
- func Negate[S any, V numericValue](input RowValue[S, V]) OrderedRowExpression[S, V]
- func NegateInterval[S any](input RowValue[S, temporal.Interval]) OrderedRowExpression[S, temporal.Interval]
- func OctetLength[S any, V ~string](input RowValue[S, V]) OrderedRowExpression[S, int64]
- func OrderRow[S any, V orderedScalar](v RowValue[S, V]) OrderedRowExpression[S, V]
- func Quarter[S any, V calendarValue](input RowValue[S, V]) OrderedRowExpression[S, int64]
- func Remainder[S any, V exactNumber](left, right RowValue[S, V]) OrderedRowExpression[S, V]
- func ResolveLocal[S any](input RowValue[S, temporal.LocalDateTime], zone TimeZone, ...) OrderedRowExpression[S, temporal.DateTime]
- func Second[S any, V clockValue](input RowValue[S, V]) OrderedRowExpression[S, decimal.Decimal]
- func ShiftDate[S any](input RowValue[S, temporal.Date], interval RowValue[S, temporal.Interval]) OrderedRowExpression[S, temporal.LocalDateTime]
- func ShiftInstant[S any, V instantValue](input RowValue[S, V], interval RowValue[S, temporal.Interval], zone TimeZone) OrderedRowExpression[S, V]
- func ShiftLocal[S any](input RowValue[S, temporal.LocalDateTime], ...) OrderedRowExpression[S, temporal.LocalDateTime]
- func SphericalDistance[S any, V numericValue](latitude, longitude RowValue[S, V], origin GeographicPoint) OrderedRowExpression[S, float64]
- func Subtract[S any, V numericValue](left, right RowValue[S, V]) OrderedRowExpression[S, V]
- func SubtractClockElapsed[S any](input RowValue[S, temporal.Time], duration time.Duration) OrderedRowExpression[S, temporal.Time]
- func SubtractDateInterval[S any](input RowValue[S, temporal.Date], interval temporal.Interval) OrderedRowExpression[S, temporal.LocalDateTime]
- func SubtractInstantInterval[S any, V instantValue](input RowValue[S, V], interval temporal.Interval, zone TimeZone) OrderedRowExpression[S, V]
- func SubtractIntervals[S any](left RowValue[S, temporal.Interval], right RowValue[S, temporal.Interval]) OrderedRowExpression[S, temporal.Interval]
- func SubtractLocalInterval[S any](input RowValue[S, temporal.LocalDateTime], interval temporal.Interval) OrderedRowExpression[S, temporal.LocalDateTime]
- func TimeOf[S any](input RowValue[S, temporal.LocalDateTime]) OrderedRowExpression[S, temporal.Time]
- func TransactionTime[S, M any](scope Scope[S, M]) OrderedRowExpression[S, temporal.DateTime]
- func TruncateDate[S any](input RowValue[S, temporal.Date], unit DateUnit) OrderedRowExpression[S, temporal.Date]
- func TruncateInstant[S any, V instantValue](input RowValue[S, V], unit TimestampUnit, zone TimeZone) OrderedRowExpression[S, V]
- func TruncateLocal[S any](input RowValue[S, temporal.LocalDateTime], unit TimestampUnit) OrderedRowExpression[S, temporal.LocalDateTime]
- func UnixMilliseconds[S any, V instantValue](input RowValue[S, V]) OrderedRowExpression[S, int64]
- func UnixSeconds[S any, V instantValue](input RowValue[S, V]) OrderedRowExpression[S, decimal.Decimal]
- func Year[S any, V calendarValue](input RowValue[S, V]) OrderedRowExpression[S, int64]
- type OrderedRowValue
- type OrderedScalar
- type OrderedValueComparison
- type OrderedValueOperand
- type ParamSource
- type Predicate
- func And[S any](ps ...Predicate[S]) Predicate[S]
- func DistinctFrom[S any, V any](left, right RowValue[S, V]) Predicate[S]
- func Eq[S, V any](e RowValue[S, V], v V) Predicate[S]
- func Equal[S any, V any](left, right RowValue[S, V]) Predicate[S]
- func FoundryPredicateValue[S any](core ormcore.Predicate, seal sqlowner.ExpressionSeal) Predicate[S]
- func Greater[S any, V orderedScalar](left, right RowValue[S, V]) Predicate[S]
- func GreaterColumn[M, V, P any, L orderedColumn[M, V, P], R orderedColumn[M, V, P]](left L, right R) Predicate[M]
- func GreaterNullable[S any, V orderedScalar](left, right RowValue[S, value.Nullable[V]]) Predicate[S]
- func GreaterOrEqual[S any, V orderedScalar](left, right RowValue[S, V]) Predicate[S]
- func GreaterOrEqualNullable[S any, V orderedScalar](left, right RowValue[S, value.Nullable[V]]) Predicate[S]
- func Gt[S any, V orderedScalar](e OrderedRowValue[S, V], v V) Predicate[S]
- func Gte[S any, V orderedScalar](e OrderedRowValue[S, V], v V) Predicate[S]
- func Has[M, N any](r orm.ExistenceRelation[M, N], ps ...Predicate[N]) Predicate[M]
- func In[S, V any](e RowValue[S, V], vs ...V) Predicate[S]
- func IsNotNull[S, V any](e RowValue[S, V]) Predicate[S]
- func IsNull[S, V any](e RowValue[S, V]) Predicate[S]
- func Less[S any, V orderedScalar](left, right RowValue[S, V]) Predicate[S]
- func LessNullable[S any, V orderedScalar](left, right RowValue[S, value.Nullable[V]]) Predicate[S]
- func LessOrEqual[S any, V orderedScalar](left, right RowValue[S, V]) Predicate[S]
- func LessOrEqualNullable[S any, V orderedScalar](left, right RowValue[S, value.Nullable[V]]) Predicate[S]
- func Like[S any, V ~string](left, right RowValue[S, V]) Predicate[S]
- func LikeNullable[S any, V ~string](left, right RowValue[S, value.Nullable[V]]) Predicate[S]
- func Lt[S any, V orderedScalar](e OrderedRowValue[S, V], v V) Predicate[S]
- func Lte[S any, V orderedScalar](e OrderedRowValue[S, V], v V) Predicate[S]
- func ModelPredicate[M any](p orm.Predicate[M]) Predicate[M]
- func Ne[S, V any](e RowValue[S, V], v V) Predicate[S]
- func Not[S any](p Predicate[S]) Predicate[S]
- func NotDistinctFrom[S any, V any](left, right RowValue[S, V]) Predicate[S]
- func NotEqual[S any, V any](left, right RowValue[S, V]) Predicate[S]
- func NullableEq[S, V any](e RowValue[S, value.Nullable[V]], v V) Predicate[S]
- func NullableGt[S any, V orderedScalar](e OrderedRowValue[S, value.Nullable[V]], v V) Predicate[S]
- func NullableGte[S any, V orderedScalar](e OrderedRowValue[S, value.Nullable[V]], v V) Predicate[S]
- func NullableIn[S, V any](e RowValue[S, value.Nullable[V]], vs ...V) Predicate[S]
- func NullableLt[S any, V orderedScalar](e OrderedRowValue[S, value.Nullable[V]], v V) Predicate[S]
- func NullableLte[S any, V orderedScalar](e OrderedRowValue[S, value.Nullable[V]], v V) Predicate[S]
- func NullableNe[S, V any](e RowValue[S, value.Nullable[V]], v V) Predicate[S]
- func NullableTextContains[S any, V ~string](e NullableTextRowExpression[S, V], v V) Predicate[S]
- func NullableTextEndsWith[S any, V ~string](e NullableTextRowExpression[S, V], v V) Predicate[S]
- func NullableTextIContains[S any, V ~string](e NullableTextRowExpression[S, V], v V) Predicate[S]
- func NullableTextIEndsWith[S any, V ~string](e NullableTextRowExpression[S, V], v V) Predicate[S]
- func NullableTextILike[S any, V ~string](e NullableTextRowExpression[S, V], v V) Predicate[S]
- func NullableTextIStartsWith[S any, V ~string](e NullableTextRowExpression[S, V], v V) Predicate[S]
- func NullableTextLike[S any, V ~string](e NullableTextRowExpression[S, V], v V) Predicate[S]
- func NullableTextStartsWith[S any, V ~string](e NullableTextRowExpression[S, V], v V) Predicate[S]
- func Or[S any](ps ...Predicate[S]) Predicate[S]
- func TextContains[S any, V ~string](e TextRowExpression[S, V], v V) Predicate[S]
- func TextEndsWith[S any, V ~string](e TextRowExpression[S, V], v V) Predicate[S]
- func TextIContains[S any, V ~string](e TextRowExpression[S, V], v V) Predicate[S]
- func TextIEndsWith[S any, V ~string](e TextRowExpression[S, V], v V) Predicate[S]
- func TextILike[S any, V ~string](e TextRowExpression[S, V], v V) Predicate[S]
- func TextIStartsWith[S any, V ~string](e TextRowExpression[S, V], v V) Predicate[S]
- func TextLike[S any, V ~string](e TextRowExpression[S, V], v V) Predicate[S]
- func TextStartsWith[S any, V ~string](e TextRowExpression[S, V], v V) Predicate[S]
- func UUIDGreater[S, T any](input RowValue[S, model.ID[T]], v model.ID[T]) Predicate[S]
- func UUIDGreaterNullable[S, T any](input RowValue[S, value.Nullable[model.ID[T]]], v model.ID[T]) Predicate[S]
- func UUIDGreaterOrEqual[S, T any](input RowValue[S, model.ID[T]], v model.ID[T]) Predicate[S]
- func UUIDGreaterOrEqualNullable[S, T any](input RowValue[S, value.Nullable[model.ID[T]]], v model.ID[T]) Predicate[S]
- func UUIDLess[S, T any](input RowValue[S, model.ID[T]], v model.ID[T]) Predicate[S]
- func UUIDLessNullable[S, T any](input RowValue[S, value.Nullable[model.ID[T]]], v model.ID[T]) Predicate[S]
- func UUIDLessOrEqual[S, T any](input RowValue[S, model.ID[T]], v model.ID[T]) Predicate[S]
- func UUIDLessOrEqualNullable[S, T any](input RowValue[S, value.Nullable[model.ID[T]]], v model.ID[T]) Predicate[S]
- type ProjectionKey
- type ProjectionOrder
- type RangeBoundary
- type RangeWindow
- func NullableNumericRange[S any, V numericValue](w Window[S], input Selected[S, value.Nullable[V]]) RangeWindow[S, V]
- func NullableTemporalRange[S any, V rangeTemporal](w Window[S], input Selected[S, value.Nullable[V]]) RangeWindow[S, temporal.Interval]
- func NumericRange[S any, V numericValue](w Window[S], input Selected[S, V]) RangeWindow[S, V]
- func TemporalRange[S any, V rangeTemporal](w Window[S], input Selected[S, V]) RangeWindow[S, temporal.Interval]
- func (r RangeWindow[S, D]) Asc() RangeWindow[S, D]
- func (r RangeWindow[S, D]) Between(start, end RangeBoundary[S, D]) Window[S]
- func (r RangeWindow[S, D]) CurrentRow() RangeBoundary[S, D]
- func (r RangeWindow[S, D]) Desc() RangeWindow[S, D]
- func (r RangeWindow[S, D]) Following(v D) RangeBoundary[S, D]
- func (r RangeWindow[S, D]) Preceding(v D) RangeBoundary[S, D]
- func (r RangeWindow[S, D]) UnboundedFollowing() RangeBoundary[S, D]
- func (r RangeWindow[S, D]) UnboundedPreceding() RangeBoundary[S, D]
- type RowComparison
- type RowExpression
- func Coalesce[S, V any](first RowValue[S, value.Nullable[V]], fallback RowValue[S, V]) RowExpression[S, V]
- func CoalesceNullable[S, V any](first RowValue[S, value.Nullable[V]], rest ...RowValue[S, value.Nullable[V]]) RowExpression[S, value.Nullable[V]]
- func Constant[S, V any](c codec.Codec[V], v V) RowExpression[S, V]
- func FoundryRowExpression[S, V any](core ormcore.Expression, column ormcore.Column[V], ...) RowExpression[S, V]
- func JSONContainedBy[S, P any](left, right RowValue[S, value.JSON[P]]) RowExpression[S, bool]
- func JSONContainedByNullable[S, P any](left, right RowValue[S, value.Nullable[value.JSON[P]]]) RowExpression[S, value.Nullable[bool]]
- func JSONContains[S, P any](left, right RowValue[S, value.JSON[P]]) RowExpression[S, bool]
- func JSONContainsNullable[S, P any](left, right RowValue[S, value.Nullable[value.JSON[P]]]) RowExpression[S, value.Nullable[bool]]
- func JSONScalar[S, P any](path JSONPath[S, P], c codec.Codec[P]) RowExpression[S, value.Nullable[P]]
- func JSONType[S, P any](input RowValue[S, value.JSON[P]]) RowExpression[S, database.JSONKind]
- func JSONTypeNullable[S, P any](input RowValue[S, value.Nullable[value.JSON[P]]]) RowExpression[S, value.Nullable[database.JSONKind]]
- func NullIf[S, V any](first, second RowValue[S, V]) RowExpression[S, value.Nullable[V]]
- func NullIfNullable[S, V any](first, second RowValue[S, value.Nullable[V]]) RowExpression[S, value.Nullable[V]]
- func NullableRow[S, V any](v RowValue[S, V]) RowExpression[S, value.Nullable[V]]
- func Param[S, V, P any](column orm.ExpressionColumn[S, V, P], v V) RowExpression[S, V]
- func ParamOf[S, V any](source ParamSource[S, V], v V) RowExpression[S, V]
- func RelatedValue[M, N, V any](source orm.AggregateSource[M, N], computation AggregateExpression[N, V]) RowExpression[M, V]
- func Row[S, V any](v RowValue[S, V]) RowExpression[S, V]
- type RowValue
- type Scope
- type SelectSource
- type Selected
- func AbsNullableValue[S any, V numericValue](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[V]]
- func AbsValue[S any, V numericValue](input Selected[S, V]) Selected[S, V]
- func AddClockElapsedNullableValue[S any](input Selected[S, value.Nullable[temporal.Time]], duration time.Duration) Selected[S, value.Nullable[temporal.Time]]
- func AddClockElapsedValue[S any](input Selected[S, temporal.Time], duration time.Duration) Selected[S, temporal.Time]
- func AddDateDaysNullableValue[S any](input Selected[S, value.Nullable[temporal.Date]], days int32) Selected[S, value.Nullable[temporal.Date]]
- func AddDateDaysValue[S any](input Selected[S, temporal.Date], days int32) Selected[S, temporal.Date]
- func AddDateIntervalNullableValue[S any](input Selected[S, value.Nullable[temporal.Date]], interval temporal.Interval) Selected[S, value.Nullable[temporal.LocalDateTime]]
- func AddDateIntervalValue[S any](input Selected[S, temporal.Date], interval temporal.Interval) Selected[S, temporal.LocalDateTime]
- func AddInstantIntervalNullableValue[S any, V instantValue](input Selected[S, value.Nullable[V]], interval temporal.Interval, ...) Selected[S, value.Nullable[V]]
- func AddInstantIntervalValue[S any, V instantValue](input Selected[S, V], interval temporal.Interval, zone TimeZone) Selected[S, V]
- func AddIntervalsNullableValue[S any](left Selected[S, value.Nullable[temporal.Interval]], ...) Selected[S, value.Nullable[temporal.Interval]]
- func AddIntervalsValue[S any](left Selected[S, temporal.Interval], right Selected[S, temporal.Interval]) Selected[S, temporal.Interval]
- func AddLocalIntervalNullableValue[S any](input Selected[S, value.Nullable[temporal.LocalDateTime]], ...) Selected[S, value.Nullable[temporal.LocalDateTime]]
- func AddLocalIntervalValue[S any](input Selected[S, temporal.LocalDateTime], interval temporal.Interval) Selected[S, temporal.LocalDateTime]
- func AddNullableValue[S any, V numericValue](left, right Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[V]]
- func AddValue[S any, V numericValue](left, right Selected[S, V]) Selected[S, V]
- func AsSelected[S, V any](source SelectSource[S, V]) Selected[S, V]
- func CenturyNullableValue[S any, V calendarValue](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[int64]]
- func CenturyValue[S any, V calendarValue](input Selected[S, V]) Selected[S, int64]
- func ClockDifferenceNullableValue[S any](left Selected[S, value.Nullable[temporal.Time]], ...) Selected[S, value.Nullable[temporal.Interval]]
- func ClockDifferenceValue[S any](left Selected[S, temporal.Time], right Selected[S, temporal.Time]) Selected[S, temporal.Interval]
- func CoalesceNullableValue[S, V any](first Selected[S, value.Nullable[V]], rest ...Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[V]]
- func CoalesceValue[S, V any](first Selected[S, value.Nullable[V]], fallback Selected[S, V]) Selected[S, V]
- func CombineDateTimeNullableValue[S any](date Selected[S, value.Nullable[temporal.Date]], ...) Selected[S, value.Nullable[temporal.LocalDateTime]]
- func CombineDateTimeValue[S any](date Selected[S, temporal.Date], clock Selected[S, temporal.Time]) Selected[S, temporal.LocalDateTime]
- func ConcatNullableValue[S any, V, W ~string](input Selected[S, value.Nullable[V]], other Selected[S, value.Nullable[W]]) Selected[S, value.Nullable[string]]
- func ConcatValue[S any, V, W ~string](input Selected[S, V], other Selected[S, W]) Selected[S, string]
- func ConcatWSNullableValue[S any, V ~string](separator string, first Selected[S, value.Nullable[V]], ...) Selected[S, string]
- func ConcatWSValue[S any, V ~string](separator string, first Selected[S, V], rest ...Selected[S, V]) Selected[S, string]
- func CumeDist[S any](w Window[S]) Selected[S, float64]
- func DateDifferenceNullableValue[S any](left Selected[S, value.Nullable[temporal.Date]], ...) Selected[S, value.Nullable[int64]]
- func DateDifferenceValue[S any](left Selected[S, temporal.Date], right Selected[S, temporal.Date]) Selected[S, int64]
- func DateOfNullableValue[S any](input Selected[S, value.Nullable[temporal.LocalDateTime]]) Selected[S, value.Nullable[temporal.Date]]
- func DateOfValue[S any](input Selected[S, temporal.LocalDateTime]) Selected[S, temporal.Date]
- func DayNullableValue[S any, V calendarValue](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[int64]]
- func DayOfWeekNullableValue[S any, V calendarValue](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[int64]]
- func DayOfWeekValue[S any, V calendarValue](input Selected[S, V]) Selected[S, int64]
- func DayOfYearNullableValue[S any, V calendarValue](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[int64]]
- func DayOfYearValue[S any, V calendarValue](input Selected[S, V]) Selected[S, int64]
- func DayValue[S any, V calendarValue](input Selected[S, V]) Selected[S, int64]
- func DecadeNullableValue[S any, V calendarValue](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[int64]]
- func DecadeValue[S any, V calendarValue](input Selected[S, V]) Selected[S, int64]
- func DecimalNullableValue[S any, V exactNumber](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[decimal.Decimal]]
- func DecimalValue[S any, V exactNumber](input Selected[S, V]) Selected[S, decimal.Decimal]
- func DenseRank[S any](w Window[S]) Selected[S, int64]
- func DivideNullableValue[S any, V numericValue](left, right Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[V]]
- func DivideValue[S any, V numericValue](left, right Selected[S, V]) Selected[S, V]
- func FirstNullableValue[S, V any](input Selected[S, value.Nullable[V]], w Window[S]) Selected[S, value.Nullable[V]]
- func FirstValue[S, V any](input Selected[S, V], w Window[S]) Selected[S, value.Nullable[V]]
- func FloatNullableValue[S any, V numericValue](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[float64]]
- func FloatValue[S any, V numericValue](input Selected[S, V]) Selected[S, float64]
- func FoundrySelectedValue[S, V any](core ormcore.Expression, column ormcore.Column[V], ...) Selected[S, V]
- func FromUnixMillisNullableValue[S any, V integerNumber](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[temporal.DateTime]]
- func FromUnixMillisValue[S any, V integerNumber](input Selected[S, V]) Selected[S, temporal.DateTime]
- func HourNullableValue[S any, V clockValue](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[int64]]
- func HourValue[S any, V clockValue](input Selected[S, V]) Selected[S, int64]
- func ISODayOfWeekNullableValue[S any, V calendarValue](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[int64]]
- func ISODayOfWeekValue[S any, V calendarValue](input Selected[S, V]) Selected[S, int64]
- func ISOWeekNullableValue[S any, V calendarValue](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[int64]]
- func ISOWeekValue[S any, V calendarValue](input Selected[S, V]) Selected[S, int64]
- func ISOYearNullableValue[S any, V calendarValue](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[int64]]
- func ISOYearValue[S any, V calendarValue](input Selected[S, V]) Selected[S, int64]
- func InstantDifferenceNullableValue[S any, L, R instantValue](left Selected[S, value.Nullable[L]], right Selected[S, value.Nullable[R]]) Selected[S, value.Nullable[temporal.Interval]]
- func InstantDifferenceValue[S any, L, R instantValue](left Selected[S, L], right Selected[S, R]) Selected[S, temporal.Interval]
- func IntervalDaysNullableValue[S any](input Selected[S, value.Nullable[temporal.Interval]]) Selected[S, value.Nullable[int32]]
- func IntervalDaysValue[S any](input Selected[S, temporal.Interval]) Selected[S, int32]
- func IntervalElapsedNullableValue[S any](input Selected[S, value.Nullable[temporal.Interval]]) Selected[S, value.Nullable[time.Duration]]
- func IntervalElapsedValue[S any](input Selected[S, temporal.Interval]) Selected[S, time.Duration]
- func IntervalMonthsNullableValue[S any](input Selected[S, value.Nullable[temporal.Interval]]) Selected[S, value.Nullable[int32]]
- func IntervalMonthsValue[S any](input Selected[S, temporal.Interval]) Selected[S, int32]
- func JSONContainedByNullableValue[S, P any](left, right Selected[S, value.Nullable[value.JSON[P]]]) Selected[S, value.Nullable[bool]]
- func JSONContainedByValue[S, P any](left, right Selected[S, value.JSON[P]]) Selected[S, bool]
- func JSONContainsNullableValue[S, P any](left, right Selected[S, value.Nullable[value.JSON[P]]]) Selected[S, value.Nullable[bool]]
- func JSONContainsValue[S, P any](left, right Selected[S, value.JSON[P]]) Selected[S, bool]
- func JSONLengthNullableValue[S, P any](input Selected[S, value.Nullable[value.JSON[P]]]) Selected[S, value.Nullable[int64]]
- func JSONLengthValue[S, P any](input Selected[S, value.JSON[P]]) Selected[S, value.Nullable[int64]]
- func JSONTypeNullableValue[S, P any](input Selected[S, value.Nullable[value.JSON[P]]]) Selected[S, value.Nullable[database.JSONKind]]
- func JSONTypeValue[S, P any](input Selected[S, value.JSON[P]]) Selected[S, database.JSONKind]
- func JulianDayNullableValue[S any, V calendarValue](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[decimal.Decimal]]
- func JulianDayValue[S any, V calendarValue](input Selected[S, V]) Selected[S, decimal.Decimal]
- func Lag[S, V any](input Selected[S, V], offset int32, w Window[S]) Selected[S, value.Nullable[V]]
- func LagNullable[S, V any](input Selected[S, value.Nullable[V]], offset int32, w Window[S]) Selected[S, value.Nullable[V]]
- func LagOr[S, V any](input Selected[S, V], offset int32, fallback V, w Window[S]) Selected[S, V]
- func LastNullableValue[S, V any](input Selected[S, value.Nullable[V]], w Window[S]) Selected[S, value.Nullable[V]]
- func LastValue[S, V any](input Selected[S, V], w Window[S]) Selected[S, value.Nullable[V]]
- func Lead[S, V any](input Selected[S, V], offset int32, w Window[S]) Selected[S, value.Nullable[V]]
- func LeadNullable[S, V any](input Selected[S, value.Nullable[V]], offset int32, w Window[S]) Selected[S, value.Nullable[V]]
- func LeadOr[S, V any](input Selected[S, V], offset int32, fallback V, w Window[S]) Selected[S, V]
- func LengthNullableValue[S any, V ~string](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[int64]]
- func LengthValue[S any, V ~string](input Selected[S, V]) Selected[S, int64]
- func LocalAtNullableValue[S any, V instantValue](input Selected[S, value.Nullable[V]], zone TimeZone) Selected[S, value.Nullable[temporal.LocalDateTime]]
- func LocalAtValue[S any, V instantValue](input Selected[S, V], zone TimeZone) Selected[S, temporal.LocalDateTime]
- func LocalDifferenceNullableValue[S any](left Selected[S, value.Nullable[temporal.LocalDateTime]], ...) Selected[S, value.Nullable[temporal.Interval]]
- func LocalDifferenceValue[S any](left Selected[S, temporal.LocalDateTime], ...) Selected[S, temporal.Interval]
- func LowerNullableValue[S any, V ~string](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[string]]
- func LowerValue[S any, V ~string](input Selected[S, V]) Selected[S, string]
- func MicrosecondsNullableValue[S any, V clockValue](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[int64]]
- func MicrosecondsValue[S any, V clockValue](input Selected[S, V]) Selected[S, int64]
- func MillenniumNullableValue[S any, V calendarValue](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[int64]]
- func MillenniumValue[S any, V calendarValue](input Selected[S, V]) Selected[S, int64]
- func MillisecondsNullableValue[S any, V clockValue](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[decimal.Decimal]]
- func MillisecondsValue[S any, V clockValue](input Selected[S, V]) Selected[S, decimal.Decimal]
- func MinuteNullableValue[S any, V clockValue](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[int64]]
- func MinuteValue[S any, V clockValue](input Selected[S, V]) Selected[S, int64]
- func MonthNullableValue[S any, V calendarValue](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[int64]]
- func MonthValue[S any, V calendarValue](input Selected[S, V]) Selected[S, int64]
- func MultiplyNullableValue[S any, V numericValue](left, right Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[V]]
- func MultiplyValue[S any, V numericValue](left, right Selected[S, V]) Selected[S, V]
- func NTile[S any](buckets int32, w Window[S]) Selected[S, int32]
- func NegateIntervalNullableValue[S any](input Selected[S, value.Nullable[temporal.Interval]]) Selected[S, value.Nullable[temporal.Interval]]
- func NegateIntervalValue[S any](input Selected[S, temporal.Interval]) Selected[S, temporal.Interval]
- func NegateNullableValue[S any, V numericValue](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[V]]
- func NegateValue[S any, V numericValue](input Selected[S, V]) Selected[S, V]
- func NthNullableValue[S, V any](input Selected[S, value.Nullable[V]], n int32, w Window[S]) Selected[S, value.Nullable[V]]
- func NthValue[S, V any](input Selected[S, V], n int32, w Window[S]) Selected[S, value.Nullable[V]]
- func NullIfNullableValue[S, V any](first, second Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[V]]
- func NullIfValue[S, V any](first, second Selected[S, V]) Selected[S, value.Nullable[V]]
- func Nullable[S, V any](e Selected[S, V]) Selected[S, value.Nullable[V]]
- func OctetLengthNullableValue[S any, V ~string](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[int64]]
- func OctetLengthValue[S any, V ~string](input Selected[S, V]) Selected[S, int64]
- func Over[S, V any](aggregate AggregateExpression[S, V], w Window[S]) Selected[S, V]
- func PercentRank[S any](w Window[S]) Selected[S, float64]
- func QuarterNullableValue[S any, V calendarValue](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[int64]]
- func QuarterValue[S any, V calendarValue](input Selected[S, V]) Selected[S, int64]
- func Rank[S any](w Window[S]) Selected[S, int64]
- func Raw[S, V any](sql string, args ...any) Selected[S, V]
- func RawWithCodec[S, V any](c codec.Codec[V], sql string, args ...any) Selected[S, V]
- func RemainderNullableValue[S any, V exactNumber](left, right Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[V]]
- func RemainderValue[S any, V exactNumber](left, right Selected[S, V]) Selected[S, V]
- func ReplaceNullableValue[S any, V, W, X ~string](input Selected[S, value.Nullable[V]], other Selected[S, value.Nullable[W]], ...) Selected[S, value.Nullable[string]]
- func ReplaceValue[S any, V, W, X ~string](input Selected[S, V], other Selected[S, W], replacement Selected[S, X]) Selected[S, string]
- func ResolveLocalNullableValue[S any](input Selected[S, value.Nullable[temporal.LocalDateTime]], zone TimeZone, ...) Selected[S, value.Nullable[temporal.DateTime]]
- func ResolveLocalValue[S any](input Selected[S, temporal.LocalDateTime], zone TimeZone, ...) Selected[S, temporal.DateTime]
- func RowNumber[S any](w Window[S]) Selected[S, int64]
- func SecondNullableValue[S any, V clockValue](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[decimal.Decimal]]
- func SecondValue[S any, V clockValue](input Selected[S, V]) Selected[S, decimal.Decimal]
- func ShiftDateNullableValue[S any](input Selected[S, value.Nullable[temporal.Date]], ...) Selected[S, value.Nullable[temporal.LocalDateTime]]
- func ShiftDateValue[S any](input Selected[S, temporal.Date], interval Selected[S, temporal.Interval]) Selected[S, temporal.LocalDateTime]
- func ShiftInstantNullableValue[S any, V instantValue](input Selected[S, value.Nullable[V]], ...) Selected[S, value.Nullable[V]]
- func ShiftInstantValue[S any, V instantValue](input Selected[S, V], interval Selected[S, temporal.Interval], zone TimeZone) Selected[S, V]
- func ShiftLocalNullableValue[S any](input Selected[S, value.Nullable[temporal.LocalDateTime]], ...) Selected[S, value.Nullable[temporal.LocalDateTime]]
- func ShiftLocalValue[S any](input Selected[S, temporal.LocalDateTime], ...) Selected[S, temporal.LocalDateTime]
- func SphericalDistanceNullableValue[S any](latitude, longitude Selected[S, value.Nullable[float64]], ...) Selected[S, value.Nullable[float64]]
- func SphericalDistanceValue[S any](latitude, longitude Selected[S, float64], origin GeographicPoint) Selected[S, float64]
- func SubstringAtNullableValue[S any, V ~string, I integerNumber](input Selected[S, value.Nullable[V]], start, count Selected[S, I]) Selected[S, value.Nullable[string]]
- func SubstringAtValue[S any, V ~string, I integerNumber](input Selected[S, V], start, count Selected[S, I]) Selected[S, string]
- func SubstringFromNullableValue[S any, V ~string](input Selected[S, value.Nullable[V]], start int32) Selected[S, value.Nullable[string]]
- func SubstringFromValue[S any, V ~string](input Selected[S, V], start int32) Selected[S, string]
- func SubstringNullableValue[S any, V ~string](input Selected[S, value.Nullable[V]], start int32, count int32) Selected[S, value.Nullable[string]]
- func SubstringValue[S any, V ~string](input Selected[S, V], start int32, count int32) Selected[S, string]
- func SubtractClockElapsedNullableValue[S any](input Selected[S, value.Nullable[temporal.Time]], duration time.Duration) Selected[S, value.Nullable[temporal.Time]]
- func SubtractClockElapsedValue[S any](input Selected[S, temporal.Time], duration time.Duration) Selected[S, temporal.Time]
- func SubtractDateIntervalNullableValue[S any](input Selected[S, value.Nullable[temporal.Date]], interval temporal.Interval) Selected[S, value.Nullable[temporal.LocalDateTime]]
- func SubtractDateIntervalValue[S any](input Selected[S, temporal.Date], interval temporal.Interval) Selected[S, temporal.LocalDateTime]
- func SubtractInstantIntervalNullableValue[S any, V instantValue](input Selected[S, value.Nullable[V]], interval temporal.Interval, ...) Selected[S, value.Nullable[V]]
- func SubtractInstantIntervalValue[S any, V instantValue](input Selected[S, V], interval temporal.Interval, zone TimeZone) Selected[S, V]
- func SubtractIntervalsNullableValue[S any](left Selected[S, value.Nullable[temporal.Interval]], ...) Selected[S, value.Nullable[temporal.Interval]]
- func SubtractIntervalsValue[S any](left Selected[S, temporal.Interval], right Selected[S, temporal.Interval]) Selected[S, temporal.Interval]
- func SubtractLocalIntervalNullableValue[S any](input Selected[S, value.Nullable[temporal.LocalDateTime]], ...) Selected[S, value.Nullable[temporal.LocalDateTime]]
- func SubtractLocalIntervalValue[S any](input Selected[S, temporal.LocalDateTime], interval temporal.Interval) Selected[S, temporal.LocalDateTime]
- func SubtractNullableValue[S any, V numericValue](left, right Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[V]]
- func SubtractValue[S any, V numericValue](left, right Selected[S, V]) Selected[S, V]
- func TimeOfNullableValue[S any](input Selected[S, value.Nullable[temporal.LocalDateTime]]) Selected[S, value.Nullable[temporal.Time]]
- func TimeOfValue[S any](input Selected[S, temporal.LocalDateTime]) Selected[S, temporal.Time]
- func TrimCharsNullableValue[S any, V, W ~string](input Selected[S, value.Nullable[V]], other Selected[S, value.Nullable[W]]) Selected[S, value.Nullable[string]]
- func TrimCharsValue[S any, V, W ~string](input Selected[S, V], other Selected[S, W]) Selected[S, string]
- func TrimLeftCharsNullableValue[S any, V, W ~string](input Selected[S, value.Nullable[V]], other Selected[S, value.Nullable[W]]) Selected[S, value.Nullable[string]]
- func TrimLeftCharsValue[S any, V, W ~string](input Selected[S, V], other Selected[S, W]) Selected[S, string]
- func TrimLeftNullableValue[S any, V ~string](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[string]]
- func TrimLeftValue[S any, V ~string](input Selected[S, V]) Selected[S, string]
- func TrimNullableValue[S any, V ~string](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[string]]
- func TrimRightCharsNullableValue[S any, V, W ~string](input Selected[S, value.Nullable[V]], other Selected[S, value.Nullable[W]]) Selected[S, value.Nullable[string]]
- func TrimRightCharsValue[S any, V, W ~string](input Selected[S, V], other Selected[S, W]) Selected[S, string]
- func TrimRightNullableValue[S any, V ~string](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[string]]
- func TrimRightValue[S any, V ~string](input Selected[S, V]) Selected[S, string]
- func TrimValue[S any, V ~string](input Selected[S, V]) Selected[S, string]
- func TruncateDateNullableValue[S any](input Selected[S, value.Nullable[temporal.Date]], unit DateUnit) Selected[S, value.Nullable[temporal.Date]]
- func TruncateDateValue[S any](input Selected[S, temporal.Date], unit DateUnit) Selected[S, temporal.Date]
- func TruncateInstantNullableValue[S any, V instantValue](input Selected[S, value.Nullable[V]], unit TimestampUnit, zone TimeZone) Selected[S, value.Nullable[V]]
- func TruncateInstantValue[S any, V instantValue](input Selected[S, V], unit TimestampUnit, zone TimeZone) Selected[S, V]
- func TruncateLocalNullableValue[S any](input Selected[S, value.Nullable[temporal.LocalDateTime]], unit TimestampUnit) Selected[S, value.Nullable[temporal.LocalDateTime]]
- func TruncateLocalValue[S any](input Selected[S, temporal.LocalDateTime], unit TimestampUnit) Selected[S, temporal.LocalDateTime]
- func UnixMillisecondsNullableValue[S any, V instantValue](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[int64]]
- func UnixMillisecondsValue[S any, V instantValue](input Selected[S, V]) Selected[S, int64]
- func UnixSecondsNullableValue[S any, V instantValue](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[decimal.Decimal]]
- func UnixSecondsValue[S any, V instantValue](input Selected[S, V]) Selected[S, decimal.Decimal]
- func UpperNullableValue[S any, V ~string](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[string]]
- func UpperValue[S any, V ~string](input Selected[S, V]) Selected[S, string]
- func YearNullableValue[S any, V calendarValue](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[int64]]
- func YearValue[S any, V calendarValue](input Selected[S, V]) Selected[S, int64]
- type SelectedOrder
- type TextFilterAdapter
- func (a TextFilterAdapter[S, V]) Contains(v V) Predicate[S]
- func (a TextFilterAdapter[S, V]) Eq(v V) Predicate[S]
- func (a TextFilterAdapter[S, V]) Gt(v V) Predicate[S]
- func (a TextFilterAdapter[S, V]) Gte(v V) Predicate[S]
- func (a TextFilterAdapter[S, V]) IContains(v V) Predicate[S]
- func (a TextFilterAdapter[S, V]) In(vs ...V) Predicate[S]
- func (a TextFilterAdapter[S, V]) Like(v V) Predicate[S]
- func (a TextFilterAdapter[S, V]) Lt(v V) Predicate[S]
- func (a TextFilterAdapter[S, V]) Lte(v V) Predicate[S]
- func (a TextFilterAdapter[S, V]) Ne(v V) Predicate[S]
- type TextRowExpression
- func Concat[S any, V, W ~string](input RowValue[S, V], other RowValue[S, W]) TextRowExpression[S, string]
- func ConcatWS[S any, V ~string](separator string, first RowValue[S, V], rest ...RowValue[S, V]) TextRowExpression[S, string]
- func ConcatWSNullable[S any, V ~string](separator string, first RowValue[S, value.Nullable[V]], ...) TextRowExpression[S, string]
- func Lower[S any, V ~string](input RowValue[S, V]) TextRowExpression[S, string]
- func Replace[S any, V, W, X ~string](input RowValue[S, V], other RowValue[S, W], replacement RowValue[S, X]) TextRowExpression[S, string]
- func Substring[S any, V ~string](input RowValue[S, V], start int32, count int32) TextRowExpression[S, string]
- func SubstringAt[S any, V ~string, I integerNumber](input RowValue[S, V], start, count RowValue[S, I]) TextRowExpression[S, string]
- func SubstringFrom[S any, V ~string](input RowValue[S, V], start int32) TextRowExpression[S, string]
- func TextRow[S any, V ~string](column orm.TextExpressionColumn[S, V, V]) TextRowExpression[S, V]
- func TextRowAt[S, M any, V ~string](scope Scope[S, M], column orm.TextExpressionColumn[M, V, V]) TextRowExpression[S, V]
- func TextRowValue[S any, V ~string](v RowValue[S, V]) TextRowExpression[S, V]
- func Trim[S any, V ~string](input RowValue[S, V]) TextRowExpression[S, string]
- func TrimChars[S any, V, W ~string](input RowValue[S, V], other RowValue[S, W]) TextRowExpression[S, string]
- func TrimLeft[S any, V ~string](input RowValue[S, V]) TextRowExpression[S, string]
- func TrimLeftChars[S any, V, W ~string](input RowValue[S, V], other RowValue[S, W]) TextRowExpression[S, string]
- func TrimRight[S any, V ~string](input RowValue[S, V]) TextRowExpression[S, string]
- func TrimRightChars[S any, V, W ~string](input RowValue[S, V], other RowValue[S, W]) TextRowExpression[S, string]
- func Upper[S any, V ~string](input RowValue[S, V]) TextRowExpression[S, string]
- type TextValueComparison
- type TextValueFilterAdapter
- func (a TextValueFilterAdapter[S, V]) Contains(v V) HavingPredicate[S]
- func (a TextValueFilterAdapter[S, V]) Eq(v V) HavingPredicate[S]
- func (a TextValueFilterAdapter[S, V]) Gt(v V) HavingPredicate[S]
- func (a TextValueFilterAdapter[S, V]) Gte(v V) HavingPredicate[S]
- func (a TextValueFilterAdapter[S, V]) IContains(v V) HavingPredicate[S]
- func (a TextValueFilterAdapter[S, V]) In(vs ...V) HavingPredicate[S]
- func (a TextValueFilterAdapter[S, V]) Like(v V) HavingPredicate[S]
- func (a TextValueFilterAdapter[S, V]) Lt(v V) HavingPredicate[S]
- func (a TextValueFilterAdapter[S, V]) Lte(v V) HavingPredicate[S]
- func (a TextValueFilterAdapter[S, V]) Ne(v V) HavingPredicate[S]
- type TextValueOperand
- type TimeZone
- type TimestampUnit
- type ValueCase
- type ValueComparison
- type ValueFilterAdapter
- type ValueOperand
- type ValueOrderSource
- type Window
- func (w Window[S]) ExcludeCurrentRow() Window[S]
- func (w Window[S]) ExcludeGroup() Window[S]
- func (w Window[S]) ExcludeNone() Window[S]
- func (w Window[S]) ExcludeTies() Window[S]
- func (w Window[S]) GroupsBetween(start, end FrameBoundary) Window[S]
- func (w Window[S]) Named(name string) Window[S]
- func (w Window[S]) OrderBy(orders ...ProjectionOrder[S]) Window[S]
- func (w Window[S]) PartitionBy(keys ...GroupKey[S]) Window[S]
- func (w Window[S]) PartitionByValues(keys ...ProjectionKey[S]) Window[S]
- func (w Window[S]) RangeBetween(start, end FramePosition) Window[S]
- func (w Window[S]) RowsBetween(start, end FrameBoundary) Window[S]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Filter ¶ added in v0.3.0
func Filter[S any, A FilterableAggregate[S, A]](a A, predicates ...Predicate[S]) A
Filter adds same-scope row predicates to one aggregate and retains its concrete result type.
Example: expr.Filter(expr.Count[User](), expr.Eq(age, 18))
func FoundryAggregate ¶
func FoundryAggregate[S, V any](a AggregateExpression[S, V], seal sqlowner.ExpressionSeal) (ormcore.Expression, ormcore.Column[V])
FoundryAggregate supplies validated descriptor metadata and codec to relation loaders.
Example: expr.FoundryAggregate(a, seal)
func FoundryExpression ¶
func FoundryExpression[S, V, P any](e Expression[S, V, P], seal sqlowner.ExpressionSeal) ormcore.Expression
FoundryExpression exposes sealed SQL metadata to rows.
Example: expr.FoundryExpression(e, seal)
func FoundryGroup ¶
func FoundryGroup[S any](key GroupKey[S], seal sqlowner.ExpressionSeal) ormcore.Expression
FoundryGroup supplies validated row-key metadata to rows.
Example: expr.FoundryGroup(key, seal)
func FoundryHaving ¶
func FoundryHaving[S any](p HavingPredicate[S], seal sqlowner.ExpressionSeal) ormcore.Predicate
FoundryHaving supplies validated group-condition metadata to rows.
Example: expr.FoundryHaving(p, seal)
func FoundryKey ¶
func FoundryKey[S any](key ProjectionKey[S], seal sqlowner.ExpressionSeal) ormcore.Expression
FoundryKey supplies validated selected-key metadata to rows.
Example: expr.FoundryKey(key, seal)
func FoundryNullableScopeData ¶
func FoundryNullableScopeData[S, M any](scope NullableScope[S, M], seal sqlowner.ExpressionSeal) ormcore.Scope
FoundryNullableScopeData exposes validated nullable metadata.
Example: expr.FoundryNullableScopeData(scope, seal)
func FoundryOrder ¶
FoundryOrder exposes sealed ordering to rows.
Example: expr.FoundryOrder(o, seal)
func FoundryPredicate ¶
FoundryPredicate exposes a sealed condition to rows.
Example: expr.FoundryPredicate(p, seal)
func FoundryProjectionOrder ¶
func FoundryProjectionOrder[S any](order ProjectionOrder[S], seal sqlowner.ExpressionSeal) ormcore.Order
FoundryProjectionOrder validates before reading an ordering descriptor.
Example: expr.FoundryProjectionOrder(order, seal)
func FoundryRowValue ¶
func FoundryRowValue[S, V any](e RowValue[S, V], seal sqlowner.ExpressionSeal) ormcore.Expression
FoundryRowValue exposes validated row metadata without admitting selected values.
Example: expr.FoundryRowValue(e, seal)
func FoundryScopeData ¶
FoundryScopeData exposes sealed metadata to rows.
Example: expr.FoundryScopeData(s, seal)
func FoundrySelected ¶
func FoundrySelected[S, V any](e Selected[S, V], seal sqlowner.ExpressionSeal) ormcore.Expression
FoundrySelected exposes sealed selected metadata to rows.
Example: expr.FoundrySelected(e, seal)
func FoundrySelectedColumn ¶
func FoundrySelectedColumn[S, V any](e Selected[S, V], seal sqlowner.ExpressionSeal) ormcore.Column[V]
FoundrySelectedColumn retains concrete value codecs across a subquery boundary.
Example: expr.FoundrySelectedColumn(e, seal)
func OrderBy ¶
OrderBy applies computed row ordering to an unaliased model query.
Example: expr.OrderBy(q, orders...)
func Related ¶
func Related[M, N, V any](source orm.AggregateSource[M, N], computation AggregateExpression[N, V]) orm.AggregateRelation[M, V]
Related computes a typed relation aggregate; bind it with a slot's Using method.
Example: expr.Related(source, computation)
func RelationFilter ¶
RelationFilter adapts expression predicates for a relation's typed target.
Example: expr.RelationFilter(r, p)
func RelationOrder ¶
RelationOrder adapts a computed row order to a relation's actual target.
Example: expr.RelationOrder(r, o)
func RelationPivotOrder ¶
RelationPivotOrder adapts a computed row order to the relation's actual pivot.
Example: expr.RelationPivotOrder(r, o)
Types ¶
type Aggregate ¶
type Aggregate[S, V any] = aggregate[*S, V]
Aggregate is an unordered selected aggregate.
Example: expr.Exists[User]()
type AggregateExpression ¶
type AggregateExpression[S, V any] interface { // contains filtered or unexported methods }
AggregateExpression is the reusable, sealed aggregate descriptor for relation slots. It retains the input scope and exact result/codec, including nullable results.
Example: var aggregate expr.AggregateExpression[User, int64] = expr.Count[User]()
type Case ¶
type Case[S, V any] struct { // contains filtered or unexported fields }
Case is unfinished row CASE; Else or ElseNull must finish it before use.
Example: expr.When(expr.Gt(age, 18), name).Else(fallback)
func When ¶
When starts row CASE with a same-owner row condition and result.
Example: expr.When(condition, result)
func (Case[S, V]) Else ¶
func (c Case[S, V]) Else(result RowValue[S, V]) RowExpression[S, V]
Else finishes row CASE with a matching fallback.
Example: choice.Else(name)
type CompareFilterAdapter ¶ added in v0.3.0
type CompareFilterAdapter[S, V any] struct { // contains filtered or unexported fields }
CompareFilterAdapter adapts a typed row value for datatable equality filters.
Example: expr.CompareFilter(state)
func CompareFilter ¶ added in v0.3.0
func CompareFilter[S, V any](e RowValue[S, V]) CompareFilterAdapter[S, V]
CompareFilter adapts any typed row value for datatable equality and membership filters, preserving its exact scope and value type. It grants no ordering or text operations.
Example: datatable.Where(http.BoolQuery[bool](), expr.CompareFilter(expr.JSONContains(settings, wanted)))
func (CompareFilterAdapter[S, V]) Eq ¶ added in v0.3.0
func (a CompareFilterAdapter[S, V]) Eq(v V) Predicate[S]
Eq compares equality within the adapter's row scope.
func (CompareFilterAdapter[S, V]) In ¶ added in v0.3.0
func (a CompareFilterAdapter[S, V]) In(vs ...V) Predicate[S]
In tests membership within the adapter's row scope.
func (CompareFilterAdapter[S, V]) Ne ¶ added in v0.3.0
func (a CompareFilterAdapter[S, V]) Ne(v V) Predicate[S]
Ne compares inequality within the adapter's row scope.
type DateUnit ¶
type DateUnit uint8
DateUnit identifies a calendar boundary. Clock units cannot be supplied to TruncateDate without an explicit invalid conversion.
Example: expr.DateMonth
const ( DateDay DateUnit = DateUnit(unitDay) DateWeek DateUnit = DateUnit(unitWeek) DateMonth DateUnit = DateUnit(unitMonth) DateQuarter DateUnit = DateUnit(unitQuarter) DateYear DateUnit = DateUnit(unitYear) DateDecade DateUnit = DateUnit(unitDecade) DateCentury DateUnit = DateUnit(unitCentury) DateMillennium DateUnit = DateUnit(unitMillennium) )
type Expression ¶
type Expression[S, V, P any] = expression[*S, V, P]
Expression keeps a scoped SQL value and its codec closures.
Example: expr.At(scope, orm.KeyExpr(Orders.ID))
func At ¶
func At[S, M, V, P any](scope Scope[S, M], column orm.ExpressionColumn[M, V, P]) Expression[S, V, P]
At re-scopes a model column without erasing its value type.
Example: expr.At(scope, column)
func AtNullable ¶
func AtNullable[S, M, V any](scope NullableScope[S, M], column orm.ExpressionColumn[M, V, V]) Expression[S, V, value.Nullable[V]]
AtNullable widens a required column on an outer join's nullable side.
Example: expr.AtNullable(scope, column)
func AtNullableValue ¶
func AtNullableValue[S, M, V any](scope NullableScope[S, M], column orm.ExpressionColumn[M, V, value.Nullable[V]]) Expression[S, V, value.Nullable[V]]
AtNullableValue preserves one nullable layer for an already nullable column.
Example: expr.AtNullableValue(scope, column)
func Value ¶
func Value[M, V, P any](column orm.ExpressionColumn[M, V, P]) Expression[M, V, P]
Value uses a column in its unaliased model scope.
Example: expr.Value(column)
type FilterableAggregate ¶ added in v0.3.0
FilterableAggregate preserves the concrete aggregate type when adding row filters.
Example: var source expr.FilterableAggregate[User, expr.OrderedAggregate[User, int64]] = expr.Count[User]()
type FrameBoundary ¶
type FrameBoundary interface {
// contains filtered or unexported methods
}
FrameBoundary is a sealed ROWS/GROUPS position or offset.
Example: w.RowsBetween(expr.Preceding(1), expr.CurrentRow())
type FrameOffset ¶
type FrameOffset struct {
// contains filtered or unexported fields
}
FrameOffset counts rows/groups, not RANGE value distance.
Example: expr.Preceding(2)
func Following ¶
func Following(count int64) FrameOffset
Following counts nonnegative rows/groups after the current row.
Example: expr.Following(count)
func Preceding ¶
func Preceding(count int64) FrameOffset
Preceding counts nonnegative rows/groups before the current row.
Example: expr.Preceding(count)
type FramePosition ¶
type FramePosition struct {
// contains filtered or unexported fields
}
FramePosition is a current/unbounded position, with an invalid zero value.
Example: expr.CurrentRow()
func CurrentRow ¶
func CurrentRow() FramePosition
CurrentRow identifies the current row or peers.
Example: expr.CurrentRow()
func UnboundedFollowing ¶
func UnboundedFollowing() FramePosition
UnboundedFollowing identifies the partition's last row.
Example: expr.UnboundedFollowing()
func UnboundedPreceding ¶
func UnboundedPreceding() FramePosition
UnboundedPreceding identifies the partition's first row.
Example: expr.UnboundedPreceding()
type GeographicPoint ¶
type GeographicPoint struct {
// contains filtered or unexported fields
}
GeographicPoint is a validated latitude/longitude pair in degrees. Its zero value is the valid origin (0, 0); construction rejects non-finite/out-of-range input.
Example: expr.NewGeographicPoint(3.14, 101.69)
func NewGeographicPoint ¶
func NewGeographicPoint(latitude, longitude float64) (GeographicPoint, error)
NewGeographicPoint validates latitude and longitude in degrees.
Example: expr.NewGeographicPoint(latitude, longitude)
type GroupKey ¶
type GroupKey[S any] struct { // contains filtered or unexported fields }
GroupKey is a row-phase key for GROUP BY and DISTINCT ON.
Example: expr.Group(expr.Value(orm.TextExpr(Users.Email)))
type HavingPredicate ¶
type HavingPredicate[S any] = havingPredicate[*S]
HavingPredicate is a group condition and cannot enter row WHERE.
Example: expr.GtValue(expr.Count[User](), 0)
func DistinctFromValue ¶
func DistinctFromValue[S any, V any](left, right Selected[S, V]) HavingPredicate[S]
DistinctFromValue is DistinctFrom's selected counterpart, producing a HAVING predicate. SQL grouping and window restrictions still apply to both operands.
Example: expr.DistinctFromValue(left, right)
func EqValue ¶ added in v0.3.0
func EqValue[S, V any](source ValueOperand[S, V], v V) HavingPredicate[S]
EqValue tests equality in HAVING using the operand's exact comparison type. Nullable operands bind present values without changing their SQL null semantics.
Example: expr.EqValue(expr.Count[User](), int64(1))
func EqualValue ¶
func EqualValue[S any, V any](left, right Selected[S, V]) HavingPredicate[S]
EqualValue is Equal's selected counterpart, producing a HAVING predicate. SQL grouping and window restrictions still apply to both operands.
Example: expr.EqualValue(left, right)
func GreaterNullableValue ¶
func GreaterNullableValue[S any, V orderedScalar](left, right Selected[S, value.Nullable[V]]) HavingPredicate[S]
GreaterNullableValue compares nullable selected operands for HAVING.
Example: expr.GreaterNullableValue(left, right)
func GreaterOrEqualNullableValue ¶
func GreaterOrEqualNullableValue[S any, V orderedScalar](left, right Selected[S, value.Nullable[V]]) HavingPredicate[S]
GreaterOrEqualNullableValue compares nullable selected operands for HAVING.
Example: expr.GreaterOrEqualNullableValue(left, right)
func GreaterOrEqualValue ¶
func GreaterOrEqualValue[S any, V orderedScalar](left, right Selected[S, V]) HavingPredicate[S]
GreaterOrEqualValue is GreaterOrEqual's selected counterpart, producing a HAVING predicate. SQL grouping and window restrictions still apply to both operands.
Example: expr.GreaterOrEqualValue(left, right)
func GreaterValue ¶
func GreaterValue[S any, V orderedScalar](left, right Selected[S, V]) HavingPredicate[S]
GreaterValue is Greater's selected counterpart, producing a HAVING predicate. SQL grouping and window restrictions still apply to both operands.
Example: expr.GreaterValue(left, right)
func Grouped ¶
func Grouped[S any](condition Predicate[S]) HavingPredicate[S]
Grouped lifts a row predicate into the group phase; SQL grouping still applies.
Example: expr.Grouped(condition)
func GtValue ¶ added in v0.3.0
func GtValue[S, V any](source OrderedValueOperand[S, V], v V) HavingPredicate[S]
GtValue tests whether a selected value is greater than its bound in HAVING. Nullable operands bind present values without changing their SQL null semantics.
Example: expr.GtValue(expr.Count[User](), int64(1))
func GteValue ¶ added in v0.3.0
func GteValue[S, V any](source OrderedValueOperand[S, V], v V) HavingPredicate[S]
GteValue tests whether a selected value is greater than or equal to its bound in HAVING. Nullable operands bind present values without changing their SQL null semantics.
Example: expr.GteValue(expr.Count[User](), int64(1))
func HavingAnd ¶
func HavingAnd[S any](predicates ...HavingPredicate[S]) HavingPredicate[S]
HavingAnd joins group predicates with AND; empty is TRUE.
Example: expr.HavingAnd(predicates...)
func HavingNot ¶ added in v0.3.0
func HavingNot[S any](p HavingPredicate[S]) HavingPredicate[S]
HavingNot negates a group predicate without changing its phase or scope.
Example: expr.HavingNot(p)
func HavingOr ¶
func HavingOr[S any](predicates ...HavingPredicate[S]) HavingPredicate[S]
HavingOr joins group predicates with OR; empty is FALSE.
Example: expr.HavingOr(predicates...)
func InValue ¶ added in v0.3.0
func InValue[S, V any](source ValueOperand[S, V], vs ...V) HavingPredicate[S]
InValue tests membership in HAVING using the operand's exact comparison type. Nullable operands bind present values without changing their SQL null semantics.
Example: expr.InValue(expr.Count[User](), int64(1))
func IsNotNullValue ¶ added in v0.3.0
func IsNotNullValue[S, V any](source NullValueOperand[S, V]) HavingPredicate[S]
IsNotNullValue tests SQL presence in HAVING.
Example: expr.IsNotNullValue(expr.Sum(orm.NumberExpr(Orders.Total)))
func IsNullValue ¶ added in v0.3.0
func IsNullValue[S, V any](source NullValueOperand[S, V]) HavingPredicate[S]
IsNullValue tests SQL nullness in HAVING.
Example: expr.IsNullValue(expr.Sum(orm.NumberExpr(Orders.Total)))
func LessNullableValue ¶
func LessNullableValue[S any, V orderedScalar](left, right Selected[S, value.Nullable[V]]) HavingPredicate[S]
LessNullableValue compares nullable selected operands for HAVING.
Example: expr.LessNullableValue(left, right)
func LessOrEqualNullableValue ¶
func LessOrEqualNullableValue[S any, V orderedScalar](left, right Selected[S, value.Nullable[V]]) HavingPredicate[S]
LessOrEqualNullableValue compares nullable selected operands for HAVING.
Example: expr.LessOrEqualNullableValue(left, right)
func LessOrEqualValue ¶
func LessOrEqualValue[S any, V orderedScalar](left, right Selected[S, V]) HavingPredicate[S]
LessOrEqualValue is LessOrEqual's selected counterpart, producing a HAVING predicate. SQL grouping and window restrictions still apply to both operands.
Example: expr.LessOrEqualValue(left, right)
func LessValue ¶
func LessValue[S any, V orderedScalar](left, right Selected[S, V]) HavingPredicate[S]
LessValue is Less's selected counterpart, producing a HAVING predicate. SQL grouping and window restrictions still apply to both operands.
Example: expr.LessValue(left, right)
func LikeNullableValue ¶
func LikeNullableValue[S any, V ~string](left, right Selected[S, value.Nullable[V]]) HavingPredicate[S]
LikeNullableValue compares nullable selected operands for HAVING.
Example: expr.LikeNullableValue(left, right)
func LikeValue ¶
func LikeValue[S any, V ~string](left, right Selected[S, V]) HavingPredicate[S]
LikeValue is Like's selected counterpart, producing a HAVING predicate. SQL grouping and window restrictions still apply to both operands.
Example: expr.LikeValue(left, right)
func LtValue ¶ added in v0.3.0
func LtValue[S, V any](source OrderedValueOperand[S, V], v V) HavingPredicate[S]
LtValue tests whether a selected value is less than its bound in HAVING. Nullable operands bind present values without changing their SQL null semantics.
Example: expr.LtValue(expr.Count[User](), int64(1))
func LteValue ¶ added in v0.3.0
func LteValue[S, V any](source OrderedValueOperand[S, V], v V) HavingPredicate[S]
LteValue tests whether a selected value is less than or equal to its bound in HAVING. Nullable operands bind present values without changing their SQL null semantics.
Example: expr.LteValue(expr.Count[User](), int64(1))
func NeValue ¶ added in v0.3.0
func NeValue[S, V any](source ValueOperand[S, V], v V) HavingPredicate[S]
NeValue tests inequality in HAVING using the operand's exact comparison type. Nullable operands bind present values without changing their SQL null semantics.
Example: expr.NeValue(expr.Count[User](), int64(1))
func NotDistinctFromValue ¶
func NotDistinctFromValue[S any, V any](left, right Selected[S, V]) HavingPredicate[S]
NotDistinctFromValue is NotDistinctFrom's selected counterpart, producing a HAVING predicate. SQL grouping and window restrictions still apply to both operands.
Example: expr.NotDistinctFromValue(left, right)
func NotEqualValue ¶
func NotEqualValue[S any, V any](left, right Selected[S, V]) HavingPredicate[S]
NotEqualValue is NotEqual's selected counterpart, producing a HAVING predicate. SQL grouping and window restrictions still apply to both operands.
Example: expr.NotEqualValue(left, right)
func TextContainsValue ¶ added in v0.3.0
func TextContainsValue[S any, V ~string](source TextValueOperand[S, V], v V) HavingPredicate[S]
TextContainsValue compares selected text in HAVING with the database collation. Nullable operands compare present text while preserving SQL null semantics.
Example: expr.TextContainsValue(expr.TextValue(selectedName), "a")
func TextEndsWithValue ¶ added in v0.3.0
func TextEndsWithValue[S any, V ~string](source TextValueOperand[S, V], v V) HavingPredicate[S]
TextEndsWithValue compares selected text in HAVING with the database collation. Nullable operands compare present text while preserving SQL null semantics.
Example: expr.TextEndsWithValue(expr.TextValue(selectedName), "a")
func TextIContainsValue ¶ added in v0.3.0
func TextIContainsValue[S any, V ~string](source TextValueOperand[S, V], v V) HavingPredicate[S]
TextIContainsValue compares selected text in HAVING with the database collation. Nullable operands compare present text while preserving SQL null semantics.
Example: expr.TextIContainsValue(expr.TextValue(selectedName), "a")
func TextIEndsWithValue ¶ added in v0.3.0
func TextIEndsWithValue[S any, V ~string](source TextValueOperand[S, V], v V) HavingPredicate[S]
TextIEndsWithValue compares selected text in HAVING with the database collation. Nullable operands compare present text while preserving SQL null semantics.
Example: expr.TextIEndsWithValue(expr.TextValue(selectedName), "a")
func TextILikeValue ¶ added in v0.3.0
func TextILikeValue[S any, V ~string](source TextValueOperand[S, V], v V) HavingPredicate[S]
TextILikeValue compares selected text in HAVING with the database collation. Nullable operands compare present text while preserving SQL null semantics.
Example: expr.TextILikeValue(expr.TextValue(selectedName), "a")
func TextIStartsWithValue ¶ added in v0.3.0
func TextIStartsWithValue[S any, V ~string](source TextValueOperand[S, V], v V) HavingPredicate[S]
TextIStartsWithValue compares selected text in HAVING with the database collation. Nullable operands compare present text while preserving SQL null semantics.
Example: expr.TextIStartsWithValue(expr.TextValue(selectedName), "a")
func TextLikeValue ¶ added in v0.3.0
func TextLikeValue[S any, V ~string](source TextValueOperand[S, V], v V) HavingPredicate[S]
TextLikeValue compares selected text in HAVING with the database collation. Nullable operands compare present text while preserving SQL null semantics.
Example: expr.TextLikeValue(expr.TextValue(selectedName), "a")
func TextStartsWithValue ¶ added in v0.3.0
func TextStartsWithValue[S any, V ~string](source TextValueOperand[S, V], v V) HavingPredicate[S]
TextStartsWithValue compares selected text in HAVING with the database collation. Nullable operands compare present text while preserving SQL null semantics.
Example: expr.TextStartsWithValue(expr.TextValue(selectedName), "a")
type JSONField ¶
type JSONField[P, V any] struct { // contains filtered or unexported fields }
JSONField binds a payload field to its JSON tag.
Example: expr.JSONFieldOf(func(p *Profile) *string {
return &p.Name
})
Call Validate at startup. Owner and result types are invariant, even under conversion.
func JSONFieldOf ¶
JSONFieldOf resolves a direct pointer selector against a fresh payload at startup. Ignored, ambiguous, foreign, zero-sized and opaque custom-encoded fields fail closed.
Example: expr.JSONFieldOf(func(p *Profile) *string {
return &p.Name
})
type JSONFixedArray ¶
type JSONFixedArray[P, V any] struct { // contains filtered or unexported fields }
JSONFixedArray binds a fixed Go array's element type without generated accessors.
Example: JSONFixedArrayOf(func(a *[3]string) *string {
return &a[0]
})
func JSONFixedArrayOf ¶
func JSONFixedArrayOf[P, V any](selectElement func(*P) *V) JSONFixedArray[P, V]
JSONFixedArrayOf validates an element selector once; query-time indices remain int32.
Example: expr.JSONFixedArrayOf(func(p *[3]int64) *int64 {
return &p[0]
})
func (JSONFixedArray[P, V]) Validate ¶
func (a JSONFixedArray[P, V]) Validate() error
Validate reports invalid fixed-array declarations.
Example: ThreeNames.Validate()
type JSONPath ¶
type JSONPath[S, P any] struct { // contains filtered or unexported fields }
JSONPath retains its row owner and exact payload without embedded method chains.
Example: expr.JSONProperty(parent, field)
func JSONArrayElement ¶
func JSONArrayElement[S, P, V any](parent JSONPath[S, P], array JSONFixedArray[P, V], index int32) JSONPath[S, V]
JSONArrayElement selects a fixed array element using its validated declaration.
Example: expr.JSONArrayElement(parent, array, index)
func JSONDocument ¶
JSONDocument unwraps a nested JSON value's payload without changing its SQL node.
Example: expr.JSONDocument(path)
func JSONIndex ¶
JSONIndex selects a typed slice element. Negative int32 indices count from the end.
Example: expr.JSONIndex(parent, index)
func JSONMapKey ¶
func JSONMapKey[S any, P ~map[K]V, K comparable, V any](parent JSONPath[S, P], key K) JSONPath[S, V]
JSONMapKey preserves the map's declared key and element types, including named keys.
Example: expr.JSONMapKey(parent, key)
func JSONNullable ¶
JSONNullable unwraps payload nullability; JSON/Kind still distinguish JSON null.
Example: expr.JSONNullable(path)
func JSONNullableRoot ¶
JSONNullableRoot preserves a SQL-null document ancestor.
Example: expr.JSONNullableRoot(input)
func JSONOptional ¶
JSONOptional unwraps property presence into path presence; no SQL cast is added.
Example: expr.JSONOptional(path)
func JSONPointer ¶
JSONPointer unwraps a pointer payload for typed traversal or scalar extraction.
Example: expr.JSONPointer(path)
func JSONProperty ¶
JSONProperty applies a startup-validated field declaration. The json tag is a SQL literal for expression-index parity; query-time map keys remain parameters.
Example: expr.JSONProperty(parent, field)
func JSONRoot ¶
JSONRoot starts a row path; selected expressions cannot become path predicates.
Example: expr.JSONRoot(input)
type LocalResolution ¶
type LocalResolution uint8
LocalResolution explicitly selects PostgreSQL's DST gap/overlap policy.
Example: expr.PostgresStandardTime
const PostgresStandardTime LocalResolution = LocalResolution(querycore.PostgresStandardTime)
type NullValueOperand ¶ added in v0.3.0
type NullValueOperand[S, V any] interface { ValueOperand[S, V] // contains filtered or unexported methods }
NullValueOperand supplies SQL null tests in HAVING.
Example: var source expr.NullValueOperand[Order, decimal.Decimal] = expr.Sum(orm.NumberExpr(Orders.Total))
type NullableCompareFilterAdapter ¶ added in v0.3.0
type NullableCompareFilterAdapter[S, V any] struct { // contains filtered or unexported fields }
NullableCompareFilterAdapter adapts a nullable row value for datatable equality filters.
Example: expr.NullableCompareFilter(state)
func NullableCompareFilter ¶ added in v0.3.0
func NullableCompareFilter[S, V any](e RowValue[S, value.Nullable[V]]) NullableCompareFilterAdapter[S, V]
NullableCompareFilter adapts any nullable typed row value for datatable present-value equality, membership and SQL null tests, preserving its exact scope and value type.
Example: datatable.NullableWhere(http.BoolQuery[bool](), expr.NullableCompareFilter(matches))
func (NullableCompareFilterAdapter[S, V]) Eq ¶ added in v0.3.0
func (a NullableCompareFilterAdapter[S, V]) Eq(v V) Predicate[S]
Eq compares equality within the adapter's row scope.
func (NullableCompareFilterAdapter[S, V]) In ¶ added in v0.3.0
func (a NullableCompareFilterAdapter[S, V]) In(vs ...V) Predicate[S]
In tests membership within the adapter's row scope.
func (NullableCompareFilterAdapter[S, V]) IsNotNull ¶ added in v0.3.0
func (a NullableCompareFilterAdapter[S, V]) IsNotNull() Predicate[S]
IsNotNull tests SQL presence within the adapter's row scope.
func (NullableCompareFilterAdapter[S, V]) IsNull ¶ added in v0.3.0
func (a NullableCompareFilterAdapter[S, V]) IsNull() Predicate[S]
IsNull tests SQL nullness within the adapter's row scope.
func (NullableCompareFilterAdapter[S, V]) Ne ¶ added in v0.3.0
func (a NullableCompareFilterAdapter[S, V]) Ne(v V) Predicate[S]
Ne compares inequality within the adapter's row scope.
type NullableOrderFilterAdapter ¶ added in v0.3.0
type NullableOrderFilterAdapter[S any, V orderedScalar] struct { // contains filtered or unexported fields }
NullableOrderFilterAdapter adapts a nullable ordered row expression for datatable filters.
Example: expr.NullableOrderFilter(age)
func NullableOrderFilter ¶ added in v0.3.0
func NullableOrderFilter[S any, V orderedScalar](e NullableOrderedRowExpression[S, V]) NullableOrderFilterAdapter[S, V]
NullableOrderFilter adapts NullableOrderedRowExpression for datatable filters.
Example: expr.NullableOrderFilter(e)
func (NullableOrderFilterAdapter[S, V]) Eq ¶ added in v0.3.0
func (a NullableOrderFilterAdapter[S, V]) Eq(v V) Predicate[S]
Eq compares equality within the adapter's row scope.
func (NullableOrderFilterAdapter[S, V]) Gt ¶ added in v0.3.0
func (a NullableOrderFilterAdapter[S, V]) Gt(v V) Predicate[S]
Gt compares greater than within the adapter's row scope.
func (NullableOrderFilterAdapter[S, V]) Gte ¶ added in v0.3.0
func (a NullableOrderFilterAdapter[S, V]) Gte(v V) Predicate[S]
Gte compares greater than or equal within the adapter's row scope.
func (NullableOrderFilterAdapter[S, V]) In ¶ added in v0.3.0
func (a NullableOrderFilterAdapter[S, V]) In(vs ...V) Predicate[S]
In tests membership within the adapter's row scope.
func (NullableOrderFilterAdapter[S, V]) IsNotNull ¶ added in v0.3.0
func (a NullableOrderFilterAdapter[S, V]) IsNotNull() Predicate[S]
IsNotNull tests SQL presence within the adapter's row scope.
func (NullableOrderFilterAdapter[S, V]) IsNull ¶ added in v0.3.0
func (a NullableOrderFilterAdapter[S, V]) IsNull() Predicate[S]
IsNull tests SQL nullness within the adapter's row scope.
func (NullableOrderFilterAdapter[S, V]) Lt ¶ added in v0.3.0
func (a NullableOrderFilterAdapter[S, V]) Lt(v V) Predicate[S]
Lt compares less than within the adapter's row scope.
func (NullableOrderFilterAdapter[S, V]) Lte ¶ added in v0.3.0
func (a NullableOrderFilterAdapter[S, V]) Lte(v V) Predicate[S]
Lte compares less than or equal within the adapter's row scope.
func (NullableOrderFilterAdapter[S, V]) Ne ¶ added in v0.3.0
func (a NullableOrderFilterAdapter[S, V]) Ne(v V) Predicate[S]
Ne compares inequality within the adapter's row scope.
type NullableOrderValueFilterAdapter ¶ added in v0.3.0
type NullableOrderValueFilterAdapter[S any, V orderedScalar] struct { // contains filtered or unexported fields }
NullableOrderValueFilterAdapter supplies typed HAVING operations to datatable filters.
Example: expr.NullableOrderValueFilter(source)
func NullableOrderValueFilter ¶ added in v0.3.0
func NullableOrderValueFilter[S any, V orderedScalar](source interface { OrderedValueOperand[S, V] NullValueOperand[S, V] }) NullableOrderValueFilterAdapter[S, V]
NullableOrderValueFilter adapts a selected comparison source without changing scope, value, or phase.
Example: expr.NullableOrderValueFilter(source)
func (NullableOrderValueFilterAdapter[S, V]) Eq ¶ added in v0.3.0
func (a NullableOrderValueFilterAdapter[S, V]) Eq(v V) HavingPredicate[S]
Eq compares equality within the adapter's HAVING scope.
func (NullableOrderValueFilterAdapter[S, V]) Gt ¶ added in v0.3.0
func (a NullableOrderValueFilterAdapter[S, V]) Gt(v V) HavingPredicate[S]
Gt compares greater than within the adapter's HAVING scope.
func (NullableOrderValueFilterAdapter[S, V]) Gte ¶ added in v0.3.0
func (a NullableOrderValueFilterAdapter[S, V]) Gte(v V) HavingPredicate[S]
Gte compares greater than or equal within the adapter's HAVING scope.
func (NullableOrderValueFilterAdapter[S, V]) In ¶ added in v0.3.0
func (a NullableOrderValueFilterAdapter[S, V]) In(vs ...V) HavingPredicate[S]
In tests membership within the adapter's HAVING scope.
func (NullableOrderValueFilterAdapter[S, V]) IsNotNull ¶ added in v0.3.0
func (a NullableOrderValueFilterAdapter[S, V]) IsNotNull() HavingPredicate[S]
IsNotNull tests SQL presence within the adapter's HAVING scope.
func (NullableOrderValueFilterAdapter[S, V]) IsNull ¶ added in v0.3.0
func (a NullableOrderValueFilterAdapter[S, V]) IsNull() HavingPredicate[S]
IsNull tests SQL nullness within the adapter's HAVING scope.
func (NullableOrderValueFilterAdapter[S, V]) Lt ¶ added in v0.3.0
func (a NullableOrderValueFilterAdapter[S, V]) Lt(v V) HavingPredicate[S]
Lt compares less than within the adapter's HAVING scope.
func (NullableOrderValueFilterAdapter[S, V]) Lte ¶ added in v0.3.0
func (a NullableOrderValueFilterAdapter[S, V]) Lte(v V) HavingPredicate[S]
Lte compares less than or equal within the adapter's HAVING scope.
func (NullableOrderValueFilterAdapter[S, V]) Ne ¶ added in v0.3.0
func (a NullableOrderValueFilterAdapter[S, V]) Ne(v V) HavingPredicate[S]
Ne compares inequality within the adapter's HAVING scope.
type NullableOrderedAggregate ¶
type NullableOrderedAggregate[S any, V orderedScalar] = nullableOrderedAggregate[*S, V]
NullableOrderedAggregate retains a nullable aggregate with present-value comparisons.
Example: expr.GtValue(expr.Sum(orm.NumberExpr(Orders.Total)), decimal.FromInt64(1))
func Avg ¶
func Avg[S any, V interface{ exactNumber }, P any, C orderedColumn[S, V, P]](column C) NullableOrderedAggregate[S, decimal.Decimal]
Avg returns nullable decimal.Decimal; empty/all-NULL input is NULL.
Example: expr.Avg(column)
func AvgAt ¶
func AvgAt[S, M any, V interface{ exactNumber }, P any, C orderedColumn[M, V, P]](scope Scope[S, M], column C) NullableOrderedAggregate[S, decimal.Decimal]
AvgAt returns nullable decimal.Decimal; empty/all-NULL input is NULL.
Example: expr.AvgAt(scope, column)
func AvgFloat ¶
func AvgFloat[S any, V interface{ ~float32 | ~float64 }, P any, C orderedColumn[S, V, P]](column C) NullableOrderedAggregate[S, float64]
AvgFloat returns nullable float64; empty/all-NULL input is NULL.
Example: expr.AvgFloat(column)
func AvgFloatAt ¶
func AvgFloatAt[S, M any, V interface{ ~float32 | ~float64 }, P any, C orderedColumn[M, V, P]](scope Scope[S, M], column C) NullableOrderedAggregate[S, float64]
AvgFloatAt returns nullable float64; empty/all-NULL input is NULL.
Example: expr.AvgFloatAt(scope, column)
func AvgFloatNullableRow ¶
func AvgFloatNullableRow[S any, V interface{ ~float32 | ~float64 }](input RowExpression[S, value.Nullable[V]]) NullableOrderedAggregate[S, float64]
AvgFloatNullableRow aggregates a declared derived field; empty/all-NULL input remains NULL.
Example: expr.AvgFloatNullableRow(input)
func AvgFloatRow ¶
func AvgFloatRow[S any, V interface{ ~float32 | ~float64 }](input RowExpression[S, V]) NullableOrderedAggregate[S, float64]
AvgFloatRow aggregates a declared derived field; empty/all-NULL input remains NULL.
Example: expr.AvgFloatRow(input)
func AvgInterval ¶
func AvgInterval[S, P any, C orderedColumn[S, temporal.Interval, P]](column C) NullableOrderedAggregate[S, temporal.Interval]
AvgInterval returns nullable temporal.Interval; empty/all-NULL input is NULL.
Example: expr.AvgInterval(column)
func AvgIntervalAt ¶
func AvgIntervalAt[S, M, P any, C orderedColumn[M, temporal.Interval, P]](scope Scope[S, M], column C) NullableOrderedAggregate[S, temporal.Interval]
AvgIntervalAt returns nullable temporal.Interval; empty/all-NULL input is NULL.
Example: expr.AvgIntervalAt(scope, column)
func AvgIntervalNullableRow ¶
func AvgIntervalNullableRow[S any, V temporal.Interval](input RowExpression[S, value.Nullable[V]]) NullableOrderedAggregate[S, temporal.Interval]
AvgIntervalNullableRow aggregates a declared derived field; empty/all-NULL input remains NULL.
Example: expr.AvgIntervalNullableRow(input)
func AvgIntervalRow ¶
func AvgIntervalRow[S any, V temporal.Interval](input RowExpression[S, V]) NullableOrderedAggregate[S, temporal.Interval]
AvgIntervalRow aggregates a declared derived field; empty/all-NULL input remains NULL.
Example: expr.AvgIntervalRow(input)
func AvgNullableRow ¶
func AvgNullableRow[S any, V exactNumber](input RowExpression[S, value.Nullable[V]]) NullableOrderedAggregate[S, decimal.Decimal]
AvgNullableRow aggregates a declared derived field; empty/all-NULL input remains NULL.
Example: expr.AvgNullableRow(input)
func AvgRow ¶
func AvgRow[S any, V exactNumber](input RowExpression[S, V]) NullableOrderedAggregate[S, decimal.Decimal]
AvgRow aggregates a declared derived field; empty/all-NULL input remains NULL.
Example: expr.AvgRow(input)
func Max ¶
func Max[S any, V orderedScalar, P any, C orderedColumn[S, V, P]](column C) NullableOrderedAggregate[S, V]
Max returns the nullable input type; empty/all-NULL input is NULL.
Example: expr.Max(column)
func MaxAt ¶
func MaxAt[S, M any, V orderedScalar, P any, C orderedColumn[M, V, P]](scope Scope[S, M], column C) NullableOrderedAggregate[S, V]
MaxAt returns the nullable input type; empty/all-NULL input is NULL.
Example: expr.MaxAt(scope, column)
func MaxNullableRow ¶
func MaxNullableRow[S any, V orderedScalar](input RowExpression[S, value.Nullable[V]]) NullableOrderedAggregate[S, V]
MaxNullableRow retains the input codec with exactly one nullable layer.
Example: expr.MaxNullableRow(input)
func MaxRow ¶
func MaxRow[S any, V orderedScalar](input RowExpression[S, V]) NullableOrderedAggregate[S, V]
MaxRow retains the input codec with exactly one nullable layer.
Example: expr.MaxRow(input)
func Min ¶
func Min[S any, V orderedScalar, P any, C orderedColumn[S, V, P]](column C) NullableOrderedAggregate[S, V]
Min returns the nullable input type; empty/all-NULL input is NULL.
Example: expr.Min(column)
func MinAt ¶
func MinAt[S, M any, V orderedScalar, P any, C orderedColumn[M, V, P]](scope Scope[S, M], column C) NullableOrderedAggregate[S, V]
MinAt returns the nullable input type; empty/all-NULL input is NULL.
Example: expr.MinAt(scope, column)
func MinNullableRow ¶
func MinNullableRow[S any, V orderedScalar](input RowExpression[S, value.Nullable[V]]) NullableOrderedAggregate[S, V]
MinNullableRow retains the input codec with exactly one nullable layer.
Example: expr.MinNullableRow(input)
func MinRow ¶
func MinRow[S any, V orderedScalar](input RowExpression[S, V]) NullableOrderedAggregate[S, V]
MinRow retains the input codec with exactly one nullable layer.
Example: expr.MinRow(input)
func Sum ¶
func Sum[S any, V interface{ exactNumber }, P any, C orderedColumn[S, V, P]](column C) NullableOrderedAggregate[S, decimal.Decimal]
Sum returns nullable decimal.Decimal; empty/all-NULL input is NULL.
Example: expr.Sum(column)
func SumAt ¶
func SumAt[S, M any, V interface{ exactNumber }, P any, C orderedColumn[M, V, P]](scope Scope[S, M], column C) NullableOrderedAggregate[S, decimal.Decimal]
SumAt returns nullable decimal.Decimal; empty/all-NULL input is NULL.
Example: expr.SumAt(scope, column)
func SumFloat ¶
func SumFloat[S any, V interface{ ~float32 | ~float64 }, P any, C orderedColumn[S, V, P]](column C) NullableOrderedAggregate[S, float64]
SumFloat returns nullable float64; empty/all-NULL input is NULL.
Example: expr.SumFloat(column)
func SumFloatAt ¶
func SumFloatAt[S, M any, V interface{ ~float32 | ~float64 }, P any, C orderedColumn[M, V, P]](scope Scope[S, M], column C) NullableOrderedAggregate[S, float64]
SumFloatAt returns nullable float64; empty/all-NULL input is NULL.
Example: expr.SumFloatAt(scope, column)
func SumFloatNullableRow ¶
func SumFloatNullableRow[S any, V interface{ ~float32 | ~float64 }](input RowExpression[S, value.Nullable[V]]) NullableOrderedAggregate[S, float64]
SumFloatNullableRow aggregates a declared derived field; empty/all-NULL input remains NULL.
Example: expr.SumFloatNullableRow(input)
func SumFloatRow ¶
func SumFloatRow[S any, V interface{ ~float32 | ~float64 }](input RowExpression[S, V]) NullableOrderedAggregate[S, float64]
SumFloatRow aggregates a declared derived field; empty/all-NULL input remains NULL.
Example: expr.SumFloatRow(input)
func SumInterval ¶
func SumInterval[S, P any, C orderedColumn[S, temporal.Interval, P]](column C) NullableOrderedAggregate[S, temporal.Interval]
SumInterval returns nullable temporal.Interval; empty/all-NULL input is NULL.
Example: expr.SumInterval(column)
func SumIntervalAt ¶
func SumIntervalAt[S, M, P any, C orderedColumn[M, temporal.Interval, P]](scope Scope[S, M], column C) NullableOrderedAggregate[S, temporal.Interval]
SumIntervalAt returns nullable temporal.Interval; empty/all-NULL input is NULL.
Example: expr.SumIntervalAt(scope, column)
func SumIntervalNullableRow ¶
func SumIntervalNullableRow[S any, V temporal.Interval](input RowExpression[S, value.Nullable[V]]) NullableOrderedAggregate[S, temporal.Interval]
SumIntervalNullableRow aggregates a declared derived field; empty/all-NULL input remains NULL.
Example: expr.SumIntervalNullableRow(input)
func SumIntervalRow ¶
func SumIntervalRow[S any, V temporal.Interval](input RowExpression[S, V]) NullableOrderedAggregate[S, temporal.Interval]
SumIntervalRow aggregates a declared derived field; empty/all-NULL input remains NULL.
Example: expr.SumIntervalRow(input)
func SumNullableRow ¶
func SumNullableRow[S any, V exactNumber](input RowExpression[S, value.Nullable[V]]) NullableOrderedAggregate[S, decimal.Decimal]
SumNullableRow aggregates a declared derived field; empty/all-NULL input remains NULL.
Example: expr.SumNullableRow(input)
func SumRow ¶
func SumRow[S any, V exactNumber](input RowExpression[S, V]) NullableOrderedAggregate[S, decimal.Decimal]
SumRow aggregates a declared derived field; empty/all-NULL input remains NULL.
Example: expr.SumRow(input)
type NullableOrderedRowExpression ¶
type NullableOrderedRowExpression[S any, V orderedScalar] = nullableOrderedRowExpression[*S, V]
NullableOrderedRowExpression retains nullable results and present-value comparisons.
Example: expr.NullableGt(expr.AddNullable(a, b), 2)
func AbsNullable ¶
func AbsNullable[S any, V numericValue](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, V]
AbsNullable propagates SQL NULL and retains the concrete numeric type.
Example: expr.AbsNullable(input)
func AddClockElapsedNullable ¶
func AddClockElapsedNullable[S any](input RowValue[S, value.Nullable[temporal.Time]], duration time.Duration) NullableOrderedRowExpression[S, temporal.Time]
AddClockElapsedNullable adds elapsed time to a time of day, wrapping at midnight. Whole microseconds are required. SQL NULL propagates; widen non-null operands explicitly.
Example: expr.AddClockElapsedNullable(input, duration)
func AddDateDaysNullable ¶
func AddDateDaysNullable[S any](input RowValue[S, value.Nullable[temporal.Date]], days int32) NullableOrderedRowExpression[S, temporal.Date]
AddDateDaysNullable adds signed calendar days and retains the date-only result. SQL NULL propagates; widen non-null operands explicitly.
Example: expr.AddDateDaysNullable(input, days)
func AddDateIntervalNullable ¶
func AddDateIntervalNullable[S any](input RowValue[S, value.Nullable[temporal.Date]], interval temporal.Interval) NullableOrderedRowExpression[S, temporal.LocalDateTime]
AddDateIntervalNullable adds signed calendar and elapsed components. Database overflow and out-of-contract results remain errors. SQL NULL propagates; widen non-null operands explicitly.
Example: expr.AddDateIntervalNullable(input, interval)
func AddInstantIntervalNullable ¶
func AddInstantIntervalNullable[S any, V instantValue](input RowValue[S, value.Nullable[V]], interval temporal.Interval, zone TimeZone) NullableOrderedRowExpression[S, V]
AddInstantIntervalNullable adds signed calendar and elapsed components in the explicit timezone. Database overflow and out-of-contract results remain errors. SQL NULL propagates; widen non-null operands explicitly.
Example: expr.AddInstantIntervalNullable(input, interval, zone)
func AddIntervalsNullable ¶
func AddIntervalsNullable[S any](left RowValue[S, value.Nullable[temporal.Interval]], right RowValue[S, value.Nullable[temporal.Interval]]) NullableOrderedRowExpression[S, temporal.Interval]
AddIntervalsNullable adds interval components without conflating calendar and elapsed units. SQL NULL propagates; widen non-null inputs explicitly.
Example: expr.AddIntervalsNullable(left, right)
func AddLocalIntervalNullable ¶
func AddLocalIntervalNullable[S any](input RowValue[S, value.Nullable[temporal.LocalDateTime]], interval temporal.Interval) NullableOrderedRowExpression[S, temporal.LocalDateTime]
AddLocalIntervalNullable adds signed calendar and elapsed components. Database overflow and out-of-contract results remain errors. SQL NULL propagates; widen non-null operands explicitly.
Example: expr.AddLocalIntervalNullable(input, interval)
func AddNullable ¶
func AddNullable[S any, V numericValue](left, right RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, V]
AddNullable propagates SQL NULL. Widen a non-null operand with NullableRow.
Example: expr.AddNullable(left, right)
func CenturyNullable ¶
func CenturyNullable[S any, V calendarValue](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, int64]
CenturyNullable propagates NULL without changing its input scope.
Example: expr.CenturyNullable(input)
func ClockDifferenceNullable ¶
func ClockDifferenceNullable[S any](left RowValue[S, value.Nullable[temporal.Time]], right RowValue[S, value.Nullable[temporal.Time]]) NullableOrderedRowExpression[S, temporal.Interval]
ClockDifferenceNullable subtracts clock components without wrapping the signed result at midnight. SQL NULL propagates; widen non-null inputs explicitly.
Example: expr.ClockDifferenceNullable(left, right)
func CombineDateTimeNullable ¶
func CombineDateTimeNullable[S any](date RowValue[S, value.Nullable[temporal.Date]], clock RowValue[S, value.Nullable[temporal.Time]]) NullableOrderedRowExpression[S, temporal.LocalDateTime]
CombineDateTimeNullable combines a calendar date and time of day without choosing a timezone. SQL NULL propagates; widen non-null operands explicitly.
Example: expr.CombineDateTimeNullable(date, clock)
func DateDifferenceNullable ¶
func DateDifferenceNullable[S any](left RowValue[S, value.Nullable[temporal.Date]], right RowValue[S, value.Nullable[temporal.Date]]) NullableOrderedRowExpression[S, int64]
DateDifferenceNullable returns the signed number of calendar days from right to left. SQL NULL propagates; widen non-null operands explicitly.
Example: expr.DateDifferenceNullable(left, right)
func DateOfNullable ¶
func DateOfNullable[S any](input RowValue[S, value.Nullable[temporal.LocalDateTime]]) NullableOrderedRowExpression[S, temporal.Date]
DateOfNullable selects the calendar date from local wall components. SQL NULL propagates; widen non-null operands explicitly.
Example: expr.DateOfNullable(input)
func DayNullable ¶
func DayNullable[S any, V calendarValue](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, int64]
DayNullable propagates NULL without changing its input scope.
Example: expr.DayNullable(input)
func DayOfWeekNullable ¶
func DayOfWeekNullable[S any, V calendarValue](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, int64]
DayOfWeekNullable propagates NULL without changing its input scope.
Example: expr.DayOfWeekNullable(input)
func DayOfYearNullable ¶
func DayOfYearNullable[S any, V calendarValue](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, int64]
DayOfYearNullable propagates NULL without changing its input scope.
Example: expr.DayOfYearNullable(input)
func DecadeNullable ¶
func DecadeNullable[S any, V calendarValue](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, int64]
DecadeNullable propagates NULL without changing its input scope.
Example: expr.DecadeNullable(input)
func DecimalNullable ¶
func DecimalNullable[S any, V exactNumber](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, decimal.Decimal]
DecimalNullable converts a nullable row input without removing NULL.
Example: expr.DecimalNullable(input)
func DivideNullable ¶
func DivideNullable[S any, V numericValue](left, right RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, V]
DivideNullable propagates SQL NULL. Widen a non-null operand with NullableRow.
Example: expr.DivideNullable(left, right)
func FloatNullable ¶
func FloatNullable[S any, V numericValue](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, float64]
FloatNullable converts a nullable row input without removing NULL.
Example: expr.FloatNullable(input)
func FromUnixMillisNullable ¶
func FromUnixMillisNullable[S any, V integerNumber](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, temporal.DateTime]
FromUnixMillisNullable converts exact integer Unix milliseconds to a UTC instant without floating-point epoch rounding. SQL NULL propagates; widen non-null operands explicitly.
Example: expr.FromUnixMillisNullable(input)
func HourNullable ¶
func HourNullable[S any, V clockValue](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, int64]
HourNullable propagates NULL without changing its input scope.
Example: expr.HourNullable(input)
func ISODayOfWeekNullable ¶
func ISODayOfWeekNullable[S any, V calendarValue](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, int64]
ISODayOfWeekNullable propagates NULL without changing its input scope.
Example: expr.ISODayOfWeekNullable(input)
func ISOWeekNullable ¶
func ISOWeekNullable[S any, V calendarValue](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, int64]
ISOWeekNullable propagates NULL without changing its input scope.
Example: expr.ISOWeekNullable(input)
func ISOYearNullable ¶
func ISOYearNullable[S any, V calendarValue](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, int64]
ISOYearNullable propagates NULL without changing its input scope.
Example: expr.ISOYearNullable(input)
func InstantDifferenceNullable ¶
func InstantDifferenceNullable[S any, L, R instantValue](left RowValue[S, value.Nullable[L]], right RowValue[S, value.Nullable[R]]) NullableOrderedRowExpression[S, temporal.Interval]
InstantDifferenceNullable subtracts instants using PostgreSQL's 24-hour-day interval normalization. SQL NULL propagates; widen non-null inputs explicitly.
Example: expr.InstantDifferenceNullable(left, right)
func IntervalDaysNullable ¶
func IntervalDaysNullable[S any](input RowValue[S, value.Nullable[temporal.Interval]]) NullableOrderedRowExpression[S, int32]
IntervalDaysNullable returns the signed calendar-day component. SQL NULL propagates; widen non-null inputs explicitly.
Example: expr.IntervalDaysNullable(input)
func IntervalElapsedNullable ¶
func IntervalElapsedNullable[S any](input RowValue[S, value.Nullable[temporal.Interval]]) NullableOrderedRowExpression[S, time.Duration]
IntervalElapsedNullable returns the elapsed component as a Go duration, excluding months and days. SQL NULL propagates; widen non-null inputs explicitly.
Example: expr.IntervalElapsedNullable(input)
func IntervalMonthsNullable ¶
func IntervalMonthsNullable[S any](input RowValue[S, value.Nullable[temporal.Interval]]) NullableOrderedRowExpression[S, int32]
IntervalMonthsNullable returns the complete signed month component, including whole years. SQL NULL propagates; widen non-null inputs explicitly.
Example: expr.IntervalMonthsNullable(input)
func JSONLength ¶
JSONLength evaluates JSON shape or safe array length in the row phase.
Example: expr.JSONLength(input)
func JSONLengthNullable ¶
func JSONLengthNullable[S, P any](input RowValue[S, value.Nullable[value.JSON[P]]]) NullableOrderedRowExpression[S, int64]
JSONLengthNullable evaluates JSON shape or safe array length in the row phase; SQL NULL propagates.
Example: expr.JSONLengthNullable(input)
func JulianDayNullable ¶
func JulianDayNullable[S any, V calendarValue](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, decimal.Decimal]
JulianDayNullable propagates NULL without changing its input scope.
Example: expr.JulianDayNullable(input)
func LengthNullable ¶
func LengthNullable[S any, V ~string](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, int64]
LengthNullable counts Unicode characters rather than encoded bytes, propagating SQL NULL.
Example: expr.LengthNullable(input)
func LocalAtNullable ¶
func LocalAtNullable[S any, V instantValue](input RowValue[S, value.Nullable[V]], zone TimeZone) NullableOrderedRowExpression[S, temporal.LocalDateTime]
LocalAtNullable converts an instant to wall components in the explicitly selected zone. SQL NULL propagates; widen non-null operands explicitly.
Example: expr.LocalAtNullable(input, zone)
func LocalDifferenceNullable ¶
func LocalDifferenceNullable[S any](left RowValue[S, value.Nullable[temporal.LocalDateTime]], right RowValue[S, value.Nullable[temporal.LocalDateTime]]) NullableOrderedRowExpression[S, temporal.Interval]
LocalDifferenceNullable subtracts local date-times using PostgreSQL's normalized interval result. SQL NULL propagates; widen non-null inputs explicitly.
Example: expr.LocalDifferenceNullable(left, right)
func MicrosecondsNullable ¶
func MicrosecondsNullable[S any, V clockValue](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, int64]
MicrosecondsNullable propagates NULL without changing its input scope.
Example: expr.MicrosecondsNullable(input)
func MillenniumNullable ¶
func MillenniumNullable[S any, V calendarValue](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, int64]
MillenniumNullable propagates NULL without changing its input scope.
Example: expr.MillenniumNullable(input)
func MillisecondsNullable ¶
func MillisecondsNullable[S any, V clockValue](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, decimal.Decimal]
MillisecondsNullable propagates NULL without changing its input scope.
Example: expr.MillisecondsNullable(input)
func MinuteNullable ¶
func MinuteNullable[S any, V clockValue](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, int64]
MinuteNullable propagates NULL without changing its input scope.
Example: expr.MinuteNullable(input)
func MonthNullable ¶
func MonthNullable[S any, V calendarValue](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, int64]
MonthNullable propagates NULL without changing its input scope.
Example: expr.MonthNullable(input)
func MultiplyNullable ¶
func MultiplyNullable[S any, V numericValue](left, right RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, V]
MultiplyNullable propagates SQL NULL. Widen a non-null operand with NullableRow.
Example: expr.MultiplyNullable(left, right)
func NegateIntervalNullable ¶
func NegateIntervalNullable[S any](input RowValue[S, value.Nullable[temporal.Interval]]) NullableOrderedRowExpression[S, temporal.Interval]
NegateIntervalNullable negates all interval components; database overflow remains an execution error. SQL NULL propagates; widen non-null inputs explicitly.
Example: expr.NegateIntervalNullable(input)
func NegateNullable ¶
func NegateNullable[S any, V numericValue](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, V]
NegateNullable propagates SQL NULL and retains the concrete numeric type.
Example: expr.NegateNullable(input)
func OctetLengthNullable ¶
func OctetLengthNullable[S any, V ~string](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, int64]
OctetLengthNullable counts encoded bytes, propagating SQL NULL.
Example: expr.OctetLengthNullable(input)
func OrderNullableRow ¶
func OrderNullableRow[S any, V orderedScalar](v RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, V]
OrderNullableRow exposes present-value comparisons.
Example: expr.OrderNullableRow(v)
func QuarterNullable ¶
func QuarterNullable[S any, V calendarValue](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, int64]
QuarterNullable propagates NULL without changing its input scope.
Example: expr.QuarterNullable(input)
func RemainderNullable ¶
func RemainderNullable[S any, V exactNumber](left, right RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, V]
RemainderNullable propagates SQL NULL. Widen a non-null operand with NullableRow.
Example: expr.RemainderNullable(left, right)
func ResolveLocalNullable ¶
func ResolveLocalNullable[S any](input RowValue[S, value.Nullable[temporal.LocalDateTime]], zone TimeZone, policy LocalResolution) NullableOrderedRowExpression[S, temporal.DateTime]
ResolveLocalNullable uses the explicitly selected PostgreSQL DST resolution policy. It differs from the uniqueness checks in temporal.LocalDateTime.In. SQL NULL propagates; widen non-null operands explicitly.
Example: expr.ResolveLocalNullable(input, zone, policy)
func SecondNullable ¶
func SecondNullable[S any, V clockValue](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, decimal.Decimal]
SecondNullable propagates NULL without changing its input scope.
Example: expr.SecondNullable(input)
func ShiftDateNullable ¶
func ShiftDateNullable[S any](input RowValue[S, value.Nullable[temporal.Date]], interval RowValue[S, value.Nullable[temporal.Interval]]) NullableOrderedRowExpression[S, temporal.LocalDateTime]
ShiftDateNullable adds a typed interval expression to a date, returning local date-time components. SQL NULL propagates; widen non-null inputs explicitly.
Example: expr.ShiftDateNullable(input, interval)
func ShiftInstantNullable ¶
func ShiftInstantNullable[S any, V instantValue](input RowValue[S, value.Nullable[V]], interval RowValue[S, value.Nullable[temporal.Interval]], zone TimeZone) NullableOrderedRowExpression[S, V]
ShiftInstantNullable adds a typed interval expression in an explicit timezone, preserving the instant's Go type. SQL NULL propagates; widen non-null inputs explicitly.
Example: expr.ShiftInstantNullable(input, interval, zone)
func ShiftLocalNullable ¶
func ShiftLocalNullable[S any](input RowValue[S, value.Nullable[temporal.LocalDateTime]], interval RowValue[S, value.Nullable[temporal.Interval]]) NullableOrderedRowExpression[S, temporal.LocalDateTime]
ShiftLocalNullable adds a typed interval expression to local date-time components. SQL NULL propagates; widen non-null inputs explicitly.
Example: expr.ShiftLocalNullable(input, interval)
func SphericalDistanceNullable ¶
func SphericalDistanceNullable[S any, V numericValue](latitude, longitude RowValue[S, value.Nullable[V]], origin GeographicPoint) NullableOrderedRowExpression[S, float64]
SphericalDistanceNullable propagates NULL when either stored coordinate is absent.
Example: expr.SphericalDistanceNullable(latitude, longitude, origin)
func SubtractClockElapsedNullable ¶
func SubtractClockElapsedNullable[S any](input RowValue[S, value.Nullable[temporal.Time]], duration time.Duration) NullableOrderedRowExpression[S, temporal.Time]
SubtractClockElapsedNullable subtracts elapsed time from a time of day, wrapping at midnight. Whole microseconds are required. SQL NULL propagates; widen non-null operands explicitly.
Example: expr.SubtractClockElapsedNullable(input, duration)
func SubtractDateIntervalNullable ¶
func SubtractDateIntervalNullable[S any](input RowValue[S, value.Nullable[temporal.Date]], interval temporal.Interval) NullableOrderedRowExpression[S, temporal.LocalDateTime]
SubtractDateIntervalNullable subtracts signed calendar and elapsed components. Database overflow and out-of-contract results remain errors. SQL NULL propagates; widen non-null operands explicitly.
Example: expr.SubtractDateIntervalNullable(input, interval)
func SubtractInstantIntervalNullable ¶
func SubtractInstantIntervalNullable[S any, V instantValue](input RowValue[S, value.Nullable[V]], interval temporal.Interval, zone TimeZone) NullableOrderedRowExpression[S, V]
SubtractInstantIntervalNullable subtracts signed calendar and elapsed components in the explicit timezone. Database overflow and out-of-contract results remain errors. SQL NULL propagates; widen non-null operands explicitly.
Example: expr.SubtractInstantIntervalNullable(input, interval, zone)
func SubtractIntervalsNullable ¶
func SubtractIntervalsNullable[S any](left RowValue[S, value.Nullable[temporal.Interval]], right RowValue[S, value.Nullable[temporal.Interval]]) NullableOrderedRowExpression[S, temporal.Interval]
SubtractIntervalsNullable subtracts interval components without conflating calendar and elapsed units. SQL NULL propagates; widen non-null inputs explicitly.
Example: expr.SubtractIntervalsNullable(left, right)
func SubtractLocalIntervalNullable ¶
func SubtractLocalIntervalNullable[S any](input RowValue[S, value.Nullable[temporal.LocalDateTime]], interval temporal.Interval) NullableOrderedRowExpression[S, temporal.LocalDateTime]
SubtractLocalIntervalNullable subtracts signed calendar and elapsed components. Database overflow and out-of-contract results remain errors. SQL NULL propagates; widen non-null operands explicitly.
Example: expr.SubtractLocalIntervalNullable(input, interval)
func SubtractNullable ¶
func SubtractNullable[S any, V numericValue](left, right RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, V]
SubtractNullable propagates SQL NULL. Widen a non-null operand with NullableRow.
Example: expr.SubtractNullable(left, right)
func TimeOfNullable ¶
func TimeOfNullable[S any](input RowValue[S, value.Nullable[temporal.LocalDateTime]]) NullableOrderedRowExpression[S, temporal.Time]
TimeOfNullable selects the time of day from local wall components. SQL NULL propagates; widen non-null operands explicitly.
Example: expr.TimeOfNullable(input)
func TruncateDateNullable ¶
func TruncateDateNullable[S any](input RowValue[S, value.Nullable[temporal.Date]], unit DateUnit) NullableOrderedRowExpression[S, temporal.Date]
TruncateDateNullable truncates a calendar date without introducing a timezone. SQL NULL propagates; widen non-null operands explicitly.
Example: expr.TruncateDateNullable(input, unit)
func TruncateInstantNullable ¶
func TruncateInstantNullable[S any, V instantValue](input RowValue[S, value.Nullable[V]], unit TimestampUnit, zone TimeZone) NullableOrderedRowExpression[S, V]
TruncateInstantNullable truncates an instant in the explicit zone while preserving its Go type. SQL NULL propagates; widen non-null operands explicitly.
Example: expr.TruncateInstantNullable(input, unit, zone)
func TruncateLocalNullable ¶
func TruncateLocalNullable[S any](input RowValue[S, value.Nullable[temporal.LocalDateTime]], unit TimestampUnit) NullableOrderedRowExpression[S, temporal.LocalDateTime]
TruncateLocalNullable truncates local wall components without interpreting them as an instant. SQL NULL propagates; widen non-null operands explicitly.
Example: expr.TruncateLocalNullable(input, unit)
func UnixMillisecondsNullable ¶
func UnixMillisecondsNullable[S any, V instantValue](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, int64]
UnixMillisecondsNullable propagates NULL without changing its input scope.
Example: expr.UnixMillisecondsNullable(input)
func UnixSecondsNullable ¶
func UnixSecondsNullable[S any, V instantValue](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, decimal.Decimal]
UnixSecondsNullable propagates NULL without changing its input scope.
Example: expr.UnixSecondsNullable(input)
func YearNullable ¶
func YearNullable[S any, V calendarValue](input RowValue[S, value.Nullable[V]]) NullableOrderedRowExpression[S, int64]
YearNullable propagates NULL without changing its input scope.
Example: expr.YearNullable(input)
type NullableOrderedValueComparison ¶
type NullableOrderedValueComparison[S any, V orderedScalar] = nullableOrderedValueComparison[*S, V]
NullableOrderedValueComparison retains nullable results with present-value comparisons.
Example: expr.GtValue(expr.OrderNullableValue(selected), value)
func OrderNullableValue ¶
func OrderNullableValue[S any, V orderedScalar](v Selected[S, value.Nullable[V]]) NullableOrderedValueComparison[S, V]
OrderNullableValue compares nullable selected results with present values.
Example: expr.OrderNullableValue(v)
type NullableRowComparison ¶
type NullableRowComparison[S, V any] = nullableRowComparison[*S, V]
NullableRowComparison retains present-value equality and SQL null tests.
Example: expr.NullableEq(expr.CompareNullableRow(expr.Value(orm.NullableEnumExpr(Users.OptionalState))), Active)
func CompareNullableRow ¶
func CompareNullableRow[S, V any](e Expression[S, V, value.Nullable[V]]) NullableRowComparison[S, V]
CompareNullableRow preserves nullable equality without granting enum ordering or text operations.
Example: expr.CompareNullableRow(e)
type NullableScope ¶
type NullableScope[S, M any] struct { // contains filtered or unexported fields }
NullableScope identifies a possibly absent model in an outer join.
Example: rows.NullableRightScope(joined, rows.Scope(orders))
func FoundryNullableScope ¶
func FoundryNullableScope[S, M any](core ormcore.Scope, seal sqlowner.ExpressionSeal) NullableScope[S, M]
FoundryNullableScope constructs a validated nullable scope.
Example: expr.FoundryNullableScope[User, User](core, seal)
type NullableTextFilterAdapter ¶ added in v0.3.0
type NullableTextFilterAdapter[S any, V ~string] struct { // contains filtered or unexported fields }
NullableTextFilterAdapter adapts a nullable text row expression for datatable filters.
Example: expr.NullableTextFilter(nickname)
func NullableTextFilter ¶ added in v0.3.0
func NullableTextFilter[S any, V ~string](e NullableTextRowExpression[S, V]) NullableTextFilterAdapter[S, V]
NullableTextFilter adapts NullableTextRowExpression for datatable filters.
Example: expr.NullableTextFilter(e)
func (NullableTextFilterAdapter[S, V]) Contains ¶ added in v0.3.0
func (a NullableTextFilterAdapter[S, V]) Contains(v V) Predicate[S]
Contains tests a text substring within the adapter's row scope.
func (NullableTextFilterAdapter[S, V]) Eq ¶ added in v0.3.0
func (a NullableTextFilterAdapter[S, V]) Eq(v V) Predicate[S]
Eq compares equality within the adapter's row scope.
func (NullableTextFilterAdapter[S, V]) Gt ¶ added in v0.3.0
func (a NullableTextFilterAdapter[S, V]) Gt(v V) Predicate[S]
Gt compares greater than within the adapter's row scope.
func (NullableTextFilterAdapter[S, V]) Gte ¶ added in v0.3.0
func (a NullableTextFilterAdapter[S, V]) Gte(v V) Predicate[S]
Gte compares greater than or equal within the adapter's row scope.
func (NullableTextFilterAdapter[S, V]) IContains ¶ added in v0.3.0
func (a NullableTextFilterAdapter[S, V]) IContains(v V) Predicate[S]
IContains tests a text substring without case sensitivity within the adapter's row scope.
func (NullableTextFilterAdapter[S, V]) In ¶ added in v0.3.0
func (a NullableTextFilterAdapter[S, V]) In(vs ...V) Predicate[S]
In tests membership within the adapter's row scope.
func (NullableTextFilterAdapter[S, V]) IsNotNull ¶ added in v0.3.0
func (a NullableTextFilterAdapter[S, V]) IsNotNull() Predicate[S]
IsNotNull tests SQL presence within the adapter's row scope.
func (NullableTextFilterAdapter[S, V]) IsNull ¶ added in v0.3.0
func (a NullableTextFilterAdapter[S, V]) IsNull() Predicate[S]
IsNull tests SQL nullness within the adapter's row scope.
func (NullableTextFilterAdapter[S, V]) Like ¶ added in v0.3.0
func (a NullableTextFilterAdapter[S, V]) Like(v V) Predicate[S]
Like tests a SQL text pattern within the adapter's row scope.
func (NullableTextFilterAdapter[S, V]) Lt ¶ added in v0.3.0
func (a NullableTextFilterAdapter[S, V]) Lt(v V) Predicate[S]
Lt compares less than within the adapter's row scope.
func (NullableTextFilterAdapter[S, V]) Lte ¶ added in v0.3.0
func (a NullableTextFilterAdapter[S, V]) Lte(v V) Predicate[S]
Lte compares less than or equal within the adapter's row scope.
func (NullableTextFilterAdapter[S, V]) Ne ¶ added in v0.3.0
func (a NullableTextFilterAdapter[S, V]) Ne(v V) Predicate[S]
Ne compares inequality within the adapter's row scope.
type NullableTextRowExpression ¶
NullableTextRowExpression preserves NULL and compares present text values.
Example: expr.NullableTextLike(expr.LowerNullable(name), "a%")
func ConcatNullable ¶
func ConcatNullable[S any, V, W ~string](input RowValue[S, value.Nullable[V]], other RowValue[S, value.Nullable[W]]) NullableTextRowExpression[S, string]
ConcatNullable concatenates text with SQL's strict NULL semantics, propagating SQL NULL.
Example: expr.ConcatNullable(input, other)
func JSONTextScalar ¶
func JSONTextScalar[S any, P ~string](path JSONPath[S, P], c codec.Codec[P]) NullableTextRowExpression[S, P]
JSONTextScalar adds pattern predicates only for string payloads.
Example: expr.JSONTextScalar(path, c)
func LowerNullable ¶
func LowerNullable[S any, V ~string](input RowValue[S, value.Nullable[V]]) NullableTextRowExpression[S, string]
LowerNullable lowercases text using the database collation, propagating SQL NULL.
Example: expr.LowerNullable(input)
func ReplaceNullable ¶
func ReplaceNullable[S any, V, W, X ~string](input RowValue[S, value.Nullable[V]], other RowValue[S, value.Nullable[W]], replacement RowValue[S, value.Nullable[X]]) NullableTextRowExpression[S, string]
ReplaceNullable replaces literal occurrences of its second argument with its third, propagating SQL NULL.
Example: expr.ReplaceNullable(input, other, replacement)
func SubstringAtNullable ¶
func SubstringAtNullable[S any, V ~string, I integerNumber](input RowValue[S, value.Nullable[V]], start, count RowValue[S, I]) NullableTextRowExpression[S, string]
SubstringAtNullable uses typed integer expressions as positions. Database negative-count and SQL-integer overflow errors remain runtime errors. Positions are non-null.
Example: expr.SubstringAtNullable(input, start, count)
func SubstringFromNullable ¶
func SubstringFromNullable[S any, V ~string](input RowValue[S, value.Nullable[V]], start int32) NullableTextRowExpression[S, string]
SubstringFromNullable selects characters using PostgreSQL's one-based positions. Zero/negative starts follow SQL semantics. It selects through the end.
Example: expr.SubstringFromNullable(input, start)
func SubstringNullable ¶
func SubstringNullable[S any, V ~string](input RowValue[S, value.Nullable[V]], start int32, count int32) NullableTextRowExpression[S, string]
SubstringNullable selects characters using PostgreSQL's one-based positions. Zero/negative starts follow SQL semantics. A negative count is rejected before execution.
Example: expr.SubstringNullable(input, start, count)
func TextNullableRow ¶
func TextNullableRow[S any, V ~string](column orm.TextExpressionColumn[S, V, value.Nullable[V]]) NullableTextRowExpression[S, V]
TextNullableRow preserves a nullable text column capability.
Example: expr.TextNullableRow(column)
func TextNullableRowAt ¶
func TextNullableRowAt[S, M any, V ~string](scope Scope[S, M], column orm.TextExpressionColumn[M, V, value.Nullable[V]]) NullableTextRowExpression[S, V]
TextNullableRowAt preserves nullable text in a joined or aliased scope.
Example: expr.TextNullableRowAt(scope, column)
func TextNullableRowValue ¶ added in v0.4.0
func TextNullableRowValue[S any, V ~string](v RowValue[S, value.Nullable[V]]) NullableTextRowExpression[S, V]
TextNullableRowValue exposes present-value text comparisons on a nullable row value.
Example: expr.NullableTextIContains(expr.TextNullableRowValue(v), "name")
func TrimCharsNullable ¶
func TrimCharsNullable[S any, V, W ~string](input RowValue[S, value.Nullable[V]], other RowValue[S, value.Nullable[W]]) NullableTextRowExpression[S, string]
TrimCharsNullable removes characters in the second argument from both ends, propagating SQL NULL.
Example: expr.TrimCharsNullable(input, other)
func TrimLeftCharsNullable ¶
func TrimLeftCharsNullable[S any, V, W ~string](input RowValue[S, value.Nullable[V]], other RowValue[S, value.Nullable[W]]) NullableTextRowExpression[S, string]
TrimLeftCharsNullable removes characters in the second argument from the start, propagating SQL NULL.
Example: expr.TrimLeftCharsNullable(input, other)
func TrimLeftNullable ¶
func TrimLeftNullable[S any, V ~string](input RowValue[S, value.Nullable[V]]) NullableTextRowExpression[S, string]
TrimLeftNullable removes ordinary spaces from the start, propagating SQL NULL.
Example: expr.TrimLeftNullable(input)
func TrimNullable ¶
func TrimNullable[S any, V ~string](input RowValue[S, value.Nullable[V]]) NullableTextRowExpression[S, string]
TrimNullable removes ordinary spaces from both ends, propagating SQL NULL.
Example: expr.TrimNullable(input)
func TrimRightCharsNullable ¶
func TrimRightCharsNullable[S any, V, W ~string](input RowValue[S, value.Nullable[V]], other RowValue[S, value.Nullable[W]]) NullableTextRowExpression[S, string]
TrimRightCharsNullable removes characters in the second argument from the end, propagating SQL NULL.
Example: expr.TrimRightCharsNullable(input, other)
func TrimRightNullable ¶
func TrimRightNullable[S any, V ~string](input RowValue[S, value.Nullable[V]]) NullableTextRowExpression[S, string]
TrimRightNullable removes ordinary spaces from the end, propagating SQL NULL.
Example: expr.TrimRightNullable(input)
func UpperNullable ¶
func UpperNullable[S any, V ~string](input RowValue[S, value.Nullable[V]]) NullableTextRowExpression[S, string]
UpperNullable uppercases text using the database collation, propagating SQL NULL.
Example: expr.UpperNullable(input)
type NullableTextValueComparison ¶
NullableTextValueComparison retains NULL and compares present text in HAVING.
Example: expr.TextNullableValue(selectedName)
func TextNullableValue ¶
func TextNullableValue[S any, V ~string](v Selected[S, value.Nullable[V]]) NullableTextValueComparison[S, V]
TextNullableValue exposes nullable selected text comparisons.
Example: expr.TextNullableValue(v)
type NullableTextValueFilterAdapter ¶ added in v0.3.0
type NullableTextValueFilterAdapter[S any, V ~string] struct { // contains filtered or unexported fields }
NullableTextValueFilterAdapter supplies typed HAVING operations to datatable filters.
Example: expr.NullableTextValueFilter(source)
func NullableTextValueFilter ¶ added in v0.3.0
func NullableTextValueFilter[S any, V ~string](source interface { TextValueOperand[S, V] NullValueOperand[S, V] }) NullableTextValueFilterAdapter[S, V]
NullableTextValueFilter adapts a selected comparison source without changing scope, value, or phase.
Example: expr.NullableTextValueFilter(source)
func (NullableTextValueFilterAdapter[S, V]) Contains ¶ added in v0.3.0
func (a NullableTextValueFilterAdapter[S, V]) Contains(v V) HavingPredicate[S]
Contains tests a text substring within the adapter's HAVING scope.
func (NullableTextValueFilterAdapter[S, V]) Eq ¶ added in v0.3.0
func (a NullableTextValueFilterAdapter[S, V]) Eq(v V) HavingPredicate[S]
Eq compares equality within the adapter's HAVING scope.
func (NullableTextValueFilterAdapter[S, V]) Gt ¶ added in v0.3.0
func (a NullableTextValueFilterAdapter[S, V]) Gt(v V) HavingPredicate[S]
Gt compares greater than within the adapter's HAVING scope.
func (NullableTextValueFilterAdapter[S, V]) Gte ¶ added in v0.3.0
func (a NullableTextValueFilterAdapter[S, V]) Gte(v V) HavingPredicate[S]
Gte compares greater than or equal within the adapter's HAVING scope.
func (NullableTextValueFilterAdapter[S, V]) IContains ¶ added in v0.3.0
func (a NullableTextValueFilterAdapter[S, V]) IContains(v V) HavingPredicate[S]
IContains tests a text substring without case sensitivity within the adapter's HAVING scope.
func (NullableTextValueFilterAdapter[S, V]) In ¶ added in v0.3.0
func (a NullableTextValueFilterAdapter[S, V]) In(vs ...V) HavingPredicate[S]
In tests membership within the adapter's HAVING scope.
func (NullableTextValueFilterAdapter[S, V]) IsNotNull ¶ added in v0.3.0
func (a NullableTextValueFilterAdapter[S, V]) IsNotNull() HavingPredicate[S]
IsNotNull tests SQL presence within the adapter's HAVING scope.
func (NullableTextValueFilterAdapter[S, V]) IsNull ¶ added in v0.3.0
func (a NullableTextValueFilterAdapter[S, V]) IsNull() HavingPredicate[S]
IsNull tests SQL nullness within the adapter's HAVING scope.
func (NullableTextValueFilterAdapter[S, V]) Like ¶ added in v0.3.0
func (a NullableTextValueFilterAdapter[S, V]) Like(v V) HavingPredicate[S]
Like tests a SQL text pattern within the adapter's HAVING scope.
func (NullableTextValueFilterAdapter[S, V]) Lt ¶ added in v0.3.0
func (a NullableTextValueFilterAdapter[S, V]) Lt(v V) HavingPredicate[S]
Lt compares less than within the adapter's HAVING scope.
func (NullableTextValueFilterAdapter[S, V]) Lte ¶ added in v0.3.0
func (a NullableTextValueFilterAdapter[S, V]) Lte(v V) HavingPredicate[S]
Lte compares less than or equal within the adapter's HAVING scope.
func (NullableTextValueFilterAdapter[S, V]) Ne ¶ added in v0.3.0
func (a NullableTextValueFilterAdapter[S, V]) Ne(v V) HavingPredicate[S]
Ne compares inequality within the adapter's HAVING scope.
type NullableValueFilterAdapter ¶ added in v0.3.0
NullableValueFilterAdapter supplies typed HAVING operations to datatable filters.
Example: expr.NullableValueFilter(source)
func NullableValueFilter ¶ added in v0.3.0
func NullableValueFilter[S any, V any](source interface { ValueOperand[S, V] NullValueOperand[S, V] }) NullableValueFilterAdapter[S, V]
NullableValueFilter adapts a selected comparison source without changing scope, value, or phase.
Example: expr.NullableValueFilter(source)
func (NullableValueFilterAdapter[S, V]) Eq ¶ added in v0.3.0
func (a NullableValueFilterAdapter[S, V]) Eq(v V) HavingPredicate[S]
Eq compares equality within the adapter's HAVING scope.
func (NullableValueFilterAdapter[S, V]) In ¶ added in v0.3.0
func (a NullableValueFilterAdapter[S, V]) In(vs ...V) HavingPredicate[S]
In tests membership within the adapter's HAVING scope.
func (NullableValueFilterAdapter[S, V]) IsNotNull ¶ added in v0.3.0
func (a NullableValueFilterAdapter[S, V]) IsNotNull() HavingPredicate[S]
IsNotNull tests SQL presence within the adapter's HAVING scope.
func (NullableValueFilterAdapter[S, V]) IsNull ¶ added in v0.3.0
func (a NullableValueFilterAdapter[S, V]) IsNull() HavingPredicate[S]
IsNull tests SQL nullness within the adapter's HAVING scope.
func (NullableValueFilterAdapter[S, V]) Ne ¶ added in v0.3.0
func (a NullableValueFilterAdapter[S, V]) Ne(v V) HavingPredicate[S]
Ne compares inequality within the adapter's HAVING scope.
type Order ¶
type Order[S any] struct { // contains filtered or unexported fields }
Order keeps source ownership on ordering.
Example: expr.Asc(id)
func (Order[S]) NullsFirst ¶
NullsFirst explicitly sorts SQL NULL before values.
Example: expr.Asc(name).NullsFirst()
type OrderFilterAdapter ¶ added in v0.3.0
type OrderFilterAdapter[S any, V orderedScalar] struct { // contains filtered or unexported fields }
OrderFilterAdapter adapts an ordered row expression for datatable filters.
Example: expr.OrderFilter(age)
func OrderFilter ¶ added in v0.3.0
func OrderFilter[S any, V orderedScalar](e OrderedRowExpression[S, V]) OrderFilterAdapter[S, V]
OrderFilter adapts OrderedRowExpression for datatable filters.
Example: expr.OrderFilter(e)
func (OrderFilterAdapter[S, V]) Eq ¶ added in v0.3.0
func (a OrderFilterAdapter[S, V]) Eq(v V) Predicate[S]
Eq compares equality within the adapter's row scope.
func (OrderFilterAdapter[S, V]) Gt ¶ added in v0.3.0
func (a OrderFilterAdapter[S, V]) Gt(v V) Predicate[S]
Gt compares greater than within the adapter's row scope.
func (OrderFilterAdapter[S, V]) Gte ¶ added in v0.3.0
func (a OrderFilterAdapter[S, V]) Gte(v V) Predicate[S]
Gte compares greater than or equal within the adapter's row scope.
func (OrderFilterAdapter[S, V]) In ¶ added in v0.3.0
func (a OrderFilterAdapter[S, V]) In(vs ...V) Predicate[S]
In tests membership within the adapter's row scope.
func (OrderFilterAdapter[S, V]) Lt ¶ added in v0.3.0
func (a OrderFilterAdapter[S, V]) Lt(v V) Predicate[S]
Lt compares less than within the adapter's row scope.
func (OrderFilterAdapter[S, V]) Lte ¶ added in v0.3.0
func (a OrderFilterAdapter[S, V]) Lte(v V) Predicate[S]
Lte compares less than or equal within the adapter's row scope.
func (OrderFilterAdapter[S, V]) Ne ¶ added in v0.3.0
func (a OrderFilterAdapter[S, V]) Ne(v V) Predicate[S]
Ne compares inequality within the adapter's row scope.
type OrderValueFilterAdapter ¶ added in v0.3.0
type OrderValueFilterAdapter[S any, V orderedScalar] struct { // contains filtered or unexported fields }
OrderValueFilterAdapter supplies typed HAVING operations to datatable filters.
Example: expr.OrderValueFilter(source)
func OrderValueFilter ¶ added in v0.3.0
func OrderValueFilter[S any, V orderedScalar](source OrderedValueOperand[S, V]) OrderValueFilterAdapter[S, V]
OrderValueFilter adapts a selected comparison source without changing scope, value, or phase.
Example: expr.OrderValueFilter(source)
func (OrderValueFilterAdapter[S, V]) Eq ¶ added in v0.3.0
func (a OrderValueFilterAdapter[S, V]) Eq(v V) HavingPredicate[S]
Eq compares equality within the adapter's HAVING scope.
func (OrderValueFilterAdapter[S, V]) Gt ¶ added in v0.3.0
func (a OrderValueFilterAdapter[S, V]) Gt(v V) HavingPredicate[S]
Gt compares greater than within the adapter's HAVING scope.
func (OrderValueFilterAdapter[S, V]) Gte ¶ added in v0.3.0
func (a OrderValueFilterAdapter[S, V]) Gte(v V) HavingPredicate[S]
Gte compares greater than or equal within the adapter's HAVING scope.
func (OrderValueFilterAdapter[S, V]) In ¶ added in v0.3.0
func (a OrderValueFilterAdapter[S, V]) In(vs ...V) HavingPredicate[S]
In tests membership within the adapter's HAVING scope.
func (OrderValueFilterAdapter[S, V]) Lt ¶ added in v0.3.0
func (a OrderValueFilterAdapter[S, V]) Lt(v V) HavingPredicate[S]
Lt compares less than within the adapter's HAVING scope.
func (OrderValueFilterAdapter[S, V]) Lte ¶ added in v0.3.0
func (a OrderValueFilterAdapter[S, V]) Lte(v V) HavingPredicate[S]
Lte compares less than or equal within the adapter's HAVING scope.
func (OrderValueFilterAdapter[S, V]) Ne ¶ added in v0.3.0
func (a OrderValueFilterAdapter[S, V]) Ne(v V) HavingPredicate[S]
Ne compares inequality within the adapter's HAVING scope.
type OrderedAggregate ¶
type OrderedAggregate[S any, V orderedScalar] = orderedAggregate[*S, V]
OrderedAggregate is an ordered selected aggregate.
Example: expr.GtValue(expr.Count[User](), 1)
func Count ¶
func Count[S any]() OrderedAggregate[S, int64]
Count counts rows including NULL fields; empty input returns zero.
Example: expr.Count[User]()
func CountDistinctField ¶
func CountDistinctField[S any, V, P any](column orm.ExpressionColumn[S, V, P]) OrderedAggregate[S, int64]
CountDistinctField counts non-NULL stored values; empty input is zero.
Example: expr.CountDistinctField(column)
func CountDistinctFieldAt ¶
func CountDistinctFieldAt[S, M any, V, P any](scope Scope[S, M], column orm.ExpressionColumn[M, V, P]) OrderedAggregate[S, int64]
CountDistinctFieldAt counts non-NULL stored values; empty input is zero.
Example: expr.CountDistinctFieldAt(scope, column)
func CountDistinctRow ¶
func CountDistinctRow[S, V any](input RowExpression[S, V]) OrderedAggregate[S, int64]
CountDistinctRow counts non-NULL derived field values, returning zero for empty input.
Example: expr.CountDistinctRow(input)
func CountField ¶
func CountField[S any, V, P any](column orm.ExpressionColumn[S, V, P]) OrderedAggregate[S, int64]
CountField counts non-NULL stored values; empty input is zero.
Example: expr.CountField(column)
func CountFieldAt ¶
func CountFieldAt[S, M any, V, P any](scope Scope[S, M], column orm.ExpressionColumn[M, V, P]) OrderedAggregate[S, int64]
CountFieldAt counts non-NULL stored values; empty input is zero.
Example: expr.CountFieldAt(scope, column)
func CountRow ¶
func CountRow[S, V any](input RowExpression[S, V]) OrderedAggregate[S, int64]
CountRow counts non-NULL derived field values, returning zero for empty input.
Example: expr.CountRow(input)
type OrderedRowExpression ¶
type OrderedRowExpression[S any, V orderedScalar] = orderedRowExpression[*S, V]
OrderedRowExpression is an ordered computed row value.
Example: expr.Gt(expr.Add(a, b), 2)
func Abs ¶
func Abs[S any, V numericValue](input RowValue[S, V]) OrderedRowExpression[S, V]
Abs applies a numeric unary operation to a row value without changing its Go type.
Example: expr.Abs(input)
func Add ¶
func Add[S any, V numericValue](left, right RowValue[S, V]) OrderedRowExpression[S, V]
Add adds two row values with the same owner and concrete numeric type. Arithmetic uses the codec's SQL representation; division by zero and numeric overflow are database errors. Integer division truncates toward zero.
Example: expr.Add(left, right)
func AddClockElapsed ¶
func AddClockElapsed[S any](input RowValue[S, temporal.Time], duration time.Duration) OrderedRowExpression[S, temporal.Time]
AddClockElapsed adds elapsed time to a time of day, wrapping at midnight. Whole microseconds are required.
Example: expr.AddClockElapsed(input, duration)
func AddDateDays ¶
func AddDateDays[S any](input RowValue[S, temporal.Date], days int32) OrderedRowExpression[S, temporal.Date]
AddDateDays adds signed calendar days and retains the date-only result.
Example: expr.AddDateDays(input, days)
func AddDateInterval ¶
func AddDateInterval[S any](input RowValue[S, temporal.Date], interval temporal.Interval) OrderedRowExpression[S, temporal.LocalDateTime]
AddDateInterval adds signed calendar and elapsed components. Database overflow and out-of-contract results remain errors.
Example: expr.AddDateInterval(input, interval)
func AddInstantInterval ¶
func AddInstantInterval[S any, V instantValue](input RowValue[S, V], interval temporal.Interval, zone TimeZone) OrderedRowExpression[S, V]
AddInstantInterval adds signed calendar and elapsed components in the explicit timezone. Database overflow and out-of-contract results remain errors.
Example: expr.AddInstantInterval(input, interval, zone)
func AddIntervals ¶
func AddIntervals[S any](left RowValue[S, temporal.Interval], right RowValue[S, temporal.Interval]) OrderedRowExpression[S, temporal.Interval]
AddIntervals adds interval components without conflating calendar and elapsed units.
Example: expr.AddIntervals(left, right)
func AddLocalInterval ¶
func AddLocalInterval[S any](input RowValue[S, temporal.LocalDateTime], interval temporal.Interval) OrderedRowExpression[S, temporal.LocalDateTime]
AddLocalInterval adds signed calendar and elapsed components. Database overflow and out-of-contract results remain errors.
Example: expr.AddLocalInterval(input, interval)
func Century ¶
func Century[S any, V calendarValue](input RowValue[S, V]) OrderedRowExpression[S, int64]
Century extracts century from a typed row value. Calendar and clock components require a date/local value; use LocalAt for an instant's zone.
Example: expr.Century(input)
func ClockDifference ¶
func ClockDifference[S any](left RowValue[S, temporal.Time], right RowValue[S, temporal.Time]) OrderedRowExpression[S, temporal.Interval]
ClockDifference subtracts clock components without wrapping the signed result at midnight.
Example: expr.ClockDifference(left, right)
func CombineDateTime ¶
func CombineDateTime[S any](date RowValue[S, temporal.Date], clock RowValue[S, temporal.Time]) OrderedRowExpression[S, temporal.LocalDateTime]
CombineDateTime combines a calendar date and time of day without choosing a timezone.
Example: expr.CombineDateTime(date, clock)
func DateDifference ¶
func DateDifference[S any](left RowValue[S, temporal.Date], right RowValue[S, temporal.Date]) OrderedRowExpression[S, int64]
DateDifference returns the signed number of calendar days from right to left.
Example: expr.DateDifference(left, right)
func DateOf ¶
func DateOf[S any](input RowValue[S, temporal.LocalDateTime]) OrderedRowExpression[S, temporal.Date]
DateOf selects the calendar date from local wall components.
Example: expr.DateOf(input)
func Day ¶
func Day[S any, V calendarValue](input RowValue[S, V]) OrderedRowExpression[S, int64]
Day extracts day from a typed row value. Calendar and clock components require a date/local value; use LocalAt for an instant's zone.
Example: expr.Day(input)
func DayOfWeek ¶
func DayOfWeek[S any, V calendarValue](input RowValue[S, V]) OrderedRowExpression[S, int64]
DayOfWeek extracts dow from a typed row value. Calendar and clock components require a date/local value; use LocalAt for an instant's zone.
Example: expr.DayOfWeek(input)
func DayOfYear ¶
func DayOfYear[S any, V calendarValue](input RowValue[S, V]) OrderedRowExpression[S, int64]
DayOfYear extracts doy from a typed row value. Calendar and clock components require a date/local value; use LocalAt for an instant's zone.
Example: expr.DayOfYear(input)
func Decade ¶
func Decade[S any, V calendarValue](input RowValue[S, V]) OrderedRowExpression[S, int64]
Decade extracts decade from a typed row value. Calendar and clock components require a date/local value; use LocalAt for an instant's zone.
Example: expr.Decade(input)
func DecimalOf ¶
func DecimalOf[S any, V exactNumber](input RowValue[S, V]) OrderedRowExpression[S, decimal.Decimal]
DecimalOf converts an exact integer/decimal input to SQL numeric; floating input is excluded.
Example: expr.DecimalOf(input)
func Divide ¶
func Divide[S any, V numericValue](left, right RowValue[S, V]) OrderedRowExpression[S, V]
Divide divides two row values with the same owner and concrete numeric type. Arithmetic uses the codec's SQL representation; division by zero and numeric overflow are database errors. Integer division truncates toward zero.
Example: expr.Divide(left, right)
func FloatOf ¶
func FloatOf[S any, V numericValue](input RowValue[S, V]) OrderedRowExpression[S, float64]
FloatOf explicitly converts a numeric input to approximate double precision.
Example: expr.FloatOf(input)
func FromUnixMillis ¶
func FromUnixMillis[S any, V integerNumber](input RowValue[S, V]) OrderedRowExpression[S, temporal.DateTime]
FromUnixMillis converts exact integer Unix milliseconds to a UTC instant without floating-point epoch rounding.
Example: expr.FromUnixMillis(input)
func Hour ¶
func Hour[S any, V clockValue](input RowValue[S, V]) OrderedRowExpression[S, int64]
Hour extracts the hour from a time or local date-time. Use LocalAt to select an instant's timezone first.
Example: expr.Hour(input)
func ISODayOfWeek ¶
func ISODayOfWeek[S any, V calendarValue](input RowValue[S, V]) OrderedRowExpression[S, int64]
ISODayOfWeek extracts isodow from a typed row value. Calendar and clock components require a date/local value; use LocalAt for an instant's zone.
Example: expr.ISODayOfWeek(input)
func ISOWeek ¶
func ISOWeek[S any, V calendarValue](input RowValue[S, V]) OrderedRowExpression[S, int64]
ISOWeek extracts week from a typed row value. Calendar and clock components require a date/local value; use LocalAt for an instant's zone.
Example: expr.ISOWeek(input)
func ISOYear ¶
func ISOYear[S any, V calendarValue](input RowValue[S, V]) OrderedRowExpression[S, int64]
ISOYear extracts isoyear from a typed row value. Calendar and clock components require a date/local value; use LocalAt for an instant's zone.
Example: expr.ISOYear(input)
func InstantDifference ¶
func InstantDifference[S any, L, R instantValue](left RowValue[S, L], right RowValue[S, R]) OrderedRowExpression[S, temporal.Interval]
InstantDifference subtracts instants using PostgreSQL's 24-hour-day interval normalization.
Example: expr.InstantDifference(left, right)
func IntervalDays ¶
IntervalDays returns the signed calendar-day component.
Example: expr.IntervalDays(input)
func IntervalElapsed ¶
func IntervalElapsed[S any](input RowValue[S, temporal.Interval]) OrderedRowExpression[S, time.Duration]
IntervalElapsed returns the elapsed component as a Go duration, excluding months and days.
Example: expr.IntervalElapsed(input)
func IntervalMonths ¶
IntervalMonths returns the complete signed month component, including whole years.
Example: expr.IntervalMonths(input)
func JulianDay ¶
func JulianDay[S any, V calendarValue](input RowValue[S, V]) OrderedRowExpression[S, decimal.Decimal]
JulianDay returns the Julian day, including a fractional day for local date-times. Use LocalAt to select an instant's timezone first.
Example: expr.JulianDay(input)
func Length ¶
func Length[S any, V ~string](input RowValue[S, V]) OrderedRowExpression[S, int64]
Length counts Unicode characters rather than encoded bytes.
Example: expr.Length(input)
func LocalAt ¶
func LocalAt[S any, V instantValue](input RowValue[S, V], zone TimeZone) OrderedRowExpression[S, temporal.LocalDateTime]
LocalAt converts an instant to wall components in the explicitly selected zone.
Example: expr.LocalAt(input, zone)
func LocalDifference ¶
func LocalDifference[S any](left RowValue[S, temporal.LocalDateTime], right RowValue[S, temporal.LocalDateTime]) OrderedRowExpression[S, temporal.Interval]
LocalDifference subtracts local date-times using PostgreSQL's normalized interval result.
Example: expr.LocalDifference(left, right)
func Microseconds ¶
func Microseconds[S any, V clockValue](input RowValue[S, V]) OrderedRowExpression[S, int64]
Microseconds returns the whole seconds component multiplied by 1000000 plus its fractional microseconds. Use LocalAt to select an instant's timezone first.
Example: expr.Microseconds(input)
func Millennium ¶
func Millennium[S any, V calendarValue](input RowValue[S, V]) OrderedRowExpression[S, int64]
Millennium extracts millennium from a typed row value. Calendar and clock components require a date/local value; use LocalAt for an instant's zone.
Example: expr.Millennium(input)
func Milliseconds ¶
func Milliseconds[S any, V clockValue](input RowValue[S, V]) OrderedRowExpression[S, decimal.Decimal]
Milliseconds returns the seconds component multiplied by 1000, including fractional milliseconds. Use LocalAt to select an instant's timezone first.
Example: expr.Milliseconds(input)
func Minute ¶
func Minute[S any, V clockValue](input RowValue[S, V]) OrderedRowExpression[S, int64]
Minute extracts the minute from a time or local date-time. Use LocalAt to select an instant's timezone first.
Example: expr.Minute(input)
func Month ¶
func Month[S any, V calendarValue](input RowValue[S, V]) OrderedRowExpression[S, int64]
Month extracts month from a typed row value. Calendar and clock components require a date/local value; use LocalAt for an instant's zone.
Example: expr.Month(input)
func Multiply ¶
func Multiply[S any, V numericValue](left, right RowValue[S, V]) OrderedRowExpression[S, V]
Multiply multiplies two row values with the same owner and concrete numeric type. Arithmetic uses the codec's SQL representation; division by zero and numeric overflow are database errors. Integer division truncates toward zero.
Example: expr.Multiply(left, right)
func Negate ¶
func Negate[S any, V numericValue](input RowValue[S, V]) OrderedRowExpression[S, V]
Negate applies a numeric unary operation to a row value without changing its Go type.
Example: expr.Negate(input)
func NegateInterval ¶
func NegateInterval[S any](input RowValue[S, temporal.Interval]) OrderedRowExpression[S, temporal.Interval]
NegateInterval negates all interval components; database overflow remains an execution error.
Example: expr.NegateInterval(input)
func OctetLength ¶
func OctetLength[S any, V ~string](input RowValue[S, V]) OrderedRowExpression[S, int64]
OctetLength counts encoded bytes.
Example: expr.OctetLength(input)
func OrderRow ¶
func OrderRow[S any, V orderedScalar](v RowValue[S, V]) OrderedRowExpression[S, V]
OrderRow exposes ordered comparisons on a row value.
Example: expr.OrderRow(v)
func Quarter ¶
func Quarter[S any, V calendarValue](input RowValue[S, V]) OrderedRowExpression[S, int64]
Quarter extracts quarter from a typed row value. Calendar and clock components require a date/local value; use LocalAt for an instant's zone.
Example: expr.Quarter(input)
func Remainder ¶
func Remainder[S any, V exactNumber](left, right RowValue[S, V]) OrderedRowExpression[S, V]
Remainder takes the remainder of two row values with the same owner and concrete numeric type. Arithmetic uses the codec's SQL representation; division by zero and numeric overflow are database errors. Integer division truncates toward zero.
Example: expr.Remainder(left, right)
func ResolveLocal ¶
func ResolveLocal[S any](input RowValue[S, temporal.LocalDateTime], zone TimeZone, policy LocalResolution) OrderedRowExpression[S, temporal.DateTime]
ResolveLocal uses the explicitly selected PostgreSQL DST resolution policy. It differs from the uniqueness checks in temporal.LocalDateTime.In.
Example: expr.ResolveLocal(input, zone, policy)
func Second ¶
func Second[S any, V clockValue](input RowValue[S, V]) OrderedRowExpression[S, decimal.Decimal]
Second returns the exact seconds component, including fractional seconds, from a time or local date-time. Use LocalAt to select an instant's timezone first.
Example: expr.Second(input)
func ShiftDate ¶
func ShiftDate[S any](input RowValue[S, temporal.Date], interval RowValue[S, temporal.Interval]) OrderedRowExpression[S, temporal.LocalDateTime]
ShiftDate adds a typed interval expression to a date, returning local date-time components.
Example: expr.ShiftDate(input, interval)
func ShiftInstant ¶
func ShiftInstant[S any, V instantValue](input RowValue[S, V], interval RowValue[S, temporal.Interval], zone TimeZone) OrderedRowExpression[S, V]
ShiftInstant adds a typed interval expression in an explicit timezone, preserving the instant's Go type.
Example: expr.ShiftInstant(input, interval, zone)
func ShiftLocal ¶
func ShiftLocal[S any](input RowValue[S, temporal.LocalDateTime], interval RowValue[S, temporal.Interval]) OrderedRowExpression[S, temporal.LocalDateTime]
ShiftLocal adds a typed interval expression to local date-time components.
Example: expr.ShiftLocal(input, interval)
func SphericalDistance ¶
func SphericalDistance[S any, V numericValue](latitude, longitude RowValue[S, V], origin GeographicPoint) OrderedRowExpression[S, float64]
SphericalDistance returns great-circle metres on the IUGG mean-radius sphere (6371008.8 m). Stored coordinates must be valid degrees. This is straight-line surface distance, not a route estimate. The expression retains its row owner.
Example: expr.SphericalDistance(latitude, longitude, origin)
func Subtract ¶
func Subtract[S any, V numericValue](left, right RowValue[S, V]) OrderedRowExpression[S, V]
Subtract subtracts two row values with the same owner and concrete numeric type. Arithmetic uses the codec's SQL representation; division by zero and numeric overflow are database errors. Integer division truncates toward zero.
Example: expr.Subtract(left, right)
func SubtractClockElapsed ¶
func SubtractClockElapsed[S any](input RowValue[S, temporal.Time], duration time.Duration) OrderedRowExpression[S, temporal.Time]
SubtractClockElapsed subtracts elapsed time from a time of day, wrapping at midnight. Whole microseconds are required.
Example: expr.SubtractClockElapsed(input, duration)
func SubtractDateInterval ¶
func SubtractDateInterval[S any](input RowValue[S, temporal.Date], interval temporal.Interval) OrderedRowExpression[S, temporal.LocalDateTime]
SubtractDateInterval subtracts signed calendar and elapsed components. Database overflow and out-of-contract results remain errors.
Example: expr.SubtractDateInterval(input, interval)
func SubtractInstantInterval ¶
func SubtractInstantInterval[S any, V instantValue](input RowValue[S, V], interval temporal.Interval, zone TimeZone) OrderedRowExpression[S, V]
SubtractInstantInterval subtracts signed calendar and elapsed components in the explicit timezone. Database overflow and out-of-contract results remain errors.
Example: expr.SubtractInstantInterval(input, interval, zone)
func SubtractIntervals ¶
func SubtractIntervals[S any](left RowValue[S, temporal.Interval], right RowValue[S, temporal.Interval]) OrderedRowExpression[S, temporal.Interval]
SubtractIntervals subtracts interval components without conflating calendar and elapsed units.
Example: expr.SubtractIntervals(left, right)
func SubtractLocalInterval ¶
func SubtractLocalInterval[S any](input RowValue[S, temporal.LocalDateTime], interval temporal.Interval) OrderedRowExpression[S, temporal.LocalDateTime]
SubtractLocalInterval subtracts signed calendar and elapsed components. Database overflow and out-of-contract results remain errors.
Example: expr.SubtractLocalInterval(input, interval)
func TimeOf ¶
func TimeOf[S any](input RowValue[S, temporal.LocalDateTime]) OrderedRowExpression[S, temporal.Time]
TimeOf selects the time of day from local wall components.
Example: expr.TimeOf(input)
func TransactionTime ¶
func TransactionTime[S, M any](scope Scope[S, M]) OrderedRowExpression[S, temporal.DateTime]
TransactionTime returns PostgreSQL's transaction start instant. It is stable throughout a transaction and does not use the application's test clock.
Example: expr.TransactionTime(scope)
func TruncateDate ¶
func TruncateDate[S any](input RowValue[S, temporal.Date], unit DateUnit) OrderedRowExpression[S, temporal.Date]
TruncateDate truncates a calendar date without introducing a timezone.
Example: expr.TruncateDate(input, unit)
func TruncateInstant ¶
func TruncateInstant[S any, V instantValue](input RowValue[S, V], unit TimestampUnit, zone TimeZone) OrderedRowExpression[S, V]
TruncateInstant truncates an instant in the explicit zone while preserving its Go type.
Example: expr.TruncateInstant(input, unit, zone)
func TruncateLocal ¶
func TruncateLocal[S any](input RowValue[S, temporal.LocalDateTime], unit TimestampUnit) OrderedRowExpression[S, temporal.LocalDateTime]
TruncateLocal truncates local wall components without interpreting them as an instant.
Example: expr.TruncateLocal(input, unit)
func UnixMilliseconds ¶
func UnixMilliseconds[S any, V instantValue](input RowValue[S, V]) OrderedRowExpression[S, int64]
UnixMilliseconds returns integer milliseconds since the Unix epoch. Fractional milliseconds round down, matching time.Time.UnixMilli before epoch.
Example: expr.UnixMilliseconds(input)
func UnixSeconds ¶
func UnixSeconds[S any, V instantValue](input RowValue[S, V]) OrderedRowExpression[S, decimal.Decimal]
UnixSeconds returns exact decimal seconds since the Unix epoch for an instant.
Example: expr.UnixSeconds(input)
type OrderedRowValue ¶ added in v0.3.0
type OrderedRowValue[S, V any] interface { RowValue[S, V] // contains filtered or unexported methods }
OrderedRowValue is a sealed row value with ordered comparison capability. Use OrderRow or OrderNullableRow to opt a general row value into this capability.
Example: var operand expr.OrderedRowValue[User, int64] = expr.OrderRow(age)
type OrderedScalar ¶
type OrderedScalar interface {
// contains filtered or unexported methods
}
OrderedScalar is the shared ordered row-value constraint.
Example: func less[V expr.OrderedScalar](v V) V { return v }
type OrderedValueComparison ¶
type OrderedValueComparison[S any, V orderedScalar] = orderedValueComparison[*S, V]
OrderedValueComparison compares ordered selected values.
Example: expr.GtValue(expr.OrderValue(selected), value)
func OrderValue ¶
func OrderValue[S any, V orderedScalar](v Selected[S, V]) OrderedValueComparison[S, V]
OrderValue exposes ordered comparisons for a selected value.
Example: expr.OrderValue(v)
type OrderedValueOperand ¶ added in v0.3.0
type OrderedValueOperand[S, V any] interface { ValueOperand[S, V] // contains filtered or unexported methods }
OrderedValueOperand supplies ordered literal comparisons in HAVING.
Example: var source expr.OrderedValueOperand[User, int64] = expr.Count[User]()
type ParamSource ¶ added in v0.3.0
type ParamSource[S, V any] interface { // contains filtered or unexported methods }
ParamSource supplies a scoped codec for an exact parameter type.
Example: var source expr.ParamSource[User, int64] = expr.Count[User]()
type Predicate ¶
type Predicate[S any] = predicate[*S]
Predicate keeps source ownership on a SQL condition.
Example: expr.Eq(tenant, 7)
func DistinctFrom ¶
DistinctFrom compares unequal values while treating NULL as a comparable value. Both row operands retain the same scope and Go type, including nullability.
Example: expr.DistinctFrom(left, right)
func Equal ¶
Equal compares equal SQL values; NULL makes the condition unknown. Both row operands retain the same scope and Go type, including nullability.
Example: expr.Equal(left, right)
func FoundryPredicateValue ¶
func FoundryPredicateValue[S any](core ormcore.Predicate, seal sqlowner.ExpressionSeal) Predicate[S]
FoundryPredicateValue constructs a validated scoped SQL condition.
Example: expr.FoundryPredicateValue[User](core, seal)
func Greater ¶
Greater compares ordered SQL values using >. Both row operands retain the same scope and Go type, including nullability.
Example: expr.Greater(left, right)
func GreaterColumn ¶
func GreaterColumn[M, V, P any, L orderedColumn[M, V, P], R orderedColumn[M, V, P]](left L, right R) Predicate[M]
GreaterColumn compares same-owner ordered stored columns; enums lack this capability.
Example: expr.GreaterColumn(left, right)
func GreaterNullable ¶
func GreaterNullable[S any, V orderedScalar](left, right RowValue[S, value.Nullable[V]]) Predicate[S]
GreaterNullable compares nullable operands without removing SQL NULL. Widen non-null inputs explicitly with NullableRow.
Example: expr.GreaterNullable(left, right)
func GreaterOrEqual ¶
GreaterOrEqual compares ordered SQL values using >=. Both row operands retain the same scope and Go type, including nullability.
Example: expr.GreaterOrEqual(left, right)
func GreaterOrEqualNullable ¶
func GreaterOrEqualNullable[S any, V orderedScalar](left, right RowValue[S, value.Nullable[V]]) Predicate[S]
GreaterOrEqualNullable compares nullable operands without removing SQL NULL. Widen non-null inputs explicitly with NullableRow.
Example: expr.GreaterOrEqualNullable(left, right)
func Gt ¶ added in v0.3.0
func Gt[S any, V orderedScalar](e OrderedRowValue[S, V], v V) Predicate[S]
Gt compares row values before grouping.
Example: expr.Gt(e, v)
func Gte ¶ added in v0.3.0
func Gte[S any, V orderedScalar](e OrderedRowValue[S, V], v V) Predicate[S]
Gte compares row values before grouping.
Example: expr.Gte(e, v)
func Has ¶
func Has[M, N any](r orm.ExistenceRelation[M, N], ps ...Predicate[N]) Predicate[M]
Has lifts row filters through a scoped relation EXISTS.
Example: expr.Has(r, ps...)
func IsNotNull ¶ added in v0.3.0
IsNotNull tests SQL presence on a nullable expression.
Example: expr.IsNotNull(e)
func IsNull ¶ added in v0.3.0
IsNull tests SQL nullness on a nullable expression.
Example: expr.IsNull(e)
func Less ¶
Less compares ordered SQL values using <. Both row operands retain the same scope and Go type, including nullability.
Example: expr.Less(left, right)
func LessNullable ¶
LessNullable compares nullable operands without removing SQL NULL. Widen non-null inputs explicitly with NullableRow.
Example: expr.LessNullable(left, right)
func LessOrEqual ¶
LessOrEqual compares ordered SQL values using <=. Both row operands retain the same scope and Go type, including nullability.
Example: expr.LessOrEqual(left, right)
func LessOrEqualNullable ¶
func LessOrEqualNullable[S any, V orderedScalar](left, right RowValue[S, value.Nullable[V]]) Predicate[S]
LessOrEqualNullable compares nullable operands without removing SQL NULL. Widen non-null inputs explicitly with NullableRow.
Example: expr.LessOrEqualNullable(left, right)
func Like ¶
Like matches a typed SQL LIKE pattern; wildcard characters are intentional. Both row operands retain the same scope and Go type, including nullability.
Example: expr.Like(left, right)
func LikeNullable ¶
LikeNullable compares nullable operands without removing SQL NULL. Widen non-null inputs explicitly with NullableRow.
Example: expr.LikeNullable(left, right)
func Lt ¶ added in v0.3.0
func Lt[S any, V orderedScalar](e OrderedRowValue[S, V], v V) Predicate[S]
Lt compares row values before grouping.
Example: expr.Lt(e, v)
func Lte ¶ added in v0.3.0
func Lte[S any, V orderedScalar](e OrderedRowValue[S, V], v V) Predicate[S]
Lte compares row values before grouping.
Example: expr.Lte(e, v)
func ModelPredicate ¶
ModelPredicate adapts a model condition without discarding its declaration owner.
Example: expr.ModelPredicate(p)
func NotDistinctFrom ¶
NotDistinctFrom compares equal values while treating NULL as a comparable value. Both row operands retain the same scope and Go type, including nullability.
Example: expr.NotDistinctFrom(left, right)
func NotEqual ¶
NotEqual compares unequal SQL values; NULL makes the condition unknown. Both row operands retain the same scope and Go type, including nullability.
Example: expr.NotEqual(left, right)
func NullableEq ¶ added in v0.3.0
NullableEq compares a nullable row value with a present value.
Example: expr.NullableEq(e, v)
func NullableGt ¶ added in v0.3.0
func NullableGt[S any, V orderedScalar](e OrderedRowValue[S, value.Nullable[V]], v V) Predicate[S]
NullableGt compares nullable row values with a present value.
Example: expr.NullableGt(e, v)
func NullableGte ¶ added in v0.3.0
func NullableGte[S any, V orderedScalar](e OrderedRowValue[S, value.Nullable[V]], v V) Predicate[S]
NullableGte compares nullable row values with a present value.
Example: expr.NullableGte(e, v)
func NullableIn ¶ added in v0.3.0
NullableIn tests membership of a present value in a nullable row value.
Example: expr.NullableIn(e, vs...)
func NullableLt ¶ added in v0.3.0
func NullableLt[S any, V orderedScalar](e OrderedRowValue[S, value.Nullable[V]], v V) Predicate[S]
NullableLt compares nullable row values with a present value.
Example: expr.NullableLt(e, v)
func NullableLte ¶ added in v0.3.0
func NullableLte[S any, V orderedScalar](e OrderedRowValue[S, value.Nullable[V]], v V) Predicate[S]
NullableLte compares nullable row values with a present value.
Example: expr.NullableLte(e, v)
func NullableNe ¶ added in v0.3.0
NullableNe excludes a present value from a nullable row value.
Example: expr.NullableNe(e, v)
func NullableTextContains ¶ added in v0.3.0
func NullableTextContains[S any, V ~string](e NullableTextRowExpression[S, V], v V) Predicate[S]
NullableTextContains compares nullable text using the database collation.
Example: expr.NullableTextContains(e, v)
func NullableTextEndsWith ¶ added in v0.3.0
func NullableTextEndsWith[S any, V ~string](e NullableTextRowExpression[S, V], v V) Predicate[S]
NullableTextEndsWith compares nullable text using the database collation.
Example: expr.NullableTextEndsWith(e, v)
func NullableTextIContains ¶ added in v0.3.0
func NullableTextIContains[S any, V ~string](e NullableTextRowExpression[S, V], v V) Predicate[S]
NullableTextIContains compares nullable text using the database collation.
Example: expr.NullableTextIContains(e, v)
func NullableTextIEndsWith ¶ added in v0.3.0
func NullableTextIEndsWith[S any, V ~string](e NullableTextRowExpression[S, V], v V) Predicate[S]
NullableTextIEndsWith compares nullable text using the database collation.
Example: expr.NullableTextIEndsWith(e, v)
func NullableTextILike ¶ added in v0.3.0
func NullableTextILike[S any, V ~string](e NullableTextRowExpression[S, V], v V) Predicate[S]
NullableTextILike compares nullable text using the database collation.
Example: expr.NullableTextILike(e, v)
func NullableTextIStartsWith ¶ added in v0.3.0
func NullableTextIStartsWith[S any, V ~string](e NullableTextRowExpression[S, V], v V) Predicate[S]
NullableTextIStartsWith compares nullable text using the database collation.
Example: expr.NullableTextIStartsWith(e, v)
func NullableTextLike ¶ added in v0.3.0
func NullableTextLike[S any, V ~string](e NullableTextRowExpression[S, V], v V) Predicate[S]
NullableTextLike compares nullable text using the database collation.
Example: expr.NullableTextLike(e, v)
func NullableTextStartsWith ¶ added in v0.3.0
func NullableTextStartsWith[S any, V ~string](e NullableTextRowExpression[S, V], v V) Predicate[S]
NullableTextStartsWith compares nullable text using the database collation.
Example: expr.NullableTextStartsWith(e, v)
func TextContains ¶ added in v0.3.0
func TextContains[S any, V ~string](e TextRowExpression[S, V], v V) Predicate[S]
TextContains compares typed text using the database collation.
Example: expr.TextContains(e, v)
func TextEndsWith ¶ added in v0.3.0
func TextEndsWith[S any, V ~string](e TextRowExpression[S, V], v V) Predicate[S]
TextEndsWith compares typed text using the database collation.
Example: expr.TextEndsWith(e, v)
func TextIContains ¶ added in v0.3.0
func TextIContains[S any, V ~string](e TextRowExpression[S, V], v V) Predicate[S]
TextIContains compares typed text using the database collation.
Example: expr.TextIContains(e, v)
func TextIEndsWith ¶ added in v0.3.0
func TextIEndsWith[S any, V ~string](e TextRowExpression[S, V], v V) Predicate[S]
TextIEndsWith compares typed text using the database collation.
Example: expr.TextIEndsWith(e, v)
func TextILike ¶ added in v0.3.0
func TextILike[S any, V ~string](e TextRowExpression[S, V], v V) Predicate[S]
TextILike compares typed text using the database collation.
Example: expr.TextILike(e, v)
func TextIStartsWith ¶ added in v0.3.0
func TextIStartsWith[S any, V ~string](e TextRowExpression[S, V], v V) Predicate[S]
TextIStartsWith compares typed text using the database collation.
Example: expr.TextIStartsWith(e, v)
func TextLike ¶ added in v0.3.0
func TextLike[S any, V ~string](e TextRowExpression[S, V], v V) Predicate[S]
TextLike compares typed text using the database collation.
Example: expr.TextLike(e, v)
func TextStartsWith ¶ added in v0.3.0
func TextStartsWith[S any, V ~string](e TextRowExpression[S, V], v V) Predicate[S]
TextStartsWith compares typed text using the database collation.
Example: expr.TextStartsWith(e, v)
func UUIDGreater ¶
UUIDGreater retains expression scope and UUID ownership.
Example: expr.UUIDGreater(input, v)
func UUIDGreaterNullable ¶
func UUIDGreaterNullable[S, T any](input RowValue[S, value.Nullable[model.ID[T]]], v model.ID[T]) Predicate[S]
UUIDGreaterNullable compares a present UUID, leaving SQL NULL unmatched.
Example: expr.UUIDGreaterNullable(input, v)
func UUIDGreaterOrEqual ¶
UUIDGreaterOrEqual retains expression scope and UUID ownership.
Example: expr.UUIDGreaterOrEqual(input, v)
func UUIDGreaterOrEqualNullable ¶
func UUIDGreaterOrEqualNullable[S, T any](input RowValue[S, value.Nullable[model.ID[T]]], v model.ID[T]) Predicate[S]
UUIDGreaterOrEqualNullable compares a present UUID, leaving SQL NULL unmatched.
Example: expr.UUIDGreaterOrEqualNullable(input, v)
func UUIDLess ¶
UUIDLess retains expression scope and UUID ownership.
Example: expr.UUIDLess(input, v)
func UUIDLessNullable ¶
func UUIDLessNullable[S, T any](input RowValue[S, value.Nullable[model.ID[T]]], v model.ID[T]) Predicate[S]
UUIDLessNullable compares a present UUID, leaving SQL NULL unmatched.
Example: expr.UUIDLessNullable(input, v)
func UUIDLessOrEqual ¶
UUIDLessOrEqual retains expression scope and UUID ownership.
Example: expr.UUIDLessOrEqual(input, v)
type ProjectionKey ¶
type ProjectionKey[S any] = projectionKey[*S]
ProjectionKey is a selected-phase key; it cannot enter GROUP BY.
Example: expr.Key(expr.AsSelected(expr.Count[User]()))
func Key ¶ added in v0.3.0
func Key[S, V any](e Selected[S, V]) ProjectionKey[S]
Key constructs a selected key while preserving source ownership.
Example: expr.Key(expr.AsSelected(expr.Count[User]()))
type ProjectionOrder ¶
type ProjectionOrder[S any] interface { // contains filtered or unexported methods }
ProjectionOrder accepts row or selected ordering in a read-only rows query.
Example: rows.OrderBy(q, expr.DescValue(count))
type RangeBoundary ¶
type RangeBoundary[S, D any] struct { // contains filtered or unexported fields }
RangeBoundary retains scope and distance type.
Example: r.Preceding(2)
type RangeWindow ¶
type RangeWindow[S, D any] struct { // contains filtered or unexported fields }
RangeWindow fixes one order value and its typed distance.
Example: expr.NumericRange(w, expr.AsSelected(expr.Row(amount)))
func NullableNumericRange ¶
func NullableNumericRange[S any, V numericValue](w Window[S], input Selected[S, value.Nullable[V]]) RangeWindow[S, V]
NullableNumericRange orders nullable values using present distances.
Example: expr.NullableNumericRange(w, input)
func NullableTemporalRange ¶
func NullableTemporalRange[S any, V rangeTemporal](w Window[S], input Selected[S, value.Nullable[V]]) RangeWindow[S, temporal.Interval]
NullableTemporalRange keeps nullable ordering and present interval distances.
Example: expr.NullableTemporalRange(w, input)
func NumericRange ¶
func NumericRange[S any, V numericValue](w Window[S], input Selected[S, V]) RangeWindow[S, V]
NumericRange uses the order value's exact numeric type for distances.
Example: expr.NumericRange(w, input)
func TemporalRange ¶
func TemporalRange[S any, V rangeTemporal](w Window[S], input Selected[S, V]) RangeWindow[S, temporal.Interval]
TemporalRange uses calendar/elapsed intervals for temporal distances.
Example: expr.TemporalRange(w, input)
func (RangeWindow[S, D]) Asc ¶
func (r RangeWindow[S, D]) Asc() RangeWindow[S, D]
Asc orders RANGE values ascending.
Example: r.Asc()
func (RangeWindow[S, D]) Between ¶
func (r RangeWindow[S, D]) Between(start, end RangeBoundary[S, D]) Window[S]
Between completes the frame; preexisting window ordering is invalid.
Example: r.Between(r.Preceding(2), r.CurrentRow())
func (RangeWindow[S, D]) CurrentRow ¶
func (r RangeWindow[S, D]) CurrentRow() RangeBoundary[S, D]
CurrentRow identifies the current peers.
Example: r.CurrentRow()
func (RangeWindow[S, D]) Desc ¶
func (r RangeWindow[S, D]) Desc() RangeWindow[S, D]
Desc orders RANGE values descending.
Example: r.Desc()
func (RangeWindow[S, D]) Following ¶
func (r RangeWindow[S, D]) Following(v D) RangeBoundary[S, D]
Following captures a nonnegative finite distance once.
Example: r.Following(2)
func (RangeWindow[S, D]) Preceding ¶
func (r RangeWindow[S, D]) Preceding(v D) RangeBoundary[S, D]
Preceding captures a nonnegative finite distance once.
Example: r.Preceding(2)
func (RangeWindow[S, D]) UnboundedFollowing ¶
func (r RangeWindow[S, D]) UnboundedFollowing() RangeBoundary[S, D]
UnboundedFollowing identifies the last partition row.
Example: r.UnboundedFollowing()
func (RangeWindow[S, D]) UnboundedPreceding ¶
func (r RangeWindow[S, D]) UnboundedPreceding() RangeBoundary[S, D]
UnboundedPreceding identifies the first partition row.
Example: r.UnboundedPreceding()
type RowComparison ¶
type RowComparison[S, V any] = rowComparison[*S, V]
RowComparison exposes only equality and membership, including for enums.
Example: expr.In(expr.CompareRow(expr.Value(orm.EnumExpr(Users.State))), Active, Pending)
func CompareRow ¶
func CompareRow[S, V any](e Expression[S, V, V]) RowComparison[S, V]
CompareRow preserves a required column expression without adding ordered or text capabilities.
Example: expr.CompareRow(e)
type RowExpression ¶
type RowExpression[S, V any] = rowExpression[*S, V]
RowExpression is a computed row value with exact owner and result types.
Example: expr.Param(orm.NumberExpr(Users.Age), 2)
func Coalesce ¶
func Coalesce[S, V any](first RowValue[S, value.Nullable[V]], fallback RowValue[S, V]) RowExpression[S, V]
Coalesce removes nullability with a required fallback of the same owner/type.
Example: expr.Coalesce(first, fallback)
func CoalesceNullable ¶
func CoalesceNullable[S, V any](first RowValue[S, value.Nullable[V]], rest ...RowValue[S, value.Nullable[V]]) RowExpression[S, value.Nullable[V]]
CoalesceNullable retains one nullable layer when all inputs may be NULL.
Example: expr.CoalesceNullable(first, rest...)
func Constant ¶
func Constant[S, V any](c codec.Codec[V], v V) RowExpression[S, V]
Constant snapshots a bound value using its explicit codec, without an exemplar column.
Example: expr.Constant[User](c, v)
func FoundryRowExpression ¶
func FoundryRowExpression[S, V any](core ormcore.Expression, column ormcore.Column[V], seal sqlowner.ExpressionSeal) RowExpression[S, V]
FoundryRowExpression constructs a validated row-phase SQL value.
Example: expr.FoundryRowExpression[User](core, column, seal)
func JSONContainedBy ¶
JSONContainedBy evaluates JSON containment between identical payloads in the row phase.
Example: expr.JSONContainedBy(left, right)
func JSONContainedByNullable ¶
func JSONContainedByNullable[S, P any](left, right RowValue[S, value.Nullable[value.JSON[P]]]) RowExpression[S, value.Nullable[bool]]
JSONContainedByNullable evaluates JSON containment between identical payloads in the row phase; SQL NULL propagates.
Example: expr.JSONContainedByNullable(left, right)
func JSONContains ¶
JSONContains evaluates JSON containment between identical payloads in the row phase.
Example: expr.JSONContains(left, right)
func JSONContainsNullable ¶
func JSONContainsNullable[S, P any](left, right RowValue[S, value.Nullable[value.JSON[P]]]) RowExpression[S, value.Nullable[bool]]
JSONContainsNullable evaluates JSON containment between identical payloads in the row phase; SQL NULL propagates.
Example: expr.JSONContainsNullable(left, right)
func JSONScalar ¶
func JSONScalar[S, P any](path JSONPath[S, P], c codec.Codec[P]) RowExpression[S, value.Nullable[P]]
JSONScalar uses the exact payload codec. Missing paths and JSON null become SQL NULL.
Example: expr.JSONScalar(path, c)
func JSONType ¶
JSONType evaluates JSON shape or safe array length in the row phase.
Example: expr.JSONType(input)
func JSONTypeNullable ¶
func JSONTypeNullable[S, P any](input RowValue[S, value.Nullable[value.JSON[P]]]) RowExpression[S, value.Nullable[database.JSONKind]]
JSONTypeNullable evaluates JSON shape or safe array length in the row phase; SQL NULL propagates.
Example: expr.JSONTypeNullable(input)
func NullIf ¶
func NullIf[S, V any](first, second RowValue[S, V]) RowExpression[S, value.Nullable[V]]
NullIf adds one nullable layer to matching required row values.
Example: expr.NullIf(first, second)
func NullIfNullable ¶
func NullIfNullable[S, V any](first, second RowValue[S, value.Nullable[V]]) RowExpression[S, value.Nullable[V]]
NullIfNullable compares nullable row values while retaining one nullable layer.
Example: expr.NullIfNullable(first, second)
func NullableRow ¶
func NullableRow[S, V any](v RowValue[S, V]) RowExpression[S, value.Nullable[V]]
NullableRow explicitly widens a row value by one nullable layer.
Example: expr.NullableRow(v)
func Param ¶
func Param[S, V, P any](column orm.ExpressionColumn[S, V, P], v V) RowExpression[S, V]
Param snapshots a bound non-null value using a column's comparison codec.
Example: expr.Param(column, v)
func ParamOf ¶ added in v0.3.0
func ParamOf[S, V any](source ParamSource[S, V], v V) RowExpression[S, V]
ParamOf snapshots a bound value using a scoped expression's codec without evaluating it. A nullable aggregate supplies its present-value codec for fallback parameters.
Example: expr.ParamOf(expr.Count[User](), int64(0))
func RelatedValue ¶
func RelatedValue[M, N, V any](source orm.AggregateSource[M, N], computation AggregateExpression[N, V]) RowExpression[M, V]
RelatedValue computes a relation aggregate per parent without a model slot. The aggregate keeps its own nullability: COUNT is present, an empty SUM is NULL.
Example: expr.RelatedValue(source, computation)
func Row ¶
func Row[S, V any](v RowValue[S, V]) RowExpression[S, V]
Row adapts a row-phase value without changing its scope or projection type.
Example: expr.Row(v)
type RowValue ¶
type RowValue[S, V any] interface { // contains filtered or unexported methods }
RowValue is a sealed value evaluated before grouping.
Example: expr.Add(expr.Value(orm.NumberExpr(Users.Age)), expr.Value(orm.NumberExpr(Users.Age)))
type Scope ¶
type Scope[S, M any] struct { // contains filtered or unexported fields }
Scope keeps a model M inside source S.
Example: rows.Scope(members)
func FoundryScope ¶
FoundryScope constructs a sealed scope for rows.
Example: expr.FoundryScope[User, User](core, seal)
type SelectSource ¶ added in v0.3.0
type SelectSource[S, V any] interface { // contains filtered or unexported methods }
SelectSource is a sealed row or aggregate value that can enter the selected phase.
Example: var source expr.SelectSource[User, int64] = expr.Count[User]()
type Selected ¶
type Selected[S, V any] = selected[*S, V]
Selected is a selected-phase value; it cannot become a row predicate.
Example: expr.AsSelected(expr.Count[User]())
func AbsNullableValue ¶
func AbsNullableValue[S any, V numericValue](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[V]]
AbsNullableValue applies Abs to a selected nullable value.
Example: expr.AbsNullableValue(input)
func AddClockElapsedNullableValue ¶
func AddClockElapsedNullableValue[S any](input Selected[S, value.Nullable[temporal.Time]], duration time.Duration) Selected[S, value.Nullable[temporal.Time]]
AddClockElapsedNullableValue retains the selected aggregate/window phase.
Example: expr.AddClockElapsedNullableValue(input, duration)
func AddClockElapsedValue ¶
func AddClockElapsedValue[S any](input Selected[S, temporal.Time], duration time.Duration) Selected[S, temporal.Time]
AddClockElapsedValue retains the selected aggregate/window phase.
Example: expr.AddClockElapsedValue(input, duration)
func AddDateDaysNullableValue ¶
func AddDateDaysNullableValue[S any](input Selected[S, value.Nullable[temporal.Date]], days int32) Selected[S, value.Nullable[temporal.Date]]
AddDateDaysNullableValue retains the selected aggregate/window phase.
Example: expr.AddDateDaysNullableValue(input, days)
func AddDateDaysValue ¶
func AddDateDaysValue[S any](input Selected[S, temporal.Date], days int32) Selected[S, temporal.Date]
AddDateDaysValue retains the selected aggregate/window phase.
Example: expr.AddDateDaysValue(input, days)
func AddDateIntervalNullableValue ¶
func AddDateIntervalNullableValue[S any](input Selected[S, value.Nullable[temporal.Date]], interval temporal.Interval) Selected[S, value.Nullable[temporal.LocalDateTime]]
AddDateIntervalNullableValue retains the selected aggregate/window phase.
Example: expr.AddDateIntervalNullableValue(input, interval)
func AddDateIntervalValue ¶
func AddDateIntervalValue[S any](input Selected[S, temporal.Date], interval temporal.Interval) Selected[S, temporal.LocalDateTime]
AddDateIntervalValue retains the selected aggregate/window phase.
Example: expr.AddDateIntervalValue(input, interval)
func AddInstantIntervalNullableValue ¶
func AddInstantIntervalNullableValue[S any, V instantValue](input Selected[S, value.Nullable[V]], interval temporal.Interval, zone TimeZone) Selected[S, value.Nullable[V]]
AddInstantIntervalNullableValue retains the selected aggregate/window phase.
Example: expr.AddInstantIntervalNullableValue(input, interval, zone)
func AddInstantIntervalValue ¶
func AddInstantIntervalValue[S any, V instantValue](input Selected[S, V], interval temporal.Interval, zone TimeZone) Selected[S, V]
AddInstantIntervalValue retains the selected aggregate/window phase.
Example: expr.AddInstantIntervalValue(input, interval, zone)
func AddIntervalsNullableValue ¶
func AddIntervalsNullableValue[S any](left Selected[S, value.Nullable[temporal.Interval]], right Selected[S, value.Nullable[temporal.Interval]]) Selected[S, value.Nullable[temporal.Interval]]
AddIntervalsNullableValue retains selected aggregate/window phases and input ownership.
Example: expr.AddIntervalsNullableValue(left, right)
func AddIntervalsValue ¶
func AddIntervalsValue[S any](left Selected[S, temporal.Interval], right Selected[S, temporal.Interval]) Selected[S, temporal.Interval]
AddIntervalsValue retains selected aggregate/window phases and input ownership.
Example: expr.AddIntervalsValue(left, right)
func AddLocalIntervalNullableValue ¶
func AddLocalIntervalNullableValue[S any](input Selected[S, value.Nullable[temporal.LocalDateTime]], interval temporal.Interval) Selected[S, value.Nullable[temporal.LocalDateTime]]
AddLocalIntervalNullableValue retains the selected aggregate/window phase.
Example: expr.AddLocalIntervalNullableValue(input, interval)
func AddLocalIntervalValue ¶
func AddLocalIntervalValue[S any](input Selected[S, temporal.LocalDateTime], interval temporal.Interval) Selected[S, temporal.LocalDateTime]
AddLocalIntervalValue retains the selected aggregate/window phase.
Example: expr.AddLocalIntervalValue(input, interval)
func AddNullableValue ¶
func AddNullableValue[S any, V numericValue](left, right Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[V]]
AddNullableValue composes selected nullable numeric values.
Example: expr.AddNullableValue(left, right)
func AddValue ¶
AddValue is Add's selected-value counterpart for aggregate/window composition.
Example: expr.AddValue(left, right)
func AsSelected ¶ added in v0.3.0
func AsSelected[S, V any](source SelectSource[S, V]) Selected[S, V]
AsSelected promotes a row or aggregate result to the selected phase, preserving nullability.
Example: expr.AsSelected(expr.Count[User]())
func CenturyNullableValue ¶
func CenturyNullableValue[S any, V calendarValue](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[int64]]
CenturyNullableValue is the nullable selected-value counterpart.
Example: expr.CenturyNullableValue(input)
func CenturyValue ¶
CenturyValue retains the selected aggregate/window phase.
Example: expr.CenturyValue(input)
func ClockDifferenceNullableValue ¶
func ClockDifferenceNullableValue[S any](left Selected[S, value.Nullable[temporal.Time]], right Selected[S, value.Nullable[temporal.Time]]) Selected[S, value.Nullable[temporal.Interval]]
ClockDifferenceNullableValue retains selected aggregate/window phases and input ownership.
Example: expr.ClockDifferenceNullableValue(left, right)
func ClockDifferenceValue ¶
func ClockDifferenceValue[S any](left Selected[S, temporal.Time], right Selected[S, temporal.Time]) Selected[S, temporal.Interval]
ClockDifferenceValue retains selected aggregate/window phases and input ownership.
Example: expr.ClockDifferenceValue(left, right)
func CoalesceNullableValue ¶
func CoalesceNullableValue[S, V any](first Selected[S, value.Nullable[V]], rest ...Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[V]]
CoalesceNullableValue combines selected nullable inputs without nesting wrappers.
Example: expr.CoalesceNullableValue(first, rest...)
func CoalesceValue ¶
func CoalesceValue[S, V any](first Selected[S, value.Nullable[V]], fallback Selected[S, V]) Selected[S, V]
CoalesceValue composes selected values with a required fallback.
Example: expr.CoalesceValue(first, fallback)
func CombineDateTimeNullableValue ¶
func CombineDateTimeNullableValue[S any](date Selected[S, value.Nullable[temporal.Date]], clock Selected[S, value.Nullable[temporal.Time]]) Selected[S, value.Nullable[temporal.LocalDateTime]]
CombineDateTimeNullableValue retains the selected aggregate/window phase.
Example: expr.CombineDateTimeNullableValue(date, clock)
func CombineDateTimeValue ¶
func CombineDateTimeValue[S any](date Selected[S, temporal.Date], clock Selected[S, temporal.Time]) Selected[S, temporal.LocalDateTime]
CombineDateTimeValue retains the selected aggregate/window phase.
Example: expr.CombineDateTimeValue(date, clock)
func ConcatNullableValue ¶
func ConcatNullableValue[S any, V, W ~string](input Selected[S, value.Nullable[V]], other Selected[S, value.Nullable[W]]) Selected[S, value.Nullable[string]]
ConcatNullableValue applies ConcatNullable to selected expressions, including aggregates/windows.
Example: expr.ConcatNullableValue(input, other)
func ConcatValue ¶
func ConcatValue[S any, V, W ~string](input Selected[S, V], other Selected[S, W]) Selected[S, string]
ConcatValue applies Concat to selected expressions, including aggregates/windows.
Example: expr.ConcatValue(input, other)
func ConcatWSNullableValue ¶
func ConcatWSNullableValue[S any, V ~string](separator string, first Selected[S, value.Nullable[V]], rest ...Selected[S, value.Nullable[V]]) Selected[S, string]
ConcatWSNullableValue accepts selected text values and returns a non-null string.
Example: expr.ConcatWSNullableValue(separator, first, rest...)
func ConcatWSValue ¶
func ConcatWSValue[S any, V ~string](separator string, first Selected[S, V], rest ...Selected[S, V]) Selected[S, string]
ConcatWSValue accepts selected text values and returns a non-null string.
Example: expr.ConcatWSValue(separator, first, rest...)
func DateDifferenceNullableValue ¶
func DateDifferenceNullableValue[S any](left Selected[S, value.Nullable[temporal.Date]], right Selected[S, value.Nullable[temporal.Date]]) Selected[S, value.Nullable[int64]]
DateDifferenceNullableValue retains the selected aggregate/window phase.
Example: expr.DateDifferenceNullableValue(left, right)
func DateDifferenceValue ¶
func DateDifferenceValue[S any](left Selected[S, temporal.Date], right Selected[S, temporal.Date]) Selected[S, int64]
DateDifferenceValue retains the selected aggregate/window phase.
Example: expr.DateDifferenceValue(left, right)
func DateOfNullableValue ¶
func DateOfNullableValue[S any](input Selected[S, value.Nullable[temporal.LocalDateTime]]) Selected[S, value.Nullable[temporal.Date]]
DateOfNullableValue retains the selected aggregate/window phase.
Example: expr.DateOfNullableValue(input)
func DateOfValue ¶
DateOfValue retains the selected aggregate/window phase.
Example: expr.DateOfValue(input)
func DayNullableValue ¶
func DayNullableValue[S any, V calendarValue](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[int64]]
DayNullableValue is the nullable selected-value counterpart.
Example: expr.DayNullableValue(input)
func DayOfWeekNullableValue ¶
func DayOfWeekNullableValue[S any, V calendarValue](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[int64]]
DayOfWeekNullableValue is the nullable selected-value counterpart.
Example: expr.DayOfWeekNullableValue(input)
func DayOfWeekValue ¶
DayOfWeekValue retains the selected aggregate/window phase.
Example: expr.DayOfWeekValue(input)
func DayOfYearNullableValue ¶
func DayOfYearNullableValue[S any, V calendarValue](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[int64]]
DayOfYearNullableValue is the nullable selected-value counterpart.
Example: expr.DayOfYearNullableValue(input)
func DayOfYearValue ¶
DayOfYearValue retains the selected aggregate/window phase.
Example: expr.DayOfYearValue(input)
func DecadeNullableValue ¶
func DecadeNullableValue[S any, V calendarValue](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[int64]]
DecadeNullableValue is the nullable selected-value counterpart.
Example: expr.DecadeNullableValue(input)
func DecadeValue ¶
DecadeValue retains the selected aggregate/window phase.
Example: expr.DecadeValue(input)
func DecimalNullableValue ¶
func DecimalNullableValue[S any, V exactNumber](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[decimal.Decimal]]
DecimalNullableValue converts a selected nullable input without removing NULL.
Example: expr.DecimalNullableValue(input)
func DecimalValue ¶
DecimalValue is the selected-value counterpart of DecimalOf.
Example: expr.DecimalValue(input)
func DivideNullableValue ¶
func DivideNullableValue[S any, V numericValue](left, right Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[V]]
DivideNullableValue composes selected nullable numeric values.
Example: expr.DivideNullableValue(left, right)
func DivideValue ¶
DivideValue is Divide's selected-value counterpart for aggregate/window composition.
Example: expr.DivideValue(left, right)
func FirstNullableValue ¶
func FirstNullableValue[S, V any](input Selected[S, value.Nullable[V]], w Window[S]) Selected[S, value.Nullable[V]]
FirstNullableValue preserves one nullable layer.
Example: expr.FirstNullableValue(input, w)
func FirstValue ¶
FirstValue returns a frame value, or NULL when absent.
Example: expr.FirstValue(input, w)
func FloatNullableValue ¶
func FloatNullableValue[S any, V numericValue](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[float64]]
FloatNullableValue converts a selected nullable input without removing NULL.
Example: expr.FloatNullableValue(input)
func FloatValue ¶
FloatValue is the selected-value counterpart of FloatOf.
Example: expr.FloatValue(input)
func FoundrySelectedValue ¶
func FoundrySelectedValue[S, V any](core ormcore.Expression, column ormcore.Column[V], seal sqlowner.ExpressionSeal) Selected[S, V]
FoundrySelectedValue constructs a validated selected-phase SQL value.
Example: expr.FoundrySelectedValue[User](core, column, seal)
func FromUnixMillisNullableValue ¶
func FromUnixMillisNullableValue[S any, V integerNumber](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[temporal.DateTime]]
FromUnixMillisNullableValue retains the selected aggregate/window phase.
Example: expr.FromUnixMillisNullableValue(input)
func FromUnixMillisValue ¶
func FromUnixMillisValue[S any, V integerNumber](input Selected[S, V]) Selected[S, temporal.DateTime]
FromUnixMillisValue retains the selected aggregate/window phase.
Example: expr.FromUnixMillisValue(input)
func HourNullableValue ¶
func HourNullableValue[S any, V clockValue](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[int64]]
HourNullableValue is the nullable selected-value counterpart.
Example: expr.HourNullableValue(input)
func HourValue ¶
HourValue retains the selected aggregate/window phase.
Example: expr.HourValue(input)
func ISODayOfWeekNullableValue ¶
func ISODayOfWeekNullableValue[S any, V calendarValue](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[int64]]
ISODayOfWeekNullableValue is the nullable selected-value counterpart.
Example: expr.ISODayOfWeekNullableValue(input)
func ISODayOfWeekValue ¶
ISODayOfWeekValue retains the selected aggregate/window phase.
Example: expr.ISODayOfWeekValue(input)
func ISOWeekNullableValue ¶
func ISOWeekNullableValue[S any, V calendarValue](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[int64]]
ISOWeekNullableValue is the nullable selected-value counterpart.
Example: expr.ISOWeekNullableValue(input)
func ISOWeekValue ¶
ISOWeekValue retains the selected aggregate/window phase.
Example: expr.ISOWeekValue(input)
func ISOYearNullableValue ¶
func ISOYearNullableValue[S any, V calendarValue](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[int64]]
ISOYearNullableValue is the nullable selected-value counterpart.
Example: expr.ISOYearNullableValue(input)
func ISOYearValue ¶
ISOYearValue retains the selected aggregate/window phase.
Example: expr.ISOYearValue(input)
func InstantDifferenceNullableValue ¶
func InstantDifferenceNullableValue[S any, L, R instantValue](left Selected[S, value.Nullable[L]], right Selected[S, value.Nullable[R]]) Selected[S, value.Nullable[temporal.Interval]]
InstantDifferenceNullableValue retains selected aggregate/window phases and input ownership.
Example: expr.InstantDifferenceNullableValue(left, right)
func InstantDifferenceValue ¶
func InstantDifferenceValue[S any, L, R instantValue](left Selected[S, L], right Selected[S, R]) Selected[S, temporal.Interval]
InstantDifferenceValue retains selected aggregate/window phases and input ownership.
Example: expr.InstantDifferenceValue(left, right)
func IntervalDaysNullableValue ¶
func IntervalDaysNullableValue[S any](input Selected[S, value.Nullable[temporal.Interval]]) Selected[S, value.Nullable[int32]]
IntervalDaysNullableValue retains selected aggregate/window phases and input ownership.
Example: expr.IntervalDaysNullableValue(input)
func IntervalDaysValue ¶
IntervalDaysValue retains selected aggregate/window phases and input ownership.
Example: expr.IntervalDaysValue(input)
func IntervalElapsedNullableValue ¶
func IntervalElapsedNullableValue[S any](input Selected[S, value.Nullable[temporal.Interval]]) Selected[S, value.Nullable[time.Duration]]
IntervalElapsedNullableValue retains selected aggregate/window phases and input ownership.
Example: expr.IntervalElapsedNullableValue(input)
func IntervalElapsedValue ¶
IntervalElapsedValue retains selected aggregate/window phases and input ownership.
Example: expr.IntervalElapsedValue(input)
func IntervalMonthsNullableValue ¶
func IntervalMonthsNullableValue[S any](input Selected[S, value.Nullable[temporal.Interval]]) Selected[S, value.Nullable[int32]]
IntervalMonthsNullableValue retains selected aggregate/window phases and input ownership.
Example: expr.IntervalMonthsNullableValue(input)
func IntervalMonthsValue ¶
IntervalMonthsValue retains selected aggregate/window phases and input ownership.
Example: expr.IntervalMonthsValue(input)
func JSONContainedByNullableValue ¶
func JSONContainedByNullableValue[S, P any](left, right Selected[S, value.Nullable[value.JSON[P]]]) Selected[S, value.Nullable[bool]]
JSONContainedByNullableValue preserves selected phase, including aggregates and windows.
Example: expr.JSONContainedByNullableValue(left, right)
func JSONContainedByValue ¶
JSONContainedByValue preserves selected phase, including aggregates and windows.
Example: expr.JSONContainedByValue(left, right)
func JSONContainsNullableValue ¶
func JSONContainsNullableValue[S, P any](left, right Selected[S, value.Nullable[value.JSON[P]]]) Selected[S, value.Nullable[bool]]
JSONContainsNullableValue preserves selected phase, including aggregates and windows.
Example: expr.JSONContainsNullableValue(left, right)
func JSONContainsValue ¶
JSONContainsValue preserves selected phase, including aggregates and windows.
Example: expr.JSONContainsValue(left, right)
func JSONLengthNullableValue ¶
func JSONLengthNullableValue[S, P any](input Selected[S, value.Nullable[value.JSON[P]]]) Selected[S, value.Nullable[int64]]
JSONLengthNullableValue preserves selected phase, including aggregates and windows.
Example: expr.JSONLengthNullableValue(input)
func JSONLengthValue ¶
JSONLengthValue preserves selected phase, including aggregates and windows.
Example: expr.JSONLengthValue(input)
func JSONTypeNullableValue ¶
func JSONTypeNullableValue[S, P any](input Selected[S, value.Nullable[value.JSON[P]]]) Selected[S, value.Nullable[database.JSONKind]]
JSONTypeNullableValue preserves selected phase, including aggregates and windows.
Example: expr.JSONTypeNullableValue(input)
func JSONTypeValue ¶
JSONTypeValue preserves selected phase, including aggregates and windows.
Example: expr.JSONTypeValue(input)
func JulianDayNullableValue ¶
func JulianDayNullableValue[S any, V calendarValue](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[decimal.Decimal]]
JulianDayNullableValue is the nullable selected-value counterpart.
Example: expr.JulianDayNullableValue(input)
func JulianDayValue ¶
JulianDayValue retains the selected aggregate/window phase.
Example: expr.JulianDayValue(input)
func Lag ¶
Lag returns the offset value or NULL when absent; negative offsets reverse direction.
Example: expr.Lag(input, offset, w)
func LagNullable ¶
func LagNullable[S, V any](input Selected[S, value.Nullable[V]], offset int32, w Window[S]) Selected[S, value.Nullable[V]]
LagNullable preserves exactly one nullable layer.
Example: expr.LagNullable(input, offset, w)
func LagOr ¶
LagOr uses a captured typed fallback only when the offset row is absent. NULL in an existing row remains NULL.
Example: expr.LagOr(input, offset, fallback, w)
func LastNullableValue ¶
func LastNullableValue[S, V any](input Selected[S, value.Nullable[V]], w Window[S]) Selected[S, value.Nullable[V]]
LastNullableValue preserves one nullable layer.
Example: expr.LastNullableValue(input, w)
func LastValue ¶
LastValue returns a frame value, or NULL when absent.
Example: expr.LastValue(input, w)
func Lead ¶
Lead returns the offset value or NULL when absent; negative offsets reverse direction.
Example: expr.Lead(input, offset, w)
func LeadNullable ¶
func LeadNullable[S, V any](input Selected[S, value.Nullable[V]], offset int32, w Window[S]) Selected[S, value.Nullable[V]]
LeadNullable preserves exactly one nullable layer.
Example: expr.LeadNullable(input, offset, w)
func LeadOr ¶
LeadOr uses a captured typed fallback only when the offset row is absent. NULL in an existing row remains NULL.
Example: expr.LeadOr(input, offset, fallback, w)
func LengthNullableValue ¶
func LengthNullableValue[S any, V ~string](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[int64]]
LengthNullableValue applies LengthNullable to selected expressions, including aggregates/windows.
Example: expr.LengthNullableValue(input)
func LengthValue ¶
LengthValue applies Length to selected expressions, including aggregates/windows.
Example: expr.LengthValue(input)
func LocalAtNullableValue ¶
func LocalAtNullableValue[S any, V instantValue](input Selected[S, value.Nullable[V]], zone TimeZone) Selected[S, value.Nullable[temporal.LocalDateTime]]
LocalAtNullableValue retains the selected aggregate/window phase.
Example: expr.LocalAtNullableValue(input, zone)
func LocalAtValue ¶
func LocalAtValue[S any, V instantValue](input Selected[S, V], zone TimeZone) Selected[S, temporal.LocalDateTime]
LocalAtValue retains the selected aggregate/window phase.
Example: expr.LocalAtValue(input, zone)
func LocalDifferenceNullableValue ¶
func LocalDifferenceNullableValue[S any](left Selected[S, value.Nullable[temporal.LocalDateTime]], right Selected[S, value.Nullable[temporal.LocalDateTime]]) Selected[S, value.Nullable[temporal.Interval]]
LocalDifferenceNullableValue retains selected aggregate/window phases and input ownership.
Example: expr.LocalDifferenceNullableValue(left, right)
func LocalDifferenceValue ¶
func LocalDifferenceValue[S any](left Selected[S, temporal.LocalDateTime], right Selected[S, temporal.LocalDateTime]) Selected[S, temporal.Interval]
LocalDifferenceValue retains selected aggregate/window phases and input ownership.
Example: expr.LocalDifferenceValue(left, right)
func LowerNullableValue ¶
func LowerNullableValue[S any, V ~string](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[string]]
LowerNullableValue applies LowerNullable to selected expressions, including aggregates/windows.
Example: expr.LowerNullableValue(input)
func LowerValue ¶
LowerValue applies Lower to selected expressions, including aggregates/windows.
Example: expr.LowerValue(input)
func MicrosecondsNullableValue ¶
func MicrosecondsNullableValue[S any, V clockValue](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[int64]]
MicrosecondsNullableValue is the nullable selected-value counterpart.
Example: expr.MicrosecondsNullableValue(input)
func MicrosecondsValue ¶
MicrosecondsValue retains the selected aggregate/window phase.
Example: expr.MicrosecondsValue(input)
func MillenniumNullableValue ¶
func MillenniumNullableValue[S any, V calendarValue](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[int64]]
MillenniumNullableValue is the nullable selected-value counterpart.
Example: expr.MillenniumNullableValue(input)
func MillenniumValue ¶
MillenniumValue retains the selected aggregate/window phase.
Example: expr.MillenniumValue(input)
func MillisecondsNullableValue ¶
func MillisecondsNullableValue[S any, V clockValue](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[decimal.Decimal]]
MillisecondsNullableValue is the nullable selected-value counterpart.
Example: expr.MillisecondsNullableValue(input)
func MillisecondsValue ¶
MillisecondsValue retains the selected aggregate/window phase.
Example: expr.MillisecondsValue(input)
func MinuteNullableValue ¶
func MinuteNullableValue[S any, V clockValue](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[int64]]
MinuteNullableValue is the nullable selected-value counterpart.
Example: expr.MinuteNullableValue(input)
func MinuteValue ¶
MinuteValue retains the selected aggregate/window phase.
Example: expr.MinuteValue(input)
func MonthNullableValue ¶
func MonthNullableValue[S any, V calendarValue](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[int64]]
MonthNullableValue is the nullable selected-value counterpart.
Example: expr.MonthNullableValue(input)
func MonthValue ¶
MonthValue retains the selected aggregate/window phase.
Example: expr.MonthValue(input)
func MultiplyNullableValue ¶
func MultiplyNullableValue[S any, V numericValue](left, right Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[V]]
MultiplyNullableValue composes selected nullable numeric values.
Example: expr.MultiplyNullableValue(left, right)
func MultiplyValue ¶
MultiplyValue is Multiply's selected-value counterpart for aggregate/window composition.
Example: expr.MultiplyValue(left, right)
func NegateIntervalNullableValue ¶
func NegateIntervalNullableValue[S any](input Selected[S, value.Nullable[temporal.Interval]]) Selected[S, value.Nullable[temporal.Interval]]
NegateIntervalNullableValue retains selected aggregate/window phases and input ownership.
Example: expr.NegateIntervalNullableValue(input)
func NegateIntervalValue ¶
func NegateIntervalValue[S any](input Selected[S, temporal.Interval]) Selected[S, temporal.Interval]
NegateIntervalValue retains selected aggregate/window phases and input ownership.
Example: expr.NegateIntervalValue(input)
func NegateNullableValue ¶
func NegateNullableValue[S any, V numericValue](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[V]]
NegateNullableValue applies Negate to a selected nullable value.
Example: expr.NegateNullableValue(input)
func NegateValue ¶
NegateValue applies Negate to a selected numeric value.
Example: expr.NegateValue(input)
func NthNullableValue ¶
func NthNullableValue[S, V any](input Selected[S, value.Nullable[V]], n int32, w Window[S]) Selected[S, value.Nullable[V]]
NthNullableValue preserves one nullable layer.
Example: expr.NthNullableValue(input, n, w)
func NthValue ¶
NthValue returns a frame value, or NULL when absent.
Example: expr.NthValue(input, n, w)
func NullIfNullableValue ¶
func NullIfNullableValue[S, V any](first, second Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[V]]
NullIfNullableValue compares selected nullable values without nesting wrappers.
Example: expr.NullIfNullableValue(first, second)
func NullIfValue ¶
NullIfValue adds one nullable layer to matching required selected values.
Example: expr.NullIfValue(first, second)
func Nullable ¶
Nullable widens a selected value by one nullable layer without changing its phase.
Example: expr.Nullable(e)
func OctetLengthNullableValue ¶
func OctetLengthNullableValue[S any, V ~string](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[int64]]
OctetLengthNullableValue applies OctetLengthNullable to selected expressions, including aggregates/windows.
Example: expr.OctetLengthNullableValue(input)
func OctetLengthValue ¶
OctetLengthValue applies OctetLength to selected expressions, including aggregates/windows.
Example: expr.OctetLengthValue(input)
func Over ¶
func Over[S, V any](aggregate AggregateExpression[S, V], w Window[S]) Selected[S, V]
Over applies a frame to an aggregate, retaining its codec and nullability. FILTER must precede Over; COUNT DISTINCT windows are invalid.
Example: expr.Over(aggregate, w)
func QuarterNullableValue ¶
func QuarterNullableValue[S any, V calendarValue](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[int64]]
QuarterNullableValue is the nullable selected-value counterpart.
Example: expr.QuarterNullableValue(input)
func QuarterValue ¶
QuarterValue retains the selected aggregate/window phase.
Example: expr.QuarterValue(input)
func Raw ¶
Raw declares a selected-phase SQL fragment with a built-in result codec. Use ? for bound arguments and ?? for a literal question mark. The caller owns SQL semantics and result type; scopes and transactions belong to the query.
Example: expr.Raw[User, string](sql, args...)
func RawWithCodec ¶
RawWithCodec supplies an explicit result codec, including custom/nullable types.
Example: expr.RawWithCodec[User](c, sql, args...)
func RemainderNullableValue ¶
func RemainderNullableValue[S any, V exactNumber](left, right Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[V]]
RemainderNullableValue composes selected nullable numeric values.
Example: expr.RemainderNullableValue(left, right)
func RemainderValue ¶
RemainderValue is Remainder's selected-value counterpart for aggregate/window composition.
Example: expr.RemainderValue(left, right)
func ReplaceNullableValue ¶
func ReplaceNullableValue[S any, V, W, X ~string](input Selected[S, value.Nullable[V]], other Selected[S, value.Nullable[W]], replacement Selected[S, value.Nullable[X]]) Selected[S, value.Nullable[string]]
ReplaceNullableValue applies ReplaceNullable to selected expressions, including aggregates/windows.
Example: expr.ReplaceNullableValue(input, other, replacement)
func ReplaceValue ¶
func ReplaceValue[S any, V, W, X ~string](input Selected[S, V], other Selected[S, W], replacement Selected[S, X]) Selected[S, string]
ReplaceValue applies Replace to selected expressions, including aggregates/windows.
Example: expr.ReplaceValue(input, other, replacement)
func ResolveLocalNullableValue ¶
func ResolveLocalNullableValue[S any](input Selected[S, value.Nullable[temporal.LocalDateTime]], zone TimeZone, policy LocalResolution) Selected[S, value.Nullable[temporal.DateTime]]
ResolveLocalNullableValue retains the selected aggregate/window phase.
Example: expr.ResolveLocalNullableValue(input, zone, policy)
func ResolveLocalValue ¶
func ResolveLocalValue[S any](input Selected[S, temporal.LocalDateTime], zone TimeZone, policy LocalResolution) Selected[S, temporal.DateTime]
ResolveLocalValue retains the selected aggregate/window phase.
Example: expr.ResolveLocalValue(input, zone, policy)
func SecondNullableValue ¶
func SecondNullableValue[S any, V clockValue](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[decimal.Decimal]]
SecondNullableValue is the nullable selected-value counterpart.
Example: expr.SecondNullableValue(input)
func SecondValue ¶
SecondValue retains the selected aggregate/window phase.
Example: expr.SecondValue(input)
func ShiftDateNullableValue ¶
func ShiftDateNullableValue[S any](input Selected[S, value.Nullable[temporal.Date]], interval Selected[S, value.Nullable[temporal.Interval]]) Selected[S, value.Nullable[temporal.LocalDateTime]]
ShiftDateNullableValue retains selected aggregate/window phases and input ownership.
Example: expr.ShiftDateNullableValue(input, interval)
func ShiftDateValue ¶
func ShiftDateValue[S any](input Selected[S, temporal.Date], interval Selected[S, temporal.Interval]) Selected[S, temporal.LocalDateTime]
ShiftDateValue retains selected aggregate/window phases and input ownership.
Example: expr.ShiftDateValue(input, interval)
func ShiftInstantNullableValue ¶
func ShiftInstantNullableValue[S any, V instantValue](input Selected[S, value.Nullable[V]], interval Selected[S, value.Nullable[temporal.Interval]], zone TimeZone) Selected[S, value.Nullable[V]]
ShiftInstantNullableValue retains selected aggregate/window phases and input ownership.
Example: expr.ShiftInstantNullableValue(input, interval, zone)
func ShiftInstantValue ¶
func ShiftInstantValue[S any, V instantValue](input Selected[S, V], interval Selected[S, temporal.Interval], zone TimeZone) Selected[S, V]
ShiftInstantValue retains selected aggregate/window phases and input ownership.
Example: expr.ShiftInstantValue(input, interval, zone)
func ShiftLocalNullableValue ¶
func ShiftLocalNullableValue[S any](input Selected[S, value.Nullable[temporal.LocalDateTime]], interval Selected[S, value.Nullable[temporal.Interval]]) Selected[S, value.Nullable[temporal.LocalDateTime]]
ShiftLocalNullableValue retains selected aggregate/window phases and input ownership.
Example: expr.ShiftLocalNullableValue(input, interval)
func ShiftLocalValue ¶
func ShiftLocalValue[S any](input Selected[S, temporal.LocalDateTime], interval Selected[S, temporal.Interval]) Selected[S, temporal.LocalDateTime]
ShiftLocalValue retains selected aggregate/window phases and input ownership.
Example: expr.ShiftLocalValue(input, interval)
func SphericalDistanceNullableValue ¶
func SphericalDistanceNullableValue[S any](latitude, longitude Selected[S, value.Nullable[float64]], origin GeographicPoint) Selected[S, value.Nullable[float64]]
SphericalDistanceNullableValue is the selected nullable counterpart.
Example: expr.SphericalDistanceNullableValue(latitude, longitude, origin)
func SphericalDistanceValue ¶
func SphericalDistanceValue[S any](latitude, longitude Selected[S, float64], origin GeographicPoint) Selected[S, float64]
SphericalDistanceValue composes selected floating coordinates.
Example: expr.SphericalDistanceValue(latitude, longitude, origin)
func SubstringAtNullableValue ¶
func SubstringAtNullableValue[S any, V ~string, I integerNumber](input Selected[S, value.Nullable[V]], start, count Selected[S, I]) Selected[S, value.Nullable[string]]
SubstringAtNullableValue retains selected text/integer scopes for dynamic positions.
Example: expr.SubstringAtNullableValue(input, start, count)
func SubstringAtValue ¶
func SubstringAtValue[S any, V ~string, I integerNumber](input Selected[S, V], start, count Selected[S, I]) Selected[S, string]
SubstringAtValue retains selected text/integer scopes for dynamic positions.
Example: expr.SubstringAtValue(input, start, count)
func SubstringFromNullableValue ¶
func SubstringFromNullableValue[S any, V ~string](input Selected[S, value.Nullable[V]], start int32) Selected[S, value.Nullable[string]]
SubstringFromNullableValue accepts a selected text value and bound character positions.
Example: expr.SubstringFromNullableValue(input, start)
func SubstringFromValue ¶
SubstringFromValue accepts a selected text value and bound character positions.
Example: expr.SubstringFromValue(input, start)
func SubstringNullableValue ¶
func SubstringNullableValue[S any, V ~string](input Selected[S, value.Nullable[V]], start int32, count int32) Selected[S, value.Nullable[string]]
SubstringNullableValue accepts a selected text value and bound character positions.
Example: expr.SubstringNullableValue(input, start, count)
func SubstringValue ¶
func SubstringValue[S any, V ~string](input Selected[S, V], start int32, count int32) Selected[S, string]
SubstringValue accepts a selected text value and bound character positions.
Example: expr.SubstringValue(input, start, count)
func SubtractClockElapsedNullableValue ¶
func SubtractClockElapsedNullableValue[S any](input Selected[S, value.Nullable[temporal.Time]], duration time.Duration) Selected[S, value.Nullable[temporal.Time]]
SubtractClockElapsedNullableValue retains the selected aggregate/window phase.
Example: expr.SubtractClockElapsedNullableValue(input, duration)
func SubtractClockElapsedValue ¶
func SubtractClockElapsedValue[S any](input Selected[S, temporal.Time], duration time.Duration) Selected[S, temporal.Time]
SubtractClockElapsedValue retains the selected aggregate/window phase.
Example: expr.SubtractClockElapsedValue(input, duration)
func SubtractDateIntervalNullableValue ¶
func SubtractDateIntervalNullableValue[S any](input Selected[S, value.Nullable[temporal.Date]], interval temporal.Interval) Selected[S, value.Nullable[temporal.LocalDateTime]]
SubtractDateIntervalNullableValue retains the selected aggregate/window phase.
Example: expr.SubtractDateIntervalNullableValue(input, interval)
func SubtractDateIntervalValue ¶
func SubtractDateIntervalValue[S any](input Selected[S, temporal.Date], interval temporal.Interval) Selected[S, temporal.LocalDateTime]
SubtractDateIntervalValue retains the selected aggregate/window phase.
Example: expr.SubtractDateIntervalValue(input, interval)
func SubtractInstantIntervalNullableValue ¶
func SubtractInstantIntervalNullableValue[S any, V instantValue](input Selected[S, value.Nullable[V]], interval temporal.Interval, zone TimeZone) Selected[S, value.Nullable[V]]
SubtractInstantIntervalNullableValue retains the selected aggregate/window phase.
Example: expr.SubtractInstantIntervalNullableValue(input, interval, zone)
func SubtractInstantIntervalValue ¶
func SubtractInstantIntervalValue[S any, V instantValue](input Selected[S, V], interval temporal.Interval, zone TimeZone) Selected[S, V]
SubtractInstantIntervalValue retains the selected aggregate/window phase.
Example: expr.SubtractInstantIntervalValue(input, interval, zone)
func SubtractIntervalsNullableValue ¶
func SubtractIntervalsNullableValue[S any](left Selected[S, value.Nullable[temporal.Interval]], right Selected[S, value.Nullable[temporal.Interval]]) Selected[S, value.Nullable[temporal.Interval]]
SubtractIntervalsNullableValue retains selected aggregate/window phases and input ownership.
Example: expr.SubtractIntervalsNullableValue(left, right)
func SubtractIntervalsValue ¶
func SubtractIntervalsValue[S any](left Selected[S, temporal.Interval], right Selected[S, temporal.Interval]) Selected[S, temporal.Interval]
SubtractIntervalsValue retains selected aggregate/window phases and input ownership.
Example: expr.SubtractIntervalsValue(left, right)
func SubtractLocalIntervalNullableValue ¶
func SubtractLocalIntervalNullableValue[S any](input Selected[S, value.Nullable[temporal.LocalDateTime]], interval temporal.Interval) Selected[S, value.Nullable[temporal.LocalDateTime]]
SubtractLocalIntervalNullableValue retains the selected aggregate/window phase.
Example: expr.SubtractLocalIntervalNullableValue(input, interval)
func SubtractLocalIntervalValue ¶
func SubtractLocalIntervalValue[S any](input Selected[S, temporal.LocalDateTime], interval temporal.Interval) Selected[S, temporal.LocalDateTime]
SubtractLocalIntervalValue retains the selected aggregate/window phase.
Example: expr.SubtractLocalIntervalValue(input, interval)
func SubtractNullableValue ¶
func SubtractNullableValue[S any, V numericValue](left, right Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[V]]
SubtractNullableValue composes selected nullable numeric values.
Example: expr.SubtractNullableValue(left, right)
func SubtractValue ¶
SubtractValue is Subtract's selected-value counterpart for aggregate/window composition.
Example: expr.SubtractValue(left, right)
func TimeOfNullableValue ¶
func TimeOfNullableValue[S any](input Selected[S, value.Nullable[temporal.LocalDateTime]]) Selected[S, value.Nullable[temporal.Time]]
TimeOfNullableValue retains the selected aggregate/window phase.
Example: expr.TimeOfNullableValue(input)
func TimeOfValue ¶
TimeOfValue retains the selected aggregate/window phase.
Example: expr.TimeOfValue(input)
func TrimCharsNullableValue ¶
func TrimCharsNullableValue[S any, V, W ~string](input Selected[S, value.Nullable[V]], other Selected[S, value.Nullable[W]]) Selected[S, value.Nullable[string]]
TrimCharsNullableValue applies TrimCharsNullable to selected expressions, including aggregates/windows.
Example: expr.TrimCharsNullableValue(input, other)
func TrimCharsValue ¶
func TrimCharsValue[S any, V, W ~string](input Selected[S, V], other Selected[S, W]) Selected[S, string]
TrimCharsValue applies TrimChars to selected expressions, including aggregates/windows.
Example: expr.TrimCharsValue(input, other)
func TrimLeftCharsNullableValue ¶
func TrimLeftCharsNullableValue[S any, V, W ~string](input Selected[S, value.Nullable[V]], other Selected[S, value.Nullable[W]]) Selected[S, value.Nullable[string]]
TrimLeftCharsNullableValue applies TrimLeftCharsNullable to selected expressions, including aggregates/windows.
Example: expr.TrimLeftCharsNullableValue(input, other)
func TrimLeftCharsValue ¶
func TrimLeftCharsValue[S any, V, W ~string](input Selected[S, V], other Selected[S, W]) Selected[S, string]
TrimLeftCharsValue applies TrimLeftChars to selected expressions, including aggregates/windows.
Example: expr.TrimLeftCharsValue(input, other)
func TrimLeftNullableValue ¶
func TrimLeftNullableValue[S any, V ~string](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[string]]
TrimLeftNullableValue applies TrimLeftNullable to selected expressions, including aggregates/windows.
Example: expr.TrimLeftNullableValue(input)
func TrimLeftValue ¶
TrimLeftValue applies TrimLeft to selected expressions, including aggregates/windows.
Example: expr.TrimLeftValue(input)
func TrimNullableValue ¶
func TrimNullableValue[S any, V ~string](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[string]]
TrimNullableValue applies TrimNullable to selected expressions, including aggregates/windows.
Example: expr.TrimNullableValue(input)
func TrimRightCharsNullableValue ¶
func TrimRightCharsNullableValue[S any, V, W ~string](input Selected[S, value.Nullable[V]], other Selected[S, value.Nullable[W]]) Selected[S, value.Nullable[string]]
TrimRightCharsNullableValue applies TrimRightCharsNullable to selected expressions, including aggregates/windows.
Example: expr.TrimRightCharsNullableValue(input, other)
func TrimRightCharsValue ¶
func TrimRightCharsValue[S any, V, W ~string](input Selected[S, V], other Selected[S, W]) Selected[S, string]
TrimRightCharsValue applies TrimRightChars to selected expressions, including aggregates/windows.
Example: expr.TrimRightCharsValue(input, other)
func TrimRightNullableValue ¶
func TrimRightNullableValue[S any, V ~string](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[string]]
TrimRightNullableValue applies TrimRightNullable to selected expressions, including aggregates/windows.
Example: expr.TrimRightNullableValue(input)
func TrimRightValue ¶
TrimRightValue applies TrimRight to selected expressions, including aggregates/windows.
Example: expr.TrimRightValue(input)
func TrimValue ¶
TrimValue applies Trim to selected expressions, including aggregates/windows.
Example: expr.TrimValue(input)
func TruncateDateNullableValue ¶
func TruncateDateNullableValue[S any](input Selected[S, value.Nullable[temporal.Date]], unit DateUnit) Selected[S, value.Nullable[temporal.Date]]
TruncateDateNullableValue retains the selected aggregate/window phase.
Example: expr.TruncateDateNullableValue(input, unit)
func TruncateDateValue ¶
func TruncateDateValue[S any](input Selected[S, temporal.Date], unit DateUnit) Selected[S, temporal.Date]
TruncateDateValue retains the selected aggregate/window phase.
Example: expr.TruncateDateValue(input, unit)
func TruncateInstantNullableValue ¶
func TruncateInstantNullableValue[S any, V instantValue](input Selected[S, value.Nullable[V]], unit TimestampUnit, zone TimeZone) Selected[S, value.Nullable[V]]
TruncateInstantNullableValue retains the selected aggregate/window phase.
Example: expr.TruncateInstantNullableValue(input, unit, zone)
func TruncateInstantValue ¶
func TruncateInstantValue[S any, V instantValue](input Selected[S, V], unit TimestampUnit, zone TimeZone) Selected[S, V]
TruncateInstantValue retains the selected aggregate/window phase.
Example: expr.TruncateInstantValue(input, unit, zone)
func TruncateLocalNullableValue ¶
func TruncateLocalNullableValue[S any](input Selected[S, value.Nullable[temporal.LocalDateTime]], unit TimestampUnit) Selected[S, value.Nullable[temporal.LocalDateTime]]
TruncateLocalNullableValue retains the selected aggregate/window phase.
Example: expr.TruncateLocalNullableValue(input, unit)
func TruncateLocalValue ¶
func TruncateLocalValue[S any](input Selected[S, temporal.LocalDateTime], unit TimestampUnit) Selected[S, temporal.LocalDateTime]
TruncateLocalValue retains the selected aggregate/window phase.
Example: expr.TruncateLocalValue(input, unit)
func UnixMillisecondsNullableValue ¶
func UnixMillisecondsNullableValue[S any, V instantValue](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[int64]]
UnixMillisecondsNullableValue is the nullable selected-value counterpart.
Example: expr.UnixMillisecondsNullableValue(input)
func UnixMillisecondsValue ¶
UnixMillisecondsValue retains the selected aggregate/window phase.
Example: expr.UnixMillisecondsValue(input)
func UnixSecondsNullableValue ¶
func UnixSecondsNullableValue[S any, V instantValue](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[decimal.Decimal]]
UnixSecondsNullableValue is the nullable selected-value counterpart.
Example: expr.UnixSecondsNullableValue(input)
func UnixSecondsValue ¶
UnixSecondsValue retains the selected aggregate/window phase.
Example: expr.UnixSecondsValue(input)
func UpperNullableValue ¶
func UpperNullableValue[S any, V ~string](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[string]]
UpperNullableValue applies UpperNullable to selected expressions, including aggregates/windows.
Example: expr.UpperNullableValue(input)
func UpperValue ¶
UpperValue applies Upper to selected expressions, including aggregates/windows.
Example: expr.UpperValue(input)
type SelectedOrder ¶
type SelectedOrder[S any] struct { // contains filtered or unexported fields }
SelectedOrder orders selected values through rows, never model queries.
Example: expr.DescValue(count)
func AscValue ¶ added in v0.3.0
func AscValue[S, V any](source ValueOrderSource[S, V]) SelectedOrder[S]
AscValue orders a selected or aggregate value ascending in a rows query.
Example: expr.AscValue(expr.Count[User]()).NullsFirst()
func DescValue ¶ added in v0.3.0
func DescValue[S, V any](source ValueOrderSource[S, V]) SelectedOrder[S]
DescValue orders a selected or aggregate value descending in a rows query.
Example: expr.DescValue(expr.Count[User]()).NullsLast()
func (SelectedOrder[S]) NullsFirst ¶
func (o SelectedOrder[S]) NullsFirst() SelectedOrder[S]
NullsFirst places SQL NULL first.
Example: expr.DescValue(count).NullsFirst()
func (SelectedOrder[S]) NullsLast ¶
func (o SelectedOrder[S]) NullsLast() SelectedOrder[S]
NullsLast places SQL NULL last.
Example: expr.DescValue(count).NullsLast()
type TextFilterAdapter ¶ added in v0.3.0
TextFilterAdapter adapts a text row expression for datatable filters.
Example: expr.TextFilter(name)
func TextFilter ¶ added in v0.3.0
func TextFilter[S any, V ~string](e TextRowExpression[S, V]) TextFilterAdapter[S, V]
TextFilter adapts TextRowExpression for datatable filters.
Example: expr.TextFilter(e)
func (TextFilterAdapter[S, V]) Contains ¶ added in v0.3.0
func (a TextFilterAdapter[S, V]) Contains(v V) Predicate[S]
Contains tests a text substring within the adapter's row scope.
func (TextFilterAdapter[S, V]) Eq ¶ added in v0.3.0
func (a TextFilterAdapter[S, V]) Eq(v V) Predicate[S]
Eq compares equality within the adapter's row scope.
func (TextFilterAdapter[S, V]) Gt ¶ added in v0.3.0
func (a TextFilterAdapter[S, V]) Gt(v V) Predicate[S]
Gt compares greater than within the adapter's row scope.
func (TextFilterAdapter[S, V]) Gte ¶ added in v0.3.0
func (a TextFilterAdapter[S, V]) Gte(v V) Predicate[S]
Gte compares greater than or equal within the adapter's row scope.
func (TextFilterAdapter[S, V]) IContains ¶ added in v0.3.0
func (a TextFilterAdapter[S, V]) IContains(v V) Predicate[S]
IContains tests a text substring without case sensitivity within the adapter's row scope.
func (TextFilterAdapter[S, V]) In ¶ added in v0.3.0
func (a TextFilterAdapter[S, V]) In(vs ...V) Predicate[S]
In tests membership within the adapter's row scope.
func (TextFilterAdapter[S, V]) Like ¶ added in v0.3.0
func (a TextFilterAdapter[S, V]) Like(v V) Predicate[S]
Like tests a SQL text pattern within the adapter's row scope.
func (TextFilterAdapter[S, V]) Lt ¶ added in v0.3.0
func (a TextFilterAdapter[S, V]) Lt(v V) Predicate[S]
Lt compares less than within the adapter's row scope.
func (TextFilterAdapter[S, V]) Lte ¶ added in v0.3.0
func (a TextFilterAdapter[S, V]) Lte(v V) Predicate[S]
Lte compares less than or equal within the adapter's row scope.
func (TextFilterAdapter[S, V]) Ne ¶ added in v0.3.0
func (a TextFilterAdapter[S, V]) Ne(v V) Predicate[S]
Ne compares inequality within the adapter's row scope.
type TextRowExpression ¶
TextRowExpression is a row text calculation with typed comparisons.
Example: expr.TextLike(expr.Lower(name), "a%")
func Concat ¶
func Concat[S any, V, W ~string](input RowValue[S, V], other RowValue[S, W]) TextRowExpression[S, string]
Concat concatenates text with SQL's strict NULL semantics.
Example: expr.Concat(input, other)
func ConcatWS ¶
func ConcatWS[S any, V ~string](separator string, first RowValue[S, V], rest ...RowValue[S, V]) TextRowExpression[S, string]
ConcatWS joins text with a bound, non-null separator. SQL NULL inputs are skipped; empty strings are retained. The result is always a non-null string.
Example: expr.ConcatWS(separator, first, rest...)
func ConcatWSNullable ¶
func ConcatWSNullable[S any, V ~string](separator string, first RowValue[S, value.Nullable[V]], rest ...RowValue[S, value.Nullable[V]]) TextRowExpression[S, string]
ConcatWSNullable joins text with a bound, non-null separator. SQL NULL inputs are skipped; empty strings are retained. The result is always a non-null string.
Example: expr.ConcatWSNullable(separator, first, rest...)
func Lower ¶
func Lower[S any, V ~string](input RowValue[S, V]) TextRowExpression[S, string]
Text calculations return ordinary strings, preserving query scope and NULL separately from the input's named/domain string type and validation rules. Lower lowercases text using the database collation.
Example: expr.Lower(input)
func Replace ¶
func Replace[S any, V, W, X ~string](input RowValue[S, V], other RowValue[S, W], replacement RowValue[S, X]) TextRowExpression[S, string]
Replace replaces literal occurrences of its second argument with its third.
Example: expr.Replace(input, other, replacement)
func Substring ¶
func Substring[S any, V ~string](input RowValue[S, V], start int32, count int32) TextRowExpression[S, string]
Substring selects characters using PostgreSQL's one-based positions. Zero/negative starts follow SQL semantics. A negative count is rejected before execution.
Example: expr.Substring(input, start, count)
func SubstringAt ¶
func SubstringAt[S any, V ~string, I integerNumber](input RowValue[S, V], start, count RowValue[S, I]) TextRowExpression[S, string]
SubstringAt uses typed integer expressions as positions. Database negative-count and SQL-integer overflow errors remain runtime errors. Positions are non-null.
Example: expr.SubstringAt(input, start, count)
func SubstringFrom ¶
func SubstringFrom[S any, V ~string](input RowValue[S, V], start int32) TextRowExpression[S, string]
SubstringFrom selects characters using PostgreSQL's one-based positions. Zero/negative starts follow SQL semantics. It selects through the end.
Example: expr.SubstringFrom(input, start)
func TextRow ¶
func TextRow[S any, V ~string](column orm.TextExpressionColumn[S, V, V]) TextRowExpression[S, V]
TextRow preserves a required text column capability.
Example: expr.TextRow(column)
func TextRowAt ¶
func TextRowAt[S, M any, V ~string](scope Scope[S, M], column orm.TextExpressionColumn[M, V, V]) TextRowExpression[S, V]
TextRowAt preserves a required text column in a joined or aliased scope.
Example: expr.TextRowAt(scope, column)
func TextRowValue ¶ added in v0.4.0
func TextRowValue[S any, V ~string](v RowValue[S, V]) TextRowExpression[S, V]
TextRowValue exposes text comparisons on a computed row value without changing it.
Example: expr.TextLike(expr.TextRowValue(v), "a%")
func Trim ¶
func Trim[S any, V ~string](input RowValue[S, V]) TextRowExpression[S, string]
Trim removes ordinary spaces from both ends.
Example: expr.Trim(input)
func TrimChars ¶
func TrimChars[S any, V, W ~string](input RowValue[S, V], other RowValue[S, W]) TextRowExpression[S, string]
TrimChars removes characters in the second argument from both ends.
Example: expr.TrimChars(input, other)
func TrimLeft ¶
func TrimLeft[S any, V ~string](input RowValue[S, V]) TextRowExpression[S, string]
TrimLeft removes ordinary spaces from the start.
Example: expr.TrimLeft(input)
func TrimLeftChars ¶
func TrimLeftChars[S any, V, W ~string](input RowValue[S, V], other RowValue[S, W]) TextRowExpression[S, string]
TrimLeftChars removes characters in the second argument from the start.
Example: expr.TrimLeftChars(input, other)
func TrimRight ¶
func TrimRight[S any, V ~string](input RowValue[S, V]) TextRowExpression[S, string]
TrimRight removes ordinary spaces from the end.
Example: expr.TrimRight(input)
func TrimRightChars ¶
func TrimRightChars[S any, V, W ~string](input RowValue[S, V], other RowValue[S, W]) TextRowExpression[S, string]
TrimRightChars removes characters in the second argument from the end.
Example: expr.TrimRightChars(input, other)
type TextValueComparison ¶
TextValueComparison supplies selected text conditions for HAVING.
Example: expr.TextValue(selectedName)
type TextValueFilterAdapter ¶ added in v0.3.0
TextValueFilterAdapter supplies typed HAVING operations to datatable filters.
Example: expr.TextValueFilter(source)
func TextValueFilter ¶ added in v0.3.0
func TextValueFilter[S any, V ~string](source TextValueOperand[S, V]) TextValueFilterAdapter[S, V]
TextValueFilter adapts a selected comparison source without changing scope, value, or phase.
Example: expr.TextValueFilter(source)
func (TextValueFilterAdapter[S, V]) Contains ¶ added in v0.3.0
func (a TextValueFilterAdapter[S, V]) Contains(v V) HavingPredicate[S]
Contains tests a text substring within the adapter's HAVING scope.
func (TextValueFilterAdapter[S, V]) Eq ¶ added in v0.3.0
func (a TextValueFilterAdapter[S, V]) Eq(v V) HavingPredicate[S]
Eq compares equality within the adapter's HAVING scope.
func (TextValueFilterAdapter[S, V]) Gt ¶ added in v0.3.0
func (a TextValueFilterAdapter[S, V]) Gt(v V) HavingPredicate[S]
Gt compares greater than within the adapter's HAVING scope.
func (TextValueFilterAdapter[S, V]) Gte ¶ added in v0.3.0
func (a TextValueFilterAdapter[S, V]) Gte(v V) HavingPredicate[S]
Gte compares greater than or equal within the adapter's HAVING scope.
func (TextValueFilterAdapter[S, V]) IContains ¶ added in v0.3.0
func (a TextValueFilterAdapter[S, V]) IContains(v V) HavingPredicate[S]
IContains tests a text substring without case sensitivity within the adapter's HAVING scope.
func (TextValueFilterAdapter[S, V]) In ¶ added in v0.3.0
func (a TextValueFilterAdapter[S, V]) In(vs ...V) HavingPredicate[S]
In tests membership within the adapter's HAVING scope.
func (TextValueFilterAdapter[S, V]) Like ¶ added in v0.3.0
func (a TextValueFilterAdapter[S, V]) Like(v V) HavingPredicate[S]
Like tests a SQL text pattern within the adapter's HAVING scope.
func (TextValueFilterAdapter[S, V]) Lt ¶ added in v0.3.0
func (a TextValueFilterAdapter[S, V]) Lt(v V) HavingPredicate[S]
Lt compares less than within the adapter's HAVING scope.
func (TextValueFilterAdapter[S, V]) Lte ¶ added in v0.3.0
func (a TextValueFilterAdapter[S, V]) Lte(v V) HavingPredicate[S]
Lte compares less than or equal within the adapter's HAVING scope.
func (TextValueFilterAdapter[S, V]) Ne ¶ added in v0.3.0
func (a TextValueFilterAdapter[S, V]) Ne(v V) HavingPredicate[S]
Ne compares inequality within the adapter's HAVING scope.
type TextValueOperand ¶ added in v0.3.0
type TextValueOperand[S any, V ~string] interface { OrderedValueOperand[S, V] // contains filtered or unexported methods }
TextValueOperand supplies text comparisons in HAVING without losing the declared string type.
Example: var source expr.TextValueOperand[User, string] = expr.TextValue(selectedName)
type TimeZone ¶
type TimeZone struct {
// contains filtered or unexported fields
}
TimeZone names an explicitly selected IANA timezone; its zero value is invalid.
Example: expr.UTCZone()
func LoadTimeZone ¶
LoadTimeZone validates an explicit IANA timezone.
Example: expr.LoadTimeZone(name)
type TimestampUnit ¶
type TimestampUnit uint8
TimestampUnit identifies a timestamp boundary, including fractional seconds.
Example: expr.TimestampDay
const ( TimestampMicrosecond TimestampUnit = TimestampUnit(unitMicrosecond) TimestampMillisecond TimestampUnit = TimestampUnit(unitMillisecond) TimestampSecond TimestampUnit = TimestampUnit(unitSecond) TimestampMinute TimestampUnit = TimestampUnit(unitMinute) TimestampHour TimestampUnit = TimestampUnit(unitHour) TimestampDay TimestampUnit = TimestampUnit(unitDay) TimestampWeek TimestampUnit = TimestampUnit(unitWeek) TimestampMonth TimestampUnit = TimestampUnit(unitMonth) TimestampQuarter TimestampUnit = TimestampUnit(unitQuarter) TimestampYear TimestampUnit = TimestampUnit(unitYear) TimestampDecade TimestampUnit = TimestampUnit(unitDecade) TimestampCentury TimestampUnit = TimestampUnit(unitCentury) TimestampMillennium TimestampUnit = TimestampUnit(unitMillennium) )
type ValueCase ¶
type ValueCase[S, V any] struct { // contains filtered or unexported fields }
ValueCase is unfinished selected CASE with group predicates and selected results.
Example: expr.WhenValue(expr.GtValue(count, 0), expr.AsSelected(count)).Else(expr.AsSelected(expr.ParamOf(count, 0)))
func WhenValue ¶
func WhenValue[S, V any](condition HavingPredicate[S], result Selected[S, V]) ValueCase[S, V]
WhenValue starts selected CASE using group predicates and selected results.
Example: expr.WhenValue(condition, result)
func (ValueCase[S, V]) Else ¶
Else finishes selected CASE with a matching selected fallback.
Example: choice.Else(expr.AsSelected(expr.ParamOf(count, 0)))
type ValueComparison ¶
type ValueComparison[S, V any] = valueComparison[*S, V]
ValueComparison compares selected values without exposing row predicates.
Example: expr.EqValue(expr.CompareValue(selected), value)
func CompareValue ¶
func CompareValue[S, V any](v Selected[S, V]) ValueComparison[S, V]
CompareValue exposes equality comparisons for a selected value.
Example: expr.CompareValue(v)
type ValueFilterAdapter ¶ added in v0.3.0
ValueFilterAdapter supplies typed HAVING operations to datatable filters.
Example: expr.ValueFilter(source)
func ValueFilter ¶ added in v0.3.0
func ValueFilter[S any, V any](source ValueOperand[S, V]) ValueFilterAdapter[S, V]
ValueFilter adapts a selected comparison source without changing scope, value, or phase.
Example: expr.ValueFilter(source)
func (ValueFilterAdapter[S, V]) Eq ¶ added in v0.3.0
func (a ValueFilterAdapter[S, V]) Eq(v V) HavingPredicate[S]
Eq compares equality within the adapter's HAVING scope.
func (ValueFilterAdapter[S, V]) In ¶ added in v0.3.0
func (a ValueFilterAdapter[S, V]) In(vs ...V) HavingPredicate[S]
In tests membership within the adapter's HAVING scope.
func (ValueFilterAdapter[S, V]) Ne ¶ added in v0.3.0
func (a ValueFilterAdapter[S, V]) Ne(v V) HavingPredicate[S]
Ne compares inequality within the adapter's HAVING scope.
type ValueOperand ¶ added in v0.3.0
type ValueOperand[S, V any] interface { // contains filtered or unexported methods }
ValueOperand supplies literal comparisons in HAVING, retaining scope and value types. Nullable operands compare present values using their nullable codec.
Example: var source expr.ValueOperand[User, int64] = expr.Count[User]()
type ValueOrderSource ¶ added in v0.3.0
type ValueOrderSource[S, V any] interface { ParamSource[S, V] // contains filtered or unexported methods }
ValueOrderSource is a selected or aggregate value that can supply selected ordering.
Example: var source expr.ValueOrderSource[User, int64] = expr.Count[User]()
type Window ¶
type Window[S any] struct { // contains filtered or unexported fields }
Window is an immutable scope-owned partition, order and frame. Its zero value means OVER ().
Example: expr.Window[User]{}.OrderBy(expr.Asc(expr.Value(orm.KeyExpr(Users.ID))))
func WindowFor ¶
WindowFor infers ownership from a concrete model/join/alias scope; it does not copy query ordering or pagination.
Example: expr.WindowFor(scope)
func (Window[S]) ExcludeCurrentRow ¶
ExcludeCurrentRow excludes the current row.
Example: w.ExcludeCurrentRow()
func (Window[S]) ExcludeGroup ¶
ExcludeGroup excludes the current row and peers.
Example: w.ExcludeGroup()
func (Window[S]) ExcludeTies ¶
ExcludeTies excludes peers but retains the current row.
Example: w.ExcludeTies()
func (Window[S]) GroupsBetween ¶
func (w Window[S]) GroupsBetween(start, end FrameBoundary) Window[S]
GroupsBetween replaces the peer-group frame; ordering is required.
Example: w.GroupsBetween(expr.Preceding(1), expr.CurrentRow())
func (Window[S]) Named ¶
Named registers a reusable definition emitted once per SELECT.
Example: w.Named("by_buyer")
func (Window[S]) OrderBy ¶
func (w Window[S]) OrderBy(orders ...ProjectionOrder[S]) Window[S]
OrderBy appends row/selected ordering; it does not order the final result.
Example: w.OrderBy(expr.Desc(amount))
func (Window[S]) PartitionBy ¶
PartitionBy appends row keys without grouping the result.
Example: w.PartitionBy(expr.Group(buyer))
func (Window[S]) PartitionByValues ¶
func (w Window[S]) PartitionByValues(keys ...ProjectionKey[S]) Window[S]
PartitionByValues appends selected keys, including aggregates.
Example: w.PartitionByValues(expr.Key(expr.AsSelected(count)))
func (Window[S]) RangeBetween ¶
func (w Window[S]) RangeBetween(start, end FramePosition) Window[S]
RangeBetween defines a peer/unbounded frame without value distances.
Example: w.RangeBetween(expr.CurrentRow(), expr.UnboundedFollowing())
func (Window[S]) RowsBetween ¶
func (w Window[S]) RowsBetween(start, end FrameBoundary) Window[S]
RowsBetween replaces the physical-row frame.
Example: w.RowsBetween(expr.Preceding(1), expr.CurrentRow())
Source Files
¶
- aggregate.go
- aggregate_fields.go
- aggregate_rows.go
- bridge.go
- comparison.go
- conditional.go
- expression.go
- filter.go
- geographic_expression.go
- having.go
- interval_expression.go
- json_declaration.go
- json_expression.go
- json_path.go
- keys.go
- model.go
- nullable_scope.go
- numeric.go
- operation.go
- raw.go
- relation_aggregate.go
- relation_order.go
- row.go
- scalar_parameter.go
- selected_functions.go
- temporal_expression.go
- temporal_extract.go
- temporal_units.go
- text_comparison.go
- text_expression.go
- text_row.go
- uuid_compare.go
- value.go
- value_filter.go
- window.go
- window_function.go
- window_range.go