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 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
- func (a Aggregate[S, V]) Asc() SelectedOrder[S]
- func (a Aggregate[S, V]) Desc() SelectedOrder[S]
- func (a Aggregate[S, V]) Eq(v V) HavingPredicate[S]
- func (a Aggregate[S, V]) Filter(predicates ...Predicate[S]) Aggregate[S, V]
- func (a Aggregate[S, V]) In(vs ...V) HavingPredicate[S]
- func (a Aggregate[S, V]) Ne(v V) HavingPredicate[S]
- func (a Aggregate[S, V]) Param(v V) RowExpression[S, V]
- func (a Aggregate[S, V]) Value() Selected[S, V]
- type AggregateExpression
- type Case
- 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 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 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 HavingAnd[S any](predicates ...HavingPredicate[S]) HavingPredicate[S]
- func HavingOr[S any](predicates ...HavingPredicate[S]) 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 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]
- 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 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]
- func (a NullableOrderedAggregate[S, V]) Asc() SelectedOrder[S]
- func (a NullableOrderedAggregate[S, V]) Desc() SelectedOrder[S]
- func (a NullableOrderedAggregate[S, V]) Eq(v V) HavingPredicate[S]
- func (a NullableOrderedAggregate[S, V]) Filter(predicates ...Predicate[S]) NullableOrderedAggregate[S, V]
- func (a NullableOrderedAggregate[S, V]) Gt(v V) HavingPredicate[S]
- func (a NullableOrderedAggregate[S, V]) Gte(v V) HavingPredicate[S]
- func (a NullableOrderedAggregate[S, V]) In(vs ...V) HavingPredicate[S]
- func (a NullableOrderedAggregate[S, V]) IsNotNull() HavingPredicate[S]
- func (a NullableOrderedAggregate[S, V]) IsNull() HavingPredicate[S]
- func (a NullableOrderedAggregate[S, V]) Lt(v V) HavingPredicate[S]
- func (a NullableOrderedAggregate[S, V]) Lte(v V) HavingPredicate[S]
- func (a NullableOrderedAggregate[S, V]) Ne(v V) HavingPredicate[S]
- func (a NullableOrderedAggregate[S, V]) Param(v V) RowExpression[S, V]
- func (a NullableOrderedAggregate[S, V]) Value() Selected[S, value.Nullable[V]]
- 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]
- func (e NullableOrderedRowExpression[S, V]) Asc() Order[S]
- func (e NullableOrderedRowExpression[S, V]) Desc() Order[S]
- func (e NullableOrderedRowExpression[S, V]) Eq(v V) Predicate[S]
- func (e NullableOrderedRowExpression[S, V]) Gt(v V) Predicate[S]
- func (e NullableOrderedRowExpression[S, V]) Gte(v V) Predicate[S]
- func (e NullableOrderedRowExpression[S, V]) In(vs ...V) Predicate[S]
- func (e NullableOrderedRowExpression[S, V]) IsNotNull() Predicate[S]
- func (e NullableOrderedRowExpression[S, V]) IsNull() Predicate[S]
- func (e NullableOrderedRowExpression[S, V]) Lt(v V) Predicate[S]
- func (e NullableOrderedRowExpression[S, V]) Lte(v V) Predicate[S]
- func (e NullableOrderedRowExpression[S, V]) Ne(v V) Predicate[S]
- func (e NullableOrderedRowExpression[S, V]) Param(v value.Nullable[V]) RowExpression[S, value.Nullable[V]]
- func (e NullableOrderedRowExpression[S, V]) Value() Selected[S, value.Nullable[V]]
- type NullableOrderedValueComparison
- func (a NullableOrderedValueComparison[S, V]) Eq(v V) HavingPredicate[S]
- func (a NullableOrderedValueComparison[S, V]) Gt(v V) HavingPredicate[S]
- func (a NullableOrderedValueComparison[S, V]) Gte(v V) HavingPredicate[S]
- func (a NullableOrderedValueComparison[S, V]) In(vs ...V) HavingPredicate[S]
- func (a NullableOrderedValueComparison[S, V]) IsNotNull() HavingPredicate[S]
- func (a NullableOrderedValueComparison[S, V]) IsNull() HavingPredicate[S]
- func (a NullableOrderedValueComparison[S, V]) Lt(v V) HavingPredicate[S]
- func (a NullableOrderedValueComparison[S, V]) Lte(v V) HavingPredicate[S]
- func (a NullableOrderedValueComparison[S, V]) Ne(v V) HavingPredicate[S]
- type NullableRowComparison
- func (e NullableRowComparison[S, V]) Eq(v V) Predicate[S]
- func (e NullableRowComparison[S, V]) In(vs ...V) Predicate[S]
- func (e NullableRowComparison[S, V]) IsNotNull() Predicate[S]
- func (e NullableRowComparison[S, V]) IsNull() Predicate[S]
- func (e NullableRowComparison[S, V]) Ne(v V) Predicate[S]
- func (e NullableRowComparison[S, V]) Value() Selected[S, value.Nullable[V]]
- type NullableScope
- 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 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]
- func (e NullableTextRowExpression[S, V]) Asc() Order[S]
- func (e NullableTextRowExpression[S, V]) Contains(v V) Predicate[S]
- func (e NullableTextRowExpression[S, V]) Desc() Order[S]
- func (e NullableTextRowExpression[S, V]) EndsWith(v V) Predicate[S]
- func (e NullableTextRowExpression[S, V]) Eq(v V) Predicate[S]
- func (e NullableTextRowExpression[S, V]) Gt(v V) Predicate[S]
- func (e NullableTextRowExpression[S, V]) Gte(v V) Predicate[S]
- func (e NullableTextRowExpression[S, V]) IContains(v V) Predicate[S]
- func (e NullableTextRowExpression[S, V]) IEndsWith(v V) Predicate[S]
- func (e NullableTextRowExpression[S, V]) ILike(v V) Predicate[S]
- func (e NullableTextRowExpression[S, V]) IStartsWith(v V) Predicate[S]
- func (e NullableTextRowExpression[S, V]) In(vs ...V) Predicate[S]
- func (e NullableTextRowExpression[S, V]) IsNotNull() Predicate[S]
- func (e NullableTextRowExpression[S, V]) IsNull() Predicate[S]
- func (e NullableTextRowExpression[S, V]) Like(v V) Predicate[S]
- func (e NullableTextRowExpression[S, V]) Lt(v V) Predicate[S]
- func (e NullableTextRowExpression[S, V]) Lte(v V) Predicate[S]
- func (e NullableTextRowExpression[S, V]) Ne(v V) Predicate[S]
- func (e NullableTextRowExpression[S, V]) Param(v value.Nullable[V]) RowExpression[S, value.Nullable[V]]
- func (e NullableTextRowExpression[S, V]) StartsWith(v V) Predicate[S]
- func (e NullableTextRowExpression[S, V]) Value() Selected[S, value.Nullable[V]]
- type NullableTextValueComparison
- func (e NullableTextValueComparison[S, V]) Contains(v V) HavingPredicate[S]
- func (e NullableTextValueComparison[S, V]) EndsWith(v V) HavingPredicate[S]
- func (a NullableTextValueComparison[S, V]) Eq(v V) HavingPredicate[S]
- func (a NullableTextValueComparison[S, V]) Gt(v V) HavingPredicate[S]
- func (a NullableTextValueComparison[S, V]) Gte(v V) HavingPredicate[S]
- func (e NullableTextValueComparison[S, V]) IContains(v V) HavingPredicate[S]
- func (e NullableTextValueComparison[S, V]) IEndsWith(v V) HavingPredicate[S]
- func (e NullableTextValueComparison[S, V]) ILike(v V) HavingPredicate[S]
- func (e NullableTextValueComparison[S, V]) IStartsWith(v V) HavingPredicate[S]
- func (a NullableTextValueComparison[S, V]) In(vs ...V) HavingPredicate[S]
- func (a NullableTextValueComparison[S, V]) IsNotNull() HavingPredicate[S]
- func (a NullableTextValueComparison[S, V]) IsNull() HavingPredicate[S]
- func (e NullableTextValueComparison[S, V]) Like(v V) HavingPredicate[S]
- func (a NullableTextValueComparison[S, V]) Lt(v V) HavingPredicate[S]
- func (a NullableTextValueComparison[S, V]) Lte(v V) HavingPredicate[S]
- func (a NullableTextValueComparison[S, V]) Ne(v V) HavingPredicate[S]
- func (e NullableTextValueComparison[S, V]) StartsWith(v V) HavingPredicate[S]
- type Order
- 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]
- func (a OrderedAggregate[S, V]) Asc() SelectedOrder[S]
- func (a OrderedAggregate[S, V]) Desc() SelectedOrder[S]
- func (a OrderedAggregate[S, V]) Eq(v V) HavingPredicate[S]
- func (a OrderedAggregate[S, V]) Filter(predicates ...Predicate[S]) OrderedAggregate[S, V]
- func (a OrderedAggregate[S, V]) Gt(v V) HavingPredicate[S]
- func (a OrderedAggregate[S, V]) Gte(v V) HavingPredicate[S]
- func (a OrderedAggregate[S, V]) In(vs ...V) HavingPredicate[S]
- func (a OrderedAggregate[S, V]) Lt(v V) HavingPredicate[S]
- func (a OrderedAggregate[S, V]) Lte(v V) HavingPredicate[S]
- func (a OrderedAggregate[S, V]) Ne(v V) HavingPredicate[S]
- func (a OrderedAggregate[S, V]) Param(v V) RowExpression[S, V]
- func (a OrderedAggregate[S, V]) Value() Selected[S, V]
- 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]
- func (e OrderedRowExpression[S, V]) Asc() Order[S]
- func (e OrderedRowExpression[S, V]) Desc() Order[S]
- func (e OrderedRowExpression[S, V]) Eq(v V) Predicate[S]
- func (e OrderedRowExpression[S, V]) Gt(v V) Predicate[S]
- func (e OrderedRowExpression[S, V]) Gte(v V) Predicate[S]
- func (e OrderedRowExpression[S, V]) In(vs ...V) Predicate[S]
- func (e OrderedRowExpression[S, V]) IsNotNull() Predicate[S]
- func (e OrderedRowExpression[S, V]) IsNull() Predicate[S]
- func (e OrderedRowExpression[S, V]) Lt(v V) Predicate[S]
- func (e OrderedRowExpression[S, V]) Lte(v V) Predicate[S]
- func (e OrderedRowExpression[S, V]) Ne(v V) Predicate[S]
- func (e OrderedRowExpression[S, V]) Param(v V) RowExpression[S, V]
- func (e OrderedRowExpression[S, V]) Value() Selected[S, V]
- type OrderedScalar
- type OrderedValueComparison
- func (a OrderedValueComparison[S, V]) Eq(v V) HavingPredicate[S]
- func (a OrderedValueComparison[S, V]) Gt(v V) HavingPredicate[S]
- func (a OrderedValueComparison[S, V]) Gte(v V) HavingPredicate[S]
- func (a OrderedValueComparison[S, V]) In(vs ...V) HavingPredicate[S]
- func (a OrderedValueComparison[S, V]) IsNotNull() HavingPredicate[S]
- func (a OrderedValueComparison[S, V]) IsNull() HavingPredicate[S]
- func (a OrderedValueComparison[S, V]) Lt(v V) HavingPredicate[S]
- func (a OrderedValueComparison[S, V]) Lte(v V) HavingPredicate[S]
- func (a OrderedValueComparison[S, V]) Ne(v V) HavingPredicate[S]
- 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 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 Has[M, N any](r orm.ExistenceRelation[M, N], ps ...Predicate[N]) Predicate[M]
- 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 ModelPredicate[M any](p orm.Predicate[M]) Predicate[M]
- 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 Or[S any](ps ...Predicate[S]) 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 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]
- func (e RowExpression[S, V]) Asc() Order[S]
- func (e RowExpression[S, V]) Desc() Order[S]
- func (e RowExpression[S, V]) Eq(v V) Predicate[S]
- func (e RowExpression[S, V]) In(vs ...V) Predicate[S]
- func (e RowExpression[S, V]) IsNotNull() Predicate[S]
- func (e RowExpression[S, V]) IsNull() Predicate[S]
- func (e RowExpression[S, V]) Ne(v V) Predicate[S]
- func (e RowExpression[S, V]) Param(v V) RowExpression[S, V]
- func (e RowExpression[S, V]) Value() Selected[S, V]
- type RowValue
- type Scope
- 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 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 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 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]
- func (e TextRowExpression[S, V]) Asc() Order[S]
- func (e TextRowExpression[S, V]) Contains(v V) Predicate[S]
- func (e TextRowExpression[S, V]) Desc() Order[S]
- func (e TextRowExpression[S, V]) EndsWith(v V) Predicate[S]
- func (e TextRowExpression[S, V]) Eq(v V) Predicate[S]
- func (e TextRowExpression[S, V]) Gt(v V) Predicate[S]
- func (e TextRowExpression[S, V]) Gte(v V) Predicate[S]
- func (e TextRowExpression[S, V]) IContains(v V) Predicate[S]
- func (e TextRowExpression[S, V]) IEndsWith(v V) Predicate[S]
- func (e TextRowExpression[S, V]) ILike(v V) Predicate[S]
- func (e TextRowExpression[S, V]) IStartsWith(v V) Predicate[S]
- func (e TextRowExpression[S, V]) In(vs ...V) Predicate[S]
- func (e TextRowExpression[S, V]) IsNotNull() Predicate[S]
- func (e TextRowExpression[S, V]) IsNull() Predicate[S]
- func (e TextRowExpression[S, V]) Like(v V) Predicate[S]
- func (e TextRowExpression[S, V]) Lt(v V) Predicate[S]
- func (e TextRowExpression[S, V]) Lte(v V) Predicate[S]
- func (e TextRowExpression[S, V]) Ne(v V) Predicate[S]
- func (e TextRowExpression[S, V]) Param(v V) RowExpression[S, V]
- func (e TextRowExpression[S, V]) StartsWith(v V) Predicate[S]
- func (e TextRowExpression[S, V]) Value() Selected[S, V]
- type TextValueComparison
- func (e TextValueComparison[S, V]) Contains(v V) HavingPredicate[S]
- func (e TextValueComparison[S, V]) EndsWith(v V) HavingPredicate[S]
- func (a TextValueComparison[S, V]) Eq(v V) HavingPredicate[S]
- func (a TextValueComparison[S, V]) Gt(v V) HavingPredicate[S]
- func (a TextValueComparison[S, V]) Gte(v V) HavingPredicate[S]
- func (e TextValueComparison[S, V]) IContains(v V) HavingPredicate[S]
- func (e TextValueComparison[S, V]) IEndsWith(v V) HavingPredicate[S]
- func (e TextValueComparison[S, V]) ILike(v V) HavingPredicate[S]
- func (e TextValueComparison[S, V]) IStartsWith(v V) HavingPredicate[S]
- func (a TextValueComparison[S, V]) In(vs ...V) HavingPredicate[S]
- func (a TextValueComparison[S, V]) IsNotNull() HavingPredicate[S]
- func (a TextValueComparison[S, V]) IsNull() HavingPredicate[S]
- func (e TextValueComparison[S, V]) Like(v V) HavingPredicate[S]
- func (a TextValueComparison[S, V]) Lt(v V) HavingPredicate[S]
- func (a TextValueComparison[S, V]) Lte(v V) HavingPredicate[S]
- func (a TextValueComparison[S, V]) Ne(v V) HavingPredicate[S]
- func (e TextValueComparison[S, V]) StartsWith(v V) HavingPredicate[S]
- type TimeZone
- type TimestampUnit
- type ValueCase
- type ValueComparison
- 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 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,sqlowner.Expressions()).
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: FoundryExpression(e,sqlowner.Expressions()).
func FoundryGroup ¶
func FoundryGroup[S any](key GroupKey[S], seal sqlowner.ExpressionSeal) ormcore.Expression
FoundryGroup supplies validated row-key metadata to rows. Example: FoundryGroup(key,sqlowner.Expressions()).
func FoundryHaving ¶
func FoundryHaving[S any](p HavingPredicate[S], seal sqlowner.ExpressionSeal) ormcore.Predicate
FoundryHaving supplies validated group-condition metadata to rows. Example: FoundryHaving(p,sqlowner.Expressions()).
func FoundryKey ¶
func FoundryKey[S any](key ProjectionKey[S], seal sqlowner.ExpressionSeal) ormcore.Expression
FoundryKey supplies validated selected-key metadata to rows. Example: FoundryKey(key,sqlowner.Expressions()).
func FoundryNullableScopeData ¶
func FoundryNullableScopeData[S, M any](scope NullableScope[S, M], seal sqlowner.ExpressionSeal) ormcore.Scope
FoundryNullableScopeData exposes validated nullable metadata. Example: FoundryNullableScopeData(scope,sqlowner.Expressions()).
func FoundryOrder ¶
FoundryOrder exposes sealed ordering to rows. Example: FoundryOrder(o,sqlowner.Expressions()).
func FoundryPredicate ¶
FoundryPredicate exposes a sealed condition to rows. Example: FoundryPredicate(p,sqlowner.Expressions()).
func FoundryProjectionOrder ¶
func FoundryProjectionOrder[S any](order ProjectionOrder[S], seal sqlowner.ExpressionSeal) ormcore.Order
FoundryProjectionOrder validates before reading an ordering descriptor. Example: FoundryProjectionOrder(order,sqlowner.Expressions()).
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: FoundryRowValue(e,sqlowner.Expressions()).
func FoundryScopeData ¶
FoundryScopeData exposes sealed metadata to rows. Example: FoundryScopeData(scope,sqlowner.Expressions()).
func FoundrySelected ¶
func FoundrySelected[S, V any](e Selected[S, V], seal sqlowner.ExpressionSeal) ormcore.Expression
FoundrySelected exposes sealed selected metadata to rows. Example: FoundrySelected(e,sqlowner.Expressions()).
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: FoundrySelectedColumn(e,sqlowner.Expressions()).
func OrderBy ¶
OrderBy applies computed row ordering to an unaliased model query. Example: expr.OrderBy(Users.Query(),expr.Add(age,age).Asc()).
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: Users.OrdersCount.Using(expr.Related(UserRelations.Orders,expr.Count[Order]())).
func RelationFilter ¶
RelationFilter adapts expression predicates for a relation's typed target. Example: orders.Where(expr.RelationFilter(orders,expr.GreaterColumn(orm.NumberExpr(Orders.Total), Orders.Paid))).
func RelationOrder ¶
RelationOrder adapts a computed row order to a relation's actual target. Example: r.OrderBy(expr.RelationOrder(r,expr.Negate(expr.Value(orm.NumberExpr(Users.Age))).Asc())).
func RelationPivotOrder ¶
RelationPivotOrder adapts a computed row order to the relation's actual pivot. Example: r.OrderByPivot(expr.RelationPivotOrder(r,expr.Lower(expr.Value(orm.TextExpr(Links.Note))).Asc())).
Types ¶
type Aggregate ¶
type Aggregate[S, V any] struct { // contains filtered or unexported fields }
Aggregate is an unordered selected aggregate. Example: expr.Exists[User]().
func Exists ¶
Exists reports whether any input row exists; empty input is false. Example: expr.Exists[User]().
func (Aggregate[S, V]) Asc ¶
func (a Aggregate[S, V]) Asc() SelectedOrder[S]
Asc orders selected aggregate results. Example: aggregate.Asc().
func (Aggregate[S, V]) Desc ¶
func (a Aggregate[S, V]) Desc() SelectedOrder[S]
Desc orders selected aggregate results. Example: aggregate.Desc().
func (Aggregate[S, V]) Eq ¶
func (a Aggregate[S, V]) Eq(v V) HavingPredicate[S]
Eq compares groups after selection. Example: expression.Eq(value).
func (Aggregate[S, V]) Filter ¶
Filter appends same-scope row predicates joined by AND, for this aggregate only. Example: aggregate.Filter(expr.Value(orm.NumberExpr(Orders.Total)).Eq(1)).
func (Aggregate[S, V]) In ¶
func (a Aggregate[S, V]) In(vs ...V) HavingPredicate[S]
In compares groups after selection. Example: expression.In(value).
func (Aggregate[S, V]) Ne ¶
func (a Aggregate[S, V]) Ne(v V) HavingPredicate[S]
Ne compares groups after selection. Example: expression.Ne(value).
func (Aggregate[S, V]) Param ¶
func (a Aggregate[S, V]) Param(v V) RowExpression[S, V]
Param retains the aggregate result type. Example: aggregate.Param(value).
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: func use[S,V any](a expr.AggregateExpression[S,V]).
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(age.Gt(18),name).Else(fallback).
func When ¶
When starts row CASE with a same-owner row condition and result. Example: expr.When(age.Gt(18),name).
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 DateUnit ¶
type DateUnit uint8
DateUnit identifies a calendar boundary. Clock units cannot be supplied to TruncateDate without an explicit invalid conversion.
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] struct { // contains filtered or unexported fields }
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(rows.Scope(members),orm.TextExpr(Members.Name)).
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,Orders.ID).
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,Orders.Note).
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(orm.NumberExpr(Orders.TotalCents)).
func (Expression[S, V, P]) Asc ¶
func (e Expression[S, V, P]) Asc() Order[S]
Asc orders a scoped value ascending. Example: orderID.Asc().
func (Expression[S, V, P]) Desc ¶
func (e Expression[S, V, P]) Desc() Order[S]
Desc orders a scoped value descending. Example: orderID.Desc().
func (Expression[S, V, P]) Eq ¶
func (e Expression[S, V, P]) Eq(v V) Predicate[S]
Eq compares a scoped value. Example: memberTenant.Eq(7).
func (Expression[S, V, P]) IsNotNull ¶
func (e Expression[S, V, P]) IsNotNull() Predicate[S]
IsNotNull tests SQL presence on a nullable expression.
func (Expression[S, V, P]) IsNull ¶
func (e Expression[S, V, P]) IsNull() Predicate[S]
IsNull tests SQL nullness on a nullable expression.
func (Expression[S, V, P]) Ne ¶
func (e Expression[S, V, P]) Ne(v V) Predicate[S]
Ne excludes a scoped value. Example: memberName.Ne("").
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(2).
func Preceding ¶
func Preceding(count int64) FrameOffset
Preceding counts nonnegative rows/groups before the current row. Example: expr.Preceding(2).
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: w.RangeBetween(expr.CurrentRow(),expr.CurrentRow()).
func UnboundedFollowing ¶
func UnboundedFollowing() FramePosition
UnboundedFollowing identifies the partition's last row. Example: w.RowsBetween(expr.CurrentRow(),expr.UnboundedFollowing()).
func UnboundedPreceding ¶
func UnboundedPreceding() FramePosition
UnboundedPreceding identifies the partition's first row. Example: w.RowsBetween(expr.UnboundedPreceding(),expr.CurrentRow()).
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.
func NewGeographicPoint ¶
func NewGeographicPoint(latitude, longitude float64) (GeographicPoint, error)
NewGeographicPoint validates latitude and longitude in degrees. Example: NewGeographicPoint(3.14, 101.69).
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] struct { // contains filtered or unexported fields }
HavingPredicate is a group condition and cannot enter row WHERE. Example: expr.Count[User]().Gt(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 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.WhenValue(expr.Grouped(age.Gt(18)),count.Value()).
func HavingAnd ¶
func HavingAnd[S any](predicates ...HavingPredicate[S]) HavingPredicate[S]
HavingAnd joins group predicates with AND; empty is TRUE. Example: expr.HavingAnd(count.Gt(0),sum.IsNotNull()).
func HavingOr ¶
func HavingOr[S any](predicates ...HavingPredicate[S]) HavingPredicate[S]
HavingOr joins group predicates with OR; empty is FALSE. Example: expr.HavingOr(count.Gt(0),sum.IsNull()).
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 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 (HavingPredicate[S]) Not ¶
func (p HavingPredicate[S]) Not() HavingPredicate[S]
Not negates a group predicate. Example: count.Gt(0).Not().
type JSONField ¶
type JSONField[P, V any] struct { // contains filtered or unexported fields }
JSONField binds a payload field to its JSON tag. Example: 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: JSONProperty(JSONRoot(Value(Documents.Settings)), Theme).
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(fixed, Elements, 1).
func JSONDocument ¶
JSONDocument unwraps a nested JSON value's payload without changing its SQL node. Example: expr.JSONDocument(nested).
func JSONIndex ¶
JSONIndex selects a typed slice element. Negative int32 indices count from the end. Example: expr.JSONIndex(scores, -1).
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(labels, "language").
func JSONNullable ¶
JSONNullable unwraps payload nullability; JSON/Kind still distinguish JSON null. Example: expr.JSONNullable(state).
func JSONNullableRoot ¶
JSONNullableRoot preserves a SQL-null document ancestor. Example: expr.JSONNullableRoot(Value(Documents.Backup)).
func JSONOptional ¶
JSONOptional unwraps property presence into path presence; no SQL cast is added. Example: expr.JSONOptional(JSONProperty(root, Theme)).
func JSONPointer ¶
JSONPointer unwraps a pointer payload for typed traversal or scalar extraction. Example: expr.JSONPointer(next).
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(root, Theme).
type LocalResolution ¶
type LocalResolution uint8
LocalResolution explicitly selects PostgreSQL's DST gap/overlap policy.
const PostgresStandardTime LocalResolution = LocalResolution(querycore.PostgresStandardTime)
type NullableOrderedAggregate ¶
type NullableOrderedAggregate[S any, V orderedScalar] struct { // contains filtered or unexported fields }
NullableOrderedAggregate retains a nullable aggregate with present-value comparisons. Example: expr.Sum(orm.NumberExpr(Orders.Total)).Gt(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(Records.Amount).
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,Records.Amount).
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(Records.Amount).
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,Records.Amount).
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(rows.At(scope, Report.Amount)).
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(rows.At(scope, Report.Amount)).
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(Records.Amount).
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,Records.Amount).
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(rows.At(scope, Report.Amount)).
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(rows.At(scope, Report.Amount)).
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(rows.At(scope, Report.Amount)).
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(rows.At(scope, Report.Amount)).
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(Records.Amount).
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,Records.Amount).
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(rows.At(scope, Report.Amount)).
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(rows.At(scope, Report.Amount)).
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(Records.Amount).
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,Records.Amount).
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(rows.At(scope, Report.Amount)).
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(rows.At(scope, Report.Amount)).
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(orm.NumberExpr(Records.Amount)).
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,Records.Amount).
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(Records.Amount).
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,Records.Amount).
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(rows.At(scope, Report.Amount)).
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(rows.At(scope, Report.Amount)).
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(Records.Amount).
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,Records.Amount).
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(rows.At(scope, Report.Amount)).
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(rows.At(scope, Report.Amount)).
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(rows.At(scope, Report.Amount)).
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(rows.At(scope, Report.Amount)).
func (NullableOrderedAggregate[S, V]) Asc ¶
func (a NullableOrderedAggregate[S, V]) Asc() SelectedOrder[S]
Asc orders selected aggregate results. Example: aggregate.Asc().
func (NullableOrderedAggregate[S, V]) Desc ¶
func (a NullableOrderedAggregate[S, V]) Desc() SelectedOrder[S]
Desc orders selected aggregate results. Example: aggregate.Desc().
func (NullableOrderedAggregate[S, V]) Eq ¶
func (a NullableOrderedAggregate[S, V]) Eq(v V) HavingPredicate[S]
Eq compares groups with present values or SQL nullness. Example: aggregate.Eq(value).
func (NullableOrderedAggregate[S, V]) Filter ¶
func (a NullableOrderedAggregate[S, V]) Filter(predicates ...Predicate[S]) NullableOrderedAggregate[S, V]
Filter appends same-scope row predicates joined by AND, for this aggregate only. Example: aggregate.Filter(expr.Value(orm.NumberExpr(Orders.Total)).Eq(1)).
func (NullableOrderedAggregate[S, V]) Gt ¶
func (a NullableOrderedAggregate[S, V]) Gt(v V) HavingPredicate[S]
Gt compares groups with present values or SQL nullness. Example: aggregate.Gt(value).
func (NullableOrderedAggregate[S, V]) Gte ¶
func (a NullableOrderedAggregate[S, V]) Gte(v V) HavingPredicate[S]
Gte compares groups with present values or SQL nullness. Example: aggregate.Gte(value).
func (NullableOrderedAggregate[S, V]) In ¶
func (a NullableOrderedAggregate[S, V]) In(vs ...V) HavingPredicate[S]
In compares groups with present values or SQL nullness. Example: aggregate.In(value).
func (NullableOrderedAggregate[S, V]) IsNotNull ¶
func (a NullableOrderedAggregate[S, V]) IsNotNull() HavingPredicate[S]
IsNotNull compares groups with present values or SQL nullness. Example: aggregate.IsNotNull().
func (NullableOrderedAggregate[S, V]) IsNull ¶
func (a NullableOrderedAggregate[S, V]) IsNull() HavingPredicate[S]
IsNull compares groups with present values or SQL nullness. Example: aggregate.IsNull().
func (NullableOrderedAggregate[S, V]) Lt ¶
func (a NullableOrderedAggregate[S, V]) Lt(v V) HavingPredicate[S]
Lt compares groups with present values or SQL nullness. Example: aggregate.Lt(value).
func (NullableOrderedAggregate[S, V]) Lte ¶
func (a NullableOrderedAggregate[S, V]) Lte(v V) HavingPredicate[S]
Lte compares groups with present values or SQL nullness. Example: aggregate.Lte(value).
func (NullableOrderedAggregate[S, V]) Ne ¶
func (a NullableOrderedAggregate[S, V]) Ne(v V) HavingPredicate[S]
Ne compares groups with present values or SQL nullness. Example: aggregate.Ne(value).
func (NullableOrderedAggregate[S, V]) Param ¶
func (a NullableOrderedAggregate[S, V]) Param(v V) RowExpression[S, V]
Param captures a present value for a required fallback without evaluating the aggregate. Example: expr.CoalesceValue(total.Value(),total.Param(decimal.FromInt64(0)).Value()).
type NullableOrderedRowExpression ¶
type NullableOrderedRowExpression[S any, V orderedScalar] struct { // contains filtered or unexported fields }
NullableOrderedRowExpression retains nullable results and present-value comparisons. Example: expr.AddNullable(a,b).Gt(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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
func JSONLength ¶
JSONLength evaluates JSON shape or safe array length in the row phase. Example: expr.JSONLength(Value(Documents.Settings)).
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(Value(Documents.Backup)).
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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(expr.Value(orm.NullableTimeExpr(Users.Birthday))).IsNull().
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
func (NullableOrderedRowExpression[S, V]) Asc ¶
func (e NullableOrderedRowExpression[S, V]) Asc() Order[S]
Asc orders a computed row value. Example: expression.Asc().
func (NullableOrderedRowExpression[S, V]) Desc ¶
func (e NullableOrderedRowExpression[S, V]) Desc() Order[S]
Desc orders a computed row value. Example: expression.Desc().
func (NullableOrderedRowExpression[S, V]) Eq ¶
func (e NullableOrderedRowExpression[S, V]) Eq(v V) Predicate[S]
Eq compares row values before grouping. Example: expression.Eq(value).
func (NullableOrderedRowExpression[S, V]) Gt ¶
func (e NullableOrderedRowExpression[S, V]) Gt(v V) Predicate[S]
Gt compares row values before grouping. Example: expression.Gt(value).
func (NullableOrderedRowExpression[S, V]) Gte ¶
func (e NullableOrderedRowExpression[S, V]) Gte(v V) Predicate[S]
Gte compares row values before grouping. Example: expression.Gte(value).
func (NullableOrderedRowExpression[S, V]) In ¶
func (e NullableOrderedRowExpression[S, V]) In(vs ...V) Predicate[S]
In compares row values before grouping. Example: expression.In(value).
func (NullableOrderedRowExpression[S, V]) IsNotNull ¶
func (e NullableOrderedRowExpression[S, V]) IsNotNull() Predicate[S]
IsNotNull tests SQL nullness. Example: expression.IsNotNull().
func (NullableOrderedRowExpression[S, V]) IsNull ¶
func (e NullableOrderedRowExpression[S, V]) IsNull() Predicate[S]
IsNull tests SQL nullness. Example: expression.IsNull().
func (NullableOrderedRowExpression[S, V]) Lt ¶
func (e NullableOrderedRowExpression[S, V]) Lt(v V) Predicate[S]
Lt compares row values before grouping. Example: expression.Lt(value).
func (NullableOrderedRowExpression[S, V]) Lte ¶
func (e NullableOrderedRowExpression[S, V]) Lte(v V) Predicate[S]
Lte compares row values before grouping. Example: expression.Lte(value).
func (NullableOrderedRowExpression[S, V]) Ne ¶
func (e NullableOrderedRowExpression[S, V]) Ne(v V) Predicate[S]
Ne compares row values before grouping. Example: expression.Ne(value).
func (NullableOrderedRowExpression[S, V]) Param ¶
func (e NullableOrderedRowExpression[S, V]) Param(v value.Nullable[V]) RowExpression[S, value.Nullable[V]]
Param captures the exact result type. Example: expression.Param(value).
type NullableOrderedValueComparison ¶
type NullableOrderedValueComparison[S any, V orderedScalar] struct { // contains filtered or unexported fields }
NullableOrderedValueComparison retains nullable results with present-value comparisons. Example: expr.OrderNullableValue(selected).Gt(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).Gt(0).
func (NullableOrderedValueComparison[S, V]) Eq ¶
func (a NullableOrderedValueComparison[S, V]) Eq(v V) HavingPredicate[S]
Eq compares groups after selection. Example: expression.Eq(value).
func (NullableOrderedValueComparison[S, V]) Gt ¶
func (a NullableOrderedValueComparison[S, V]) Gt(v V) HavingPredicate[S]
Gt compares groups after selection. Example: expression.Gt(value).
func (NullableOrderedValueComparison[S, V]) Gte ¶
func (a NullableOrderedValueComparison[S, V]) Gte(v V) HavingPredicate[S]
Gte compares groups after selection. Example: expression.Gte(value).
func (NullableOrderedValueComparison[S, V]) In ¶
func (a NullableOrderedValueComparison[S, V]) In(vs ...V) HavingPredicate[S]
In compares groups after selection. Example: expression.In(value).
func (NullableOrderedValueComparison[S, V]) IsNotNull ¶
func (a NullableOrderedValueComparison[S, V]) IsNotNull() HavingPredicate[S]
IsNotNull tests a selected SQL value. Example: expression.IsNotNull().
func (NullableOrderedValueComparison[S, V]) IsNull ¶
func (a NullableOrderedValueComparison[S, V]) IsNull() HavingPredicate[S]
IsNull tests a selected SQL value. Example: expression.IsNull().
func (NullableOrderedValueComparison[S, V]) Lt ¶
func (a NullableOrderedValueComparison[S, V]) Lt(v V) HavingPredicate[S]
Lt compares groups after selection. Example: expression.Lt(value).
func (NullableOrderedValueComparison[S, V]) Lte ¶
func (a NullableOrderedValueComparison[S, V]) Lte(v V) HavingPredicate[S]
Lte compares groups after selection. Example: expression.Lte(value).
func (NullableOrderedValueComparison[S, V]) Ne ¶
func (a NullableOrderedValueComparison[S, V]) Ne(v V) HavingPredicate[S]
Ne compares groups after selection. Example: expression.Ne(value).
type NullableRowComparison ¶
type NullableRowComparison[S, V any] struct { // contains filtered or unexported fields }
NullableRowComparison retains present-value equality and SQL null tests. Example: expr.CompareNullableRow(expr.Value(orm.NullableEnumExpr(Users.OptionalState))).Eq(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(expr.Value(orm.NullableEnumExpr(Users.OptionalState))).IsNull().
func (NullableRowComparison[S, V]) Eq ¶
func (e NullableRowComparison[S, V]) Eq(v V) Predicate[S]
Eq compares a present value. Example: comparison.Eq(Active).
func (NullableRowComparison[S, V]) In ¶
func (e NullableRowComparison[S, V]) In(vs ...V) Predicate[S]
In tests present-value membership. Example: comparison.In(Active,Pending).
func (NullableRowComparison[S, V]) IsNotNull ¶
func (e NullableRowComparison[S, V]) IsNotNull() Predicate[S]
IsNotNull tests SQL presence. Example: comparison.IsNotNull().
func (NullableRowComparison[S, V]) IsNull ¶
func (e NullableRowComparison[S, V]) IsNull() Predicate[S]
IsNull tests SQL nullness. Example: comparison.IsNull().
func (NullableRowComparison[S, V]) Ne ¶
func (e NullableRowComparison[S, V]) Ne(v V) Predicate[S]
Ne compares a present value using SQL NULL semantics. Example: comparison.Ne(Active).
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: FoundryNullableScope[S,M](metadata,sqlowner.Expressions()).
type NullableTextRowExpression ¶
type NullableTextRowExpression[S any, V ~string] struct { // contains filtered or unexported fields }
NullableTextRowExpression preserves NULL and compares present text values. Example: LowerNullable(name).Like("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.
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(name, codec.String[string]()).
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.
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.
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.
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.
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.
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(orm.NullableTextExpr(Users.Nickname)).IsNull().
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(memberScope, orm.NullableTextExpr(Members.Nickname)).IsNull().
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.
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.
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.
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.
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.
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.
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.
func (NullableTextRowExpression[S, V]) Asc ¶
func (e NullableTextRowExpression[S, V]) Asc() Order[S]
Asc orders a computed row value. Example: expression.Asc().
func (NullableTextRowExpression[S, V]) Contains ¶
func (e NullableTextRowExpression[S, V]) Contains(v V) Predicate[S]
Contains compares typed text using the database collation. Example: expression.Contains("a").
func (NullableTextRowExpression[S, V]) Desc ¶
func (e NullableTextRowExpression[S, V]) Desc() Order[S]
Desc orders a computed row value. Example: expression.Desc().
func (NullableTextRowExpression[S, V]) EndsWith ¶
func (e NullableTextRowExpression[S, V]) EndsWith(v V) Predicate[S]
EndsWith compares typed text using the database collation. Example: expression.EndsWith("a").
func (NullableTextRowExpression[S, V]) Eq ¶
func (e NullableTextRowExpression[S, V]) Eq(v V) Predicate[S]
Eq compares row values before grouping. Example: expression.Eq(value).
func (NullableTextRowExpression[S, V]) Gt ¶
func (e NullableTextRowExpression[S, V]) Gt(v V) Predicate[S]
Gt compares row values before grouping. Example: expression.Gt(value).
func (NullableTextRowExpression[S, V]) Gte ¶
func (e NullableTextRowExpression[S, V]) Gte(v V) Predicate[S]
Gte compares row values before grouping. Example: expression.Gte(value).
func (NullableTextRowExpression[S, V]) IContains ¶
func (e NullableTextRowExpression[S, V]) IContains(v V) Predicate[S]
IContains compares typed text using the database collation. Example: expression.IContains("a").
func (NullableTextRowExpression[S, V]) IEndsWith ¶
func (e NullableTextRowExpression[S, V]) IEndsWith(v V) Predicate[S]
IEndsWith compares typed text using the database collation. Example: expression.IEndsWith("a").
func (NullableTextRowExpression[S, V]) ILike ¶
func (e NullableTextRowExpression[S, V]) ILike(v V) Predicate[S]
ILike compares typed text using the database collation. Example: expression.ILike("a").
func (NullableTextRowExpression[S, V]) IStartsWith ¶
func (e NullableTextRowExpression[S, V]) IStartsWith(v V) Predicate[S]
IStartsWith compares typed text using the database collation. Example: expression.IStartsWith("a").
func (NullableTextRowExpression[S, V]) In ¶
func (e NullableTextRowExpression[S, V]) In(vs ...V) Predicate[S]
In compares row values before grouping. Example: expression.In(value).
func (NullableTextRowExpression[S, V]) IsNotNull ¶
func (e NullableTextRowExpression[S, V]) IsNotNull() Predicate[S]
IsNotNull tests SQL nullness. Example: expression.IsNotNull().
func (NullableTextRowExpression[S, V]) IsNull ¶
func (e NullableTextRowExpression[S, V]) IsNull() Predicate[S]
IsNull tests SQL nullness. Example: expression.IsNull().
func (NullableTextRowExpression[S, V]) Like ¶
func (e NullableTextRowExpression[S, V]) Like(v V) Predicate[S]
Like compares typed text using the database collation. Example: expression.Like("a").
func (NullableTextRowExpression[S, V]) Lt ¶
func (e NullableTextRowExpression[S, V]) Lt(v V) Predicate[S]
Lt compares row values before grouping. Example: expression.Lt(value).
func (NullableTextRowExpression[S, V]) Lte ¶
func (e NullableTextRowExpression[S, V]) Lte(v V) Predicate[S]
Lte compares row values before grouping. Example: expression.Lte(value).
func (NullableTextRowExpression[S, V]) Ne ¶
func (e NullableTextRowExpression[S, V]) Ne(v V) Predicate[S]
Ne compares row values before grouping. Example: expression.Ne(value).
func (NullableTextRowExpression[S, V]) Param ¶
func (e NullableTextRowExpression[S, V]) Param(v value.Nullable[V]) RowExpression[S, value.Nullable[V]]
Param captures the exact result type. Example: expression.Param(value).
func (NullableTextRowExpression[S, V]) StartsWith ¶
func (e NullableTextRowExpression[S, V]) StartsWith(v V) Predicate[S]
StartsWith compares typed text using the database collation. Example: expression.StartsWith("a").
type NullableTextValueComparison ¶
type NullableTextValueComparison[S any, V ~string] struct { // contains filtered or unexported fields }
NullableTextValueComparison retains NULL and compares present text in HAVING.
func TextNullableValue ¶
func TextNullableValue[S any, V ~string](v Selected[S, value.Nullable[V]]) NullableTextValueComparison[S, V]
TextNullableValue exposes nullable selected text comparisons. Example: TextNullableValue(Min(name).Value()).IsNull().
func (NullableTextValueComparison[S, V]) Contains ¶
func (e NullableTextValueComparison[S, V]) Contains(v V) HavingPredicate[S]
Contains compares selected text using the database collation. Example: comparison.Contains("a").
func (NullableTextValueComparison[S, V]) EndsWith ¶
func (e NullableTextValueComparison[S, V]) EndsWith(v V) HavingPredicate[S]
EndsWith compares selected text using the database collation. Example: comparison.EndsWith("a").
func (NullableTextValueComparison[S, V]) Eq ¶
func (a NullableTextValueComparison[S, V]) Eq(v V) HavingPredicate[S]
Eq compares selected text without changing its phase. Example: comparison.Eq(value).
func (NullableTextValueComparison[S, V]) Gt ¶
func (a NullableTextValueComparison[S, V]) Gt(v V) HavingPredicate[S]
Gt compares selected text without changing its phase. Example: comparison.Gt(value).
func (NullableTextValueComparison[S, V]) Gte ¶
func (a NullableTextValueComparison[S, V]) Gte(v V) HavingPredicate[S]
Gte compares selected text without changing its phase. Example: comparison.Gte(value).
func (NullableTextValueComparison[S, V]) IContains ¶
func (e NullableTextValueComparison[S, V]) IContains(v V) HavingPredicate[S]
IContains compares selected text using the database collation. Example: comparison.IContains("a").
func (NullableTextValueComparison[S, V]) IEndsWith ¶
func (e NullableTextValueComparison[S, V]) IEndsWith(v V) HavingPredicate[S]
IEndsWith compares selected text using the database collation. Example: comparison.IEndsWith("a").
func (NullableTextValueComparison[S, V]) ILike ¶
func (e NullableTextValueComparison[S, V]) ILike(v V) HavingPredicate[S]
ILike compares selected text using the database collation. Example: comparison.ILike("a").
func (NullableTextValueComparison[S, V]) IStartsWith ¶
func (e NullableTextValueComparison[S, V]) IStartsWith(v V) HavingPredicate[S]
IStartsWith compares selected text using the database collation. Example: comparison.IStartsWith("a").
func (NullableTextValueComparison[S, V]) In ¶
func (a NullableTextValueComparison[S, V]) In(vs ...V) HavingPredicate[S]
In compares selected text without changing its phase. Example: comparison.In(value).
func (NullableTextValueComparison[S, V]) IsNotNull ¶
func (a NullableTextValueComparison[S, V]) IsNotNull() HavingPredicate[S]
IsNotNull compares selected text without changing its phase. Example: comparison.IsNotNull(value).
func (NullableTextValueComparison[S, V]) IsNull ¶
func (a NullableTextValueComparison[S, V]) IsNull() HavingPredicate[S]
IsNull compares selected text without changing its phase. Example: comparison.IsNull(value).
func (NullableTextValueComparison[S, V]) Like ¶
func (e NullableTextValueComparison[S, V]) Like(v V) HavingPredicate[S]
Like compares selected text using the database collation. Example: comparison.Like("a").
func (NullableTextValueComparison[S, V]) Lt ¶
func (a NullableTextValueComparison[S, V]) Lt(v V) HavingPredicate[S]
Lt compares selected text without changing its phase. Example: comparison.Lt(value).
func (NullableTextValueComparison[S, V]) Lte ¶
func (a NullableTextValueComparison[S, V]) Lte(v V) HavingPredicate[S]
Lte compares selected text without changing its phase. Example: comparison.Lte(value).
func (NullableTextValueComparison[S, V]) Ne ¶
func (a NullableTextValueComparison[S, V]) Ne(v V) HavingPredicate[S]
Ne compares selected text without changing its phase. Example: comparison.Ne(value).
func (NullableTextValueComparison[S, V]) StartsWith ¶
func (e NullableTextValueComparison[S, V]) StartsWith(v V) HavingPredicate[S]
StartsWith compares selected text using the database collation. Example: comparison.StartsWith("a").
type Order ¶
type Order[S any] struct { // contains filtered or unexported fields }
Order keeps source ownership on ordering. Example: id.Asc().
func (Order[S]) NullsFirst ¶
NullsFirst explicitly sorts SQL NULL before values. Example: name.Asc().NullsFirst().
type OrderedAggregate ¶
type OrderedAggregate[S any, V orderedScalar] struct { // contains filtered or unexported fields }
OrderedAggregate is an ordered selected aggregate. Example: expr.Count[User]().Gt(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(orm.NumberExpr(Records.Amount)).
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,Records.Amount).
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(rows.At(scope, Report.Amount)).
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(Records.Amount).
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,Records.Amount).
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(rows.At(scope, Report.Amount)).
func (OrderedAggregate[S, V]) Asc ¶
func (a OrderedAggregate[S, V]) Asc() SelectedOrder[S]
Asc orders selected aggregate results. Example: aggregate.Asc().
func (OrderedAggregate[S, V]) Desc ¶
func (a OrderedAggregate[S, V]) Desc() SelectedOrder[S]
Desc orders selected aggregate results. Example: aggregate.Desc().
func (OrderedAggregate[S, V]) Eq ¶
func (a OrderedAggregate[S, V]) Eq(v V) HavingPredicate[S]
Eq compares groups after selection. Example: expression.Eq(value).
func (OrderedAggregate[S, V]) Filter ¶
func (a OrderedAggregate[S, V]) Filter(predicates ...Predicate[S]) OrderedAggregate[S, V]
Filter appends same-scope row predicates joined by AND, for this aggregate only. Example: aggregate.Filter(expr.Value(orm.NumberExpr(Orders.Total)).Eq(1)).
func (OrderedAggregate[S, V]) Gt ¶
func (a OrderedAggregate[S, V]) Gt(v V) HavingPredicate[S]
Gt compares groups after selection. Example: expression.Gt(value).
func (OrderedAggregate[S, V]) Gte ¶
func (a OrderedAggregate[S, V]) Gte(v V) HavingPredicate[S]
Gte compares groups after selection. Example: expression.Gte(value).
func (OrderedAggregate[S, V]) In ¶
func (a OrderedAggregate[S, V]) In(vs ...V) HavingPredicate[S]
In compares groups after selection. Example: expression.In(value).
func (OrderedAggregate[S, V]) Lt ¶
func (a OrderedAggregate[S, V]) Lt(v V) HavingPredicate[S]
Lt compares groups after selection. Example: expression.Lt(value).
func (OrderedAggregate[S, V]) Lte ¶
func (a OrderedAggregate[S, V]) Lte(v V) HavingPredicate[S]
Lte compares groups after selection. Example: expression.Lte(value).
func (OrderedAggregate[S, V]) Ne ¶
func (a OrderedAggregate[S, V]) Ne(v V) HavingPredicate[S]
Ne compares groups after selection. Example: expression.Ne(value).
func (OrderedAggregate[S, V]) Param ¶
func (a OrderedAggregate[S, V]) Param(v V) RowExpression[S, V]
Param retains the aggregate result type. Example: aggregate.Param(value).
func (OrderedAggregate[S, V]) Value ¶
func (a OrderedAggregate[S, V]) Value() Selected[S, V]
Value retains the aggregate result type. Example: aggregate.Value().
type OrderedRowExpression ¶
type OrderedRowExpression[S any, V orderedScalar] struct { // contains filtered or unexported fields }
OrderedRowExpression is an ordered computed row value. Example: expr.Add(a,b).Gt(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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
func DateOf ¶
func DateOf[S any](input RowValue[S, temporal.LocalDateTime]) OrderedRowExpression[S, temporal.Date]
DateOf selects the calendar date from local wall components.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
func IntervalDays ¶
IntervalDays returns the signed calendar-day component.
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.
func IntervalMonths ¶
IntervalMonths returns the complete signed month component, including whole years.
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.
func Length ¶
func Length[S any, V ~string](input RowValue[S, V]) OrderedRowExpression[S, int64]
Length counts Unicode characters rather than encoded bytes.
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.
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.
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.
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.
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.
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.
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.
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.
func OctetLength ¶
func OctetLength[S any, V ~string](input RowValue[S, V]) OrderedRowExpression[S, int64]
OctetLength counts encoded bytes.
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(expr.Value(orm.NumberExpr(Users.Age))).Gt(18).
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
func Year ¶
func Year[S any, V calendarValue](input RowValue[S, V]) OrderedRowExpression[S, int64]
Year extracts year from a typed row value. Calendar and clock components require a date/local value; use LocalAt for an instant's zone.
func (OrderedRowExpression[S, V]) Asc ¶
func (e OrderedRowExpression[S, V]) Asc() Order[S]
Asc orders a computed row value. Example: expression.Asc().
func (OrderedRowExpression[S, V]) Desc ¶
func (e OrderedRowExpression[S, V]) Desc() Order[S]
Desc orders a computed row value. Example: expression.Desc().
func (OrderedRowExpression[S, V]) Eq ¶
func (e OrderedRowExpression[S, V]) Eq(v V) Predicate[S]
Eq compares row values before grouping. Example: expression.Eq(value).
func (OrderedRowExpression[S, V]) Gt ¶
func (e OrderedRowExpression[S, V]) Gt(v V) Predicate[S]
Gt compares row values before grouping. Example: expression.Gt(value).
func (OrderedRowExpression[S, V]) Gte ¶
func (e OrderedRowExpression[S, V]) Gte(v V) Predicate[S]
Gte compares row values before grouping. Example: expression.Gte(value).
func (OrderedRowExpression[S, V]) In ¶
func (e OrderedRowExpression[S, V]) In(vs ...V) Predicate[S]
In compares row values before grouping. Example: expression.In(value).
func (OrderedRowExpression[S, V]) IsNotNull ¶
func (e OrderedRowExpression[S, V]) IsNotNull() Predicate[S]
IsNotNull tests SQL nullness. Example: expression.IsNotNull().
func (OrderedRowExpression[S, V]) IsNull ¶
func (e OrderedRowExpression[S, V]) IsNull() Predicate[S]
IsNull tests SQL nullness. Example: expression.IsNull().
func (OrderedRowExpression[S, V]) Lt ¶
func (e OrderedRowExpression[S, V]) Lt(v V) Predicate[S]
Lt compares row values before grouping. Example: expression.Lt(value).
func (OrderedRowExpression[S, V]) Lte ¶
func (e OrderedRowExpression[S, V]) Lte(v V) Predicate[S]
Lte compares row values before grouping. Example: expression.Lte(value).
func (OrderedRowExpression[S, V]) Ne ¶
func (e OrderedRowExpression[S, V]) Ne(v V) Predicate[S]
Ne compares row values before grouping. Example: expression.Ne(value).
func (OrderedRowExpression[S, V]) Param ¶
func (e OrderedRowExpression[S, V]) Param(v V) RowExpression[S, V]
Param captures the exact result type. Example: expression.Param(value).
func (OrderedRowExpression[S, V]) Value ¶
func (e OrderedRowExpression[S, V]) Value() Selected[S, V]
Value selects the computed value. Example: expression.Value().
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).
type OrderedValueComparison ¶
type OrderedValueComparison[S any, V orderedScalar] struct { // contains filtered or unexported fields }
OrderedValueComparison compares ordered selected values. Example: expr.OrderValue(selected).Gt(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(expr.Count[User]().Value()).Gt(0).
func (OrderedValueComparison[S, V]) Eq ¶
func (a OrderedValueComparison[S, V]) Eq(v V) HavingPredicate[S]
Eq compares groups after selection. Example: expression.Eq(value).
func (OrderedValueComparison[S, V]) Gt ¶
func (a OrderedValueComparison[S, V]) Gt(v V) HavingPredicate[S]
Gt compares groups after selection. Example: expression.Gt(value).
func (OrderedValueComparison[S, V]) Gte ¶
func (a OrderedValueComparison[S, V]) Gte(v V) HavingPredicate[S]
Gte compares groups after selection. Example: expression.Gte(value).
func (OrderedValueComparison[S, V]) In ¶
func (a OrderedValueComparison[S, V]) In(vs ...V) HavingPredicate[S]
In compares groups after selection. Example: expression.In(value).
func (OrderedValueComparison[S, V]) IsNotNull ¶
func (a OrderedValueComparison[S, V]) IsNotNull() HavingPredicate[S]
IsNotNull tests a selected SQL value. Example: expression.IsNotNull().
func (OrderedValueComparison[S, V]) IsNull ¶
func (a OrderedValueComparison[S, V]) IsNull() HavingPredicate[S]
IsNull tests a selected SQL value. Example: expression.IsNull().
func (OrderedValueComparison[S, V]) Lt ¶
func (a OrderedValueComparison[S, V]) Lt(v V) HavingPredicate[S]
Lt compares groups after selection. Example: expression.Lt(value).
func (OrderedValueComparison[S, V]) Lte ¶
func (a OrderedValueComparison[S, V]) Lte(v V) HavingPredicate[S]
Lte compares groups after selection. Example: expression.Lte(value).
func (OrderedValueComparison[S, V]) Ne ¶
func (a OrderedValueComparison[S, V]) Ne(v V) HavingPredicate[S]
Ne compares groups after selection. Example: expression.Ne(value).
type Predicate ¶
type Predicate[S any] struct { // contains filtered or unexported fields }
Predicate keeps source ownership on a SQL condition. Example: tenant.Eq(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: FoundryPredicateValue[S](core,sqlowner.Expressions()).
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(orm.NumberExpr(Orders.TotalCents), orm.NumberExpr(Orders.TotalCents)).
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 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(UserRelations.Orders,expr.OrderRow(expr.Value(orm.NumberExpr(Orders.Total))).Gt(0)).
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 ModelPredicate ¶
ModelPredicate adapts a model condition without discarding its declaration owner. Example: expr.ModelPredicate(orm.EnumEq(Users.State, Active)).
func Not ¶
Not negates a row condition while preserving SQL NULL semantics. Example: expr.Not(rows.InQuery(id,inner)).
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 Or ¶
Or combines row conditions without admitting HAVING predicates. Example: expr.Or(expr.Not(note.Eq("x")),note.IsNull()).
func UUIDGreater ¶
UUIDGreater retains expression scope and UUID ownership. Example: expr.UUIDGreater(expr.At(scope, orm.KeyExpr(Files.Key())),after).
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(expr.Value(orm.NullableColumnExpr(Files.ParentID)),after).
func UUIDGreaterOrEqual ¶
UUIDGreaterOrEqual retains expression scope and UUID ownership. Example: expr.UUIDGreaterOrEqual(expr.At(scope, orm.KeyExpr(Files.Key())),after).
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(expr.Value(orm.NullableColumnExpr(Files.ParentID)),after).
func UUIDLess ¶
UUIDLess retains expression scope and UUID ownership. Example: expr.UUIDLess(expr.At(scope, orm.KeyExpr(Files.Key())),after).
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(expr.Value(orm.NullableColumnExpr(Files.ParentID)),after).
func UUIDLessOrEqual ¶
UUIDLessOrEqual retains expression scope and UUID ownership. Example: expr.UUIDLessOrEqual(expr.At(scope, orm.KeyExpr(Files.Key())),after).
func UUIDLessOrEqualNullable ¶
func UUIDLessOrEqualNullable[S, T any](input RowValue[S, value.Nullable[model.ID[T]]], v model.ID[T]) Predicate[S]
UUIDLessOrEqualNullable compares a present UUID, leaving SQL NULL unmatched. Example: expr.UUIDLessOrEqualNullable(expr.Value(orm.NullableColumnExpr(Files.ParentID)),after).
type ProjectionKey ¶
type ProjectionKey[S any] struct { // contains filtered or unexported fields }
ProjectionKey is a selected-phase key; it cannot enter GROUP BY. Example: expr.Count[User]().Value().Key().
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,count.Desc()).
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.Row(amount).Value()).
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,expr.Row(optional).Value()).
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,expr.Row(birthday).Value()).
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,expr.Row(amount).Value()).
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,expr.Row(created).Value()).
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] struct { // contains filtered or unexported fields }
RowComparison exposes only equality and membership, including for enums. Example: expr.CompareRow(expr.Value(orm.EnumExpr(Users.State))).In(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(expr.Value(orm.EnumExpr(Users.State))).Eq(Active).
func (RowComparison[S, V]) Eq ¶
func (e RowComparison[S, V]) Eq(v V) Predicate[S]
Eq compares a present value. Example: comparison.Eq(Active).
func (RowComparison[S, V]) In ¶
func (e RowComparison[S, V]) In(vs ...V) Predicate[S]
In tests membership in present values. Example: comparison.In(Active,Pending).
func (RowComparison[S, V]) Ne ¶
func (e RowComparison[S, V]) Ne(v V) Predicate[S]
Ne compares a present value using SQL NULL semantics. Example: comparison.Ne(Active).
func (RowComparison[S, V]) Value ¶
func (e RowComparison[S, V]) Value() Selected[S, V]
Value selects the computed value. Example: expression.Value().
type RowExpression ¶
type RowExpression[S, V any] struct { // contains filtered or unexported fields }
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(expr.Value(orm.NullableTextExpr(Users.Nickname)),expr.Value(orm.TextExpr(Users.Name))).
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(expr.Value(orm.NullableTextExpr(Users.Nickname)),expr.NullableRow(expr.Value(orm.TextExpr(Users.Name))).Param(value.Null[string]())).
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](codec.Bool[bool](), true).
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: FoundryRowExpression[S](core,column,sqlowner.Expressions()).
func JSONContainedBy ¶
JSONContainedBy evaluates JSON containment between identical payloads in the row phase. Example: expr.JSONContainedBy(Value(Documents.Settings), Value(Documents.Settings)).
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(Value(Documents.Backup), Value(Documents.Backup)).
func JSONContains ¶
JSONContains evaluates JSON containment between identical payloads in the row phase. Example: expr.JSONContains(Value(Documents.Settings), Value(Documents.Settings)).
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(Value(Documents.Backup), Value(Documents.Backup)).
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(flag, codec.Bool[bool]()).
func JSONType ¶
JSONType evaluates JSON shape or safe array length in the row phase. Example: expr.JSONType(Value(Documents.Settings)).
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(Value(Documents.Backup)).
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(expr.Value(orm.TextExpr(Users.Name)),expr.Param(orm.TextExpr(Users.Name), "")).
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(expr.Value(orm.NullableTextExpr(Users.Nickname)),expr.NullableRow(expr.Value(orm.TextExpr(Users.Name))).Param(value.Null[string]())).
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(expr.Value(orm.NumberExpr(Users.Age))).
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(orm.NullableTextExpr(Users.Nickname), "Ada").
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: count := expr.RelatedValue(UserRelations.Orders,expr.Count[Order]()).
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(expr.At(scope, orm.NumberExpr(Users.Age))).Param(18).
func (RowExpression[S, V]) Asc ¶
func (e RowExpression[S, V]) Asc() Order[S]
Asc orders a computed row value. Example: expression.Asc().
func (RowExpression[S, V]) Desc ¶
func (e RowExpression[S, V]) Desc() Order[S]
Desc orders a computed row value. Example: expression.Desc().
func (RowExpression[S, V]) Eq ¶
func (e RowExpression[S, V]) Eq(v V) Predicate[S]
Eq compares row values before grouping. Example: expression.Eq(value).
func (RowExpression[S, V]) In ¶
func (e RowExpression[S, V]) In(vs ...V) Predicate[S]
In compares row values before grouping. Example: expression.In(value).
func (RowExpression[S, V]) IsNotNull ¶
func (e RowExpression[S, V]) IsNotNull() Predicate[S]
IsNotNull tests SQL nullness. Example: expression.IsNotNull().
func (RowExpression[S, V]) IsNull ¶
func (e RowExpression[S, V]) IsNull() Predicate[S]
IsNull tests SQL nullness. Example: expression.IsNull().
func (RowExpression[S, V]) Ne ¶
func (e RowExpression[S, V]) Ne(v V) Predicate[S]
Ne compares row values before grouping. Example: expression.Ne(value).
func (RowExpression[S, V]) Param ¶
func (e RowExpression[S, V]) Param(v V) RowExpression[S, V]
Param captures this row expression's exact value type. Example: expr.Add(a,b).Param(2).
func (RowExpression[S, V]) Value ¶
func (e RowExpression[S, V]) Value() Selected[S, V]
Value promotes a computed row value to the selected phase. Example: expr.Add(a,b).Value().
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: FoundryScope[S,M](metadata,sqlowner.Expressions()).
type Selected ¶
type Selected[S, V any] struct { // contains filtered or unexported fields }
Selected is a selected-phase value; it cannot become a row predicate. Example: expr.Count[User]().Value().
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.
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.
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.
func AddDateDaysValue ¶
func AddDateDaysValue[S any](input Selected[S, temporal.Date], days int32) Selected[S, temporal.Date]
AddDateDaysValue retains the selected aggregate/window phase.
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.
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.
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.
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.
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.
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.
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.
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.
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 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.
func CenturyValue ¶
CenturyValue retains the selected aggregate/window phase.
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.
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.
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(expr.Nullable(expr.Count[User]().Value())).
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(expr.Nullable(expr.Count[User]().Value()),expr.Count[User]().Param(0).Value()).
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.
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.
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.
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.
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.
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.
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.
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.
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.
func DateOfValue ¶
DateOfValue retains the selected aggregate/window phase.
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.
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.
func DayOfWeekValue ¶
DayOfWeekValue retains the selected aggregate/window phase.
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.
func DayOfYearValue ¶
DayOfYearValue retains the selected aggregate/window phase.
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.
func DecadeValue ¶
DecadeValue retains the selected aggregate/window phase.
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(expr.Row(optional).Value(),w).
func FirstValue ¶
FirstValue returns a frame value, or NULL when absent. Example: expr.FirstValue(expr.Row(amount).Value(),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: FoundrySelectedValue[S](core,column,sqlowner.Expressions()).
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.
func FromUnixMillisValue ¶
func FromUnixMillisValue[S any, V integerNumber](input Selected[S, V]) Selected[S, temporal.DateTime]
FromUnixMillisValue retains the selected aggregate/window phase.
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.
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.
func ISODayOfWeekValue ¶
ISODayOfWeekValue retains the selected aggregate/window phase.
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.
func ISOWeekValue ¶
ISOWeekValue retains the selected aggregate/window phase.
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.
func ISOYearValue ¶
ISOYearValue retains the selected aggregate/window phase.
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.
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.
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.
func IntervalDaysValue ¶
IntervalDaysValue retains selected aggregate/window phases and input ownership.
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.
func IntervalElapsedValue ¶
IntervalElapsedValue retains selected aggregate/window phases and input ownership.
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.
func IntervalMonthsValue ¶
IntervalMonthsValue retains selected aggregate/window phases and input ownership.
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(Row(Value(Documents.Backup)).Value(), Row(Value(Documents.Backup)).Value()).
func JSONContainedByValue ¶
JSONContainedByValue preserves selected phase, including aggregates and windows. Example: expr.JSONContainedByValue(Row(Value(Documents.Settings)).Value(), Row(Value(Documents.Settings)).Value()).
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(Row(Value(Documents.Backup)).Value(), Row(Value(Documents.Backup)).Value()).
func JSONContainsValue ¶
JSONContainsValue preserves selected phase, including aggregates and windows. Example: expr.JSONContainsValue(Row(Value(Documents.Settings)).Value(), Row(Value(Documents.Settings)).Value()).
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(Row(Value(Documents.Backup)).Value()).
func JSONLengthValue ¶
JSONLengthValue preserves selected phase, including aggregates and windows. Example: expr.JSONLengthValue(Row(Value(Documents.Settings)).Value()).
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(Row(Value(Documents.Backup)).Value()).
func JSONTypeValue ¶
JSONTypeValue preserves selected phase, including aggregates and windows. Example: expr.JSONTypeValue(Row(Value(Documents.Settings)).Value()).
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.
func JulianDayValue ¶
JulianDayValue retains the selected aggregate/window phase.
func Lag ¶
Lag returns the offset value or NULL when absent; negative offsets reverse direction. Example: expr.Lag(expr.Row(amount).Value(),1,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(expr.Row(optional).Value(),1,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(expr.Row(amount).Value(),1,int64(0),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(expr.Row(optional).Value(),w).
func LastValue ¶
LastValue returns a frame value, or NULL when absent. Example: expr.LastValue(expr.Row(amount).Value(),w).
func Lead ¶
Lead returns the offset value or NULL when absent; negative offsets reverse direction. Example: expr.Lead(expr.Row(amount).Value(),1,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(expr.Row(optional).Value(),1,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(expr.Row(amount).Value(),1,int64(0),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.
func LengthValue ¶
LengthValue applies Length to selected expressions, including aggregates/windows.
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.
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.
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.
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.
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.
func LowerValue ¶
LowerValue applies Lower to selected expressions, including aggregates/windows.
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.
func MicrosecondsValue ¶
MicrosecondsValue retains the selected aggregate/window phase.
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.
func MillenniumValue ¶
MillenniumValue retains the selected aggregate/window phase.
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.
func MillisecondsValue ¶
MillisecondsValue retains the selected aggregate/window phase.
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.
func MinuteValue ¶
MinuteValue retains the selected aggregate/window phase.
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.
func MonthValue ¶
MonthValue retains the selected aggregate/window phase.
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.
func NegateIntervalValue ¶
func NegateIntervalValue[S any](input Selected[S, temporal.Interval]) Selected[S, temporal.Interval]
NegateIntervalValue retains selected aggregate/window phases and input ownership.
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(expr.Row(optional).Value(),2,w).
func NthValue ¶
NthValue returns a frame value, or NULL when absent. Example: expr.NthValue(expr.Row(amount).Value(),2,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(a,b).
func NullIfValue ¶
NullIfValue adds one nullable layer to matching required selected values. Example: expr.NullIfValue(expr.Count[User]().Value(),expr.Count[User]().Param(0).Value()).
func Nullable ¶
Nullable widens a selected value by one nullable layer without changing its phase. Example: expr.Nullable(expr.Count[User]().Value()).
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.
func OctetLengthValue ¶
OctetLengthValue applies OctetLength to selected expressions, including aggregates/windows.
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(expr.Count[User](),w).
func PercentRank ¶
PercentRank returns the relative rank in [0,1]. Example: expr.PercentRank(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.
func QuarterValue ¶
QuarterValue retains the selected aggregate/window phase.
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,int64]("COALESCE(score, ?)", 0).
func RawWithCodec ¶
RawWithCodec supplies an explicit result codec, including custom/nullable types. Example: expr.RawWithCodec[User](codec.Nullable(codec.String[Label]()),"label").
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.
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.
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.
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.
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.
func SecondValue ¶
SecondValue retains the selected aggregate/window phase.
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.
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.
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.
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.
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.
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.
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.
func SphericalDistanceValue ¶
func SphericalDistanceValue[S any](latitude, longitude Selected[S, float64], origin GeographicPoint) Selected[S, float64]
SphericalDistanceValue composes selected floating coordinates.
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.
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.
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.
func SubstringFromValue ¶
SubstringFromValue accepts a selected text value and bound character positions.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
func TimeOfValue ¶
TimeOfValue retains the selected aggregate/window phase.
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.
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.
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.
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.
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.
func TrimLeftValue ¶
TrimLeftValue applies TrimLeft to selected expressions, including aggregates/windows.
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.
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.
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.
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.
func TrimRightValue ¶
TrimRightValue applies TrimRight to selected expressions, including aggregates/windows.
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.
func TruncateDateValue ¶
func TruncateDateValue[S any](input Selected[S, temporal.Date], unit DateUnit) Selected[S, temporal.Date]
TruncateDateValue retains the selected aggregate/window phase.
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.
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.
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.
func TruncateLocalValue ¶
func TruncateLocalValue[S any](input Selected[S, temporal.LocalDateTime], unit TimestampUnit) Selected[S, temporal.LocalDateTime]
TruncateLocalValue retains the selected aggregate/window phase.
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.
func UnixMillisecondsValue ¶
UnixMillisecondsValue retains the selected aggregate/window phase.
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.
func UnixSecondsValue ¶
UnixSecondsValue retains the selected aggregate/window phase.
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.
func UpperValue ¶
UpperValue applies Upper to selected expressions, including aggregates/windows.
func YearNullableValue ¶
func YearNullableValue[S any, V calendarValue](input Selected[S, value.Nullable[V]]) Selected[S, value.Nullable[int64]]
YearNullableValue is the nullable selected-value counterpart.
func (Selected[S, V]) Asc ¶
func (e Selected[S, V]) Asc() SelectedOrder[S]
Asc orders a selected value in a rows query. Example: expr.AddValue(a,b).Asc().
func (Selected[S, V]) Desc ¶
func (e Selected[S, V]) Desc() SelectedOrder[S]
Desc orders a selected value in a rows query. Example: count.Value().Desc().
func (Selected[S, V]) Key ¶
func (e Selected[S, V]) Key() ProjectionKey[S]
Key constructs a selected key while preserving source ownership. Example: count.Value().Key().
func (Selected[S, V]) Param ¶
func (e Selected[S, V]) Param(v V) RowExpression[S, V]
Param captures this selected value's type without evaluating it. Example: expr.Count[User]().Value().Param(0).
type SelectedOrder ¶
type SelectedOrder[S any] struct { // contains filtered or unexported fields }
SelectedOrder orders selected values through rows, never model queries. Example: count.Desc().
func (SelectedOrder[S]) NullsFirst ¶
func (o SelectedOrder[S]) NullsFirst() SelectedOrder[S]
NullsFirst places SQL NULL first. Example: count.Desc().NullsFirst().
func (SelectedOrder[S]) NullsLast ¶
func (o SelectedOrder[S]) NullsLast() SelectedOrder[S]
NullsLast places SQL NULL last. Example: count.Desc().NullsLast().
type TextRowExpression ¶
TextRowExpression is a row text calculation with typed comparisons. Example: Lower(name).Like("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.
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.
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.
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.
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.
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.
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.
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.
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(orm.TextExpr(Users.Name)).Contains("Ada").
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(memberScope, orm.TextExpr(Members.Name)).Contains("Ada").
func Trim ¶
func Trim[S any, V ~string](input RowValue[S, V]) TextRowExpression[S, string]
Trim removes ordinary spaces from both ends.
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.
func TrimLeft ¶
func TrimLeft[S any, V ~string](input RowValue[S, V]) TextRowExpression[S, string]
TrimLeft removes ordinary spaces from the start.
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.
func TrimRight ¶
func TrimRight[S any, V ~string](input RowValue[S, V]) TextRowExpression[S, string]
TrimRight removes ordinary spaces from the end.
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.
func Upper ¶
func Upper[S any, V ~string](input RowValue[S, V]) TextRowExpression[S, string]
Upper uppercases text using the database collation.
func (TextRowExpression[S, V]) Asc ¶
func (e TextRowExpression[S, V]) Asc() Order[S]
Asc orders a computed row value. Example: expression.Asc().
func (TextRowExpression[S, V]) Contains ¶
func (e TextRowExpression[S, V]) Contains(v V) Predicate[S]
Contains compares typed text using the database collation. Example: expression.Contains("a").
func (TextRowExpression[S, V]) Desc ¶
func (e TextRowExpression[S, V]) Desc() Order[S]
Desc orders a computed row value. Example: expression.Desc().
func (TextRowExpression[S, V]) EndsWith ¶
func (e TextRowExpression[S, V]) EndsWith(v V) Predicate[S]
EndsWith compares typed text using the database collation. Example: expression.EndsWith("a").
func (TextRowExpression[S, V]) Eq ¶
func (e TextRowExpression[S, V]) Eq(v V) Predicate[S]
Eq compares row values before grouping. Example: expression.Eq(value).
func (TextRowExpression[S, V]) Gt ¶
func (e TextRowExpression[S, V]) Gt(v V) Predicate[S]
Gt compares row values before grouping. Example: expression.Gt(value).
func (TextRowExpression[S, V]) Gte ¶
func (e TextRowExpression[S, V]) Gte(v V) Predicate[S]
Gte compares row values before grouping. Example: expression.Gte(value).
func (TextRowExpression[S, V]) IContains ¶
func (e TextRowExpression[S, V]) IContains(v V) Predicate[S]
IContains compares typed text using the database collation. Example: expression.IContains("a").
func (TextRowExpression[S, V]) IEndsWith ¶
func (e TextRowExpression[S, V]) IEndsWith(v V) Predicate[S]
IEndsWith compares typed text using the database collation. Example: expression.IEndsWith("a").
func (TextRowExpression[S, V]) ILike ¶
func (e TextRowExpression[S, V]) ILike(v V) Predicate[S]
ILike compares typed text using the database collation. Example: expression.ILike("a").
func (TextRowExpression[S, V]) IStartsWith ¶
func (e TextRowExpression[S, V]) IStartsWith(v V) Predicate[S]
IStartsWith compares typed text using the database collation. Example: expression.IStartsWith("a").
func (TextRowExpression[S, V]) In ¶
func (e TextRowExpression[S, V]) In(vs ...V) Predicate[S]
In compares row values before grouping. Example: expression.In(value).
func (TextRowExpression[S, V]) IsNotNull ¶
func (e TextRowExpression[S, V]) IsNotNull() Predicate[S]
IsNotNull tests SQL nullness. Example: expression.IsNotNull().
func (TextRowExpression[S, V]) IsNull ¶
func (e TextRowExpression[S, V]) IsNull() Predicate[S]
IsNull tests SQL nullness. Example: expression.IsNull().
func (TextRowExpression[S, V]) Like ¶
func (e TextRowExpression[S, V]) Like(v V) Predicate[S]
Like compares typed text using the database collation. Example: expression.Like("a").
func (TextRowExpression[S, V]) Lt ¶
func (e TextRowExpression[S, V]) Lt(v V) Predicate[S]
Lt compares row values before grouping. Example: expression.Lt(value).
func (TextRowExpression[S, V]) Lte ¶
func (e TextRowExpression[S, V]) Lte(v V) Predicate[S]
Lte compares row values before grouping. Example: expression.Lte(value).
func (TextRowExpression[S, V]) Ne ¶
func (e TextRowExpression[S, V]) Ne(v V) Predicate[S]
Ne compares row values before grouping. Example: expression.Ne(value).
func (TextRowExpression[S, V]) Param ¶
func (e TextRowExpression[S, V]) Param(v V) RowExpression[S, V]
Param captures the exact result type. Example: expression.Param(value).
func (TextRowExpression[S, V]) StartsWith ¶
func (e TextRowExpression[S, V]) StartsWith(v V) Predicate[S]
StartsWith compares typed text using the database collation. Example: expression.StartsWith("a").
func (TextRowExpression[S, V]) Value ¶
func (e TextRowExpression[S, V]) Value() Selected[S, V]
Value selects the computed value. Example: expression.Value().
type TextValueComparison ¶
TextValueComparison supplies selected text conditions for HAVING. Example: TextValue(LowerValue(name)).Like("a%").
func TextValue ¶
func TextValue[S any, V ~string](v Selected[S, V]) TextValueComparison[S, V]
TextValue exposes selected text comparisons. Example: TextValue(LowerValue(name)).Contains("x").
func (TextValueComparison[S, V]) Contains ¶
func (e TextValueComparison[S, V]) Contains(v V) HavingPredicate[S]
Contains compares selected text using the database collation. Example: comparison.Contains("a").
func (TextValueComparison[S, V]) EndsWith ¶
func (e TextValueComparison[S, V]) EndsWith(v V) HavingPredicate[S]
EndsWith compares selected text using the database collation. Example: comparison.EndsWith("a").
func (TextValueComparison[S, V]) Eq ¶
func (a TextValueComparison[S, V]) Eq(v V) HavingPredicate[S]
Eq compares selected text without changing its phase. Example: comparison.Eq(value).
func (TextValueComparison[S, V]) Gt ¶
func (a TextValueComparison[S, V]) Gt(v V) HavingPredicate[S]
Gt compares selected text without changing its phase. Example: comparison.Gt(value).
func (TextValueComparison[S, V]) Gte ¶
func (a TextValueComparison[S, V]) Gte(v V) HavingPredicate[S]
Gte compares selected text without changing its phase. Example: comparison.Gte(value).
func (TextValueComparison[S, V]) IContains ¶
func (e TextValueComparison[S, V]) IContains(v V) HavingPredicate[S]
IContains compares selected text using the database collation. Example: comparison.IContains("a").
func (TextValueComparison[S, V]) IEndsWith ¶
func (e TextValueComparison[S, V]) IEndsWith(v V) HavingPredicate[S]
IEndsWith compares selected text using the database collation. Example: comparison.IEndsWith("a").
func (TextValueComparison[S, V]) ILike ¶
func (e TextValueComparison[S, V]) ILike(v V) HavingPredicate[S]
ILike compares selected text using the database collation. Example: comparison.ILike("a").
func (TextValueComparison[S, V]) IStartsWith ¶
func (e TextValueComparison[S, V]) IStartsWith(v V) HavingPredicate[S]
IStartsWith compares selected text using the database collation. Example: comparison.IStartsWith("a").
func (TextValueComparison[S, V]) In ¶
func (a TextValueComparison[S, V]) In(vs ...V) HavingPredicate[S]
In compares selected text without changing its phase. Example: comparison.In(value).
func (TextValueComparison[S, V]) IsNotNull ¶
func (a TextValueComparison[S, V]) IsNotNull() HavingPredicate[S]
IsNotNull compares selected text without changing its phase. Example: comparison.IsNotNull(value).
func (TextValueComparison[S, V]) IsNull ¶
func (a TextValueComparison[S, V]) IsNull() HavingPredicate[S]
IsNull compares selected text without changing its phase. Example: comparison.IsNull(value).
func (TextValueComparison[S, V]) Like ¶
func (e TextValueComparison[S, V]) Like(v V) HavingPredicate[S]
Like compares selected text using the database collation. Example: comparison.Like("a").
func (TextValueComparison[S, V]) Lt ¶
func (a TextValueComparison[S, V]) Lt(v V) HavingPredicate[S]
Lt compares selected text without changing its phase. Example: comparison.Lt(value).
func (TextValueComparison[S, V]) Lte ¶
func (a TextValueComparison[S, V]) Lte(v V) HavingPredicate[S]
Lte compares selected text without changing its phase. Example: comparison.Lte(value).
func (TextValueComparison[S, V]) Ne ¶
func (a TextValueComparison[S, V]) Ne(v V) HavingPredicate[S]
Ne compares selected text without changing its phase. Example: comparison.Ne(value).
func (TextValueComparison[S, V]) StartsWith ¶
func (e TextValueComparison[S, V]) StartsWith(v V) HavingPredicate[S]
StartsWith compares selected text using the database collation. Example: comparison.StartsWith("a").
type TimeZone ¶
type TimeZone struct {
// contains filtered or unexported fields
}
TimeZone names an explicitly selected IANA timezone; its zero value is invalid.
func LoadTimeZone ¶
LoadTimeZone validates an explicit IANA timezone. Example: LoadTimeZone("Asia/Kuala_Lumpur").
type TimestampUnit ¶
type TimestampUnit uint8
TimestampUnit identifies a timestamp boundary, including fractional seconds.
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(count.Gt(0),count.Value()).Else(count.Param(0).Value()).
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(count.Gt(0),count.Value()).
func (ValueCase[S, V]) Else ¶
Else finishes selected CASE with a matching selected fallback. Example: choice.Else(count.Param(0).Value()).
type ValueComparison ¶
type ValueComparison[S, V any] struct { // contains filtered or unexported fields }
ValueComparison compares selected values without exposing row predicates. Example: expr.CompareValue(selected).Eq(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(expr.Exists[User]().Value()).Eq(true).
func (ValueComparison[S, V]) Eq ¶
func (a ValueComparison[S, V]) Eq(v V) HavingPredicate[S]
Eq compares groups after selection. Example: expression.Eq(value).
func (ValueComparison[S, V]) In ¶
func (a ValueComparison[S, V]) In(vs ...V) HavingPredicate[S]
In compares groups after selection. Example: expression.In(value).
func (ValueComparison[S, V]) IsNotNull ¶
func (a ValueComparison[S, V]) IsNotNull() HavingPredicate[S]
IsNotNull tests a selected SQL value. Example: expression.IsNotNull().
func (ValueComparison[S, V]) IsNull ¶
func (a ValueComparison[S, V]) IsNull() HavingPredicate[S]
IsNull tests a selected SQL value. Example: expression.IsNull().
func (ValueComparison[S, V]) Ne ¶
func (a ValueComparison[S, V]) Ne(v V) HavingPredicate[S]
Ne compares groups after selection. Example: expression.Ne(value).
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.Value(orm.KeyExpr(Users.ID)).Asc()).
func WindowFor ¶
WindowFor infers ownership from a concrete model/join/alias scope; it does not copy query ordering or pagination. Example: expr.WindowFor(rows.ModelScope(Users.Query())).
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]) ExcludeNone ¶
ExcludeNone restores the default exclusion. Example: w.ExcludeNone().
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(amount.Desc()).
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(count.Value().Key()).
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
- temporal_expression.go
- temporal_extract.go
- temporal_units.go
- text_comparison.go
- text_expression.go
- text_row.go
- uuid_compare.go
- value.go
- window.go
- window_function.go
- window_range.go