Documentation
¶
Overview ¶
Package rows provides typed aliases, joins and complete row projections. Example: rows.Select(joined,OrderRows,rows.Map(OrderRows.ID,orderID)).
Index ¶
- func At[S, R, V any](scope expr.Scope[S, R], field Field[R, V]) expr.RowExpression[S, V]
- func AtNullable[S, R, V any](scope expr.NullableScope[S, R], field Field[R, V]) expr.RowExpression[S, value.Nullable[V]]
- func AtNullableValue[S, R, V any](scope expr.NullableScope[S, R], field Field[R, value.Nullable[V]]) expr.RowExpression[S, value.Nullable[V]]
- func Check(schemas ...CheckedSchema) error
- func CompileCursor[R any](q CursorQuery[R]) (orm.Statement, error)
- func CompileRead[S, R any](q ReadSource[S, R]) (orm.Statement, error)
- func CompileValueCursor[V any](q ValueCursorQuery[V]) (orm.Statement, error)
- func ConflictScalarNullableRowQuery[M, I, V any](records ConflictRows[M], inner Scalar[I, value.Nullable[V]]) expr.RowExpression[ConflictRow[M], value.Nullable[V]]
- func ConflictScalarRowQuery[M, I, V any](records ConflictRows[M], inner Scalar[I, V]) expr.RowExpression[ConflictRow[M], value.Nullable[V]]
- func ConflictTargetWhere[M any](policy orm.Conflict[M], predicates ...expr.Predicate[M]) orm.Conflict[M]
- func ConflictWhereRows[M any](policy orm.Conflict[M], predicates ...expr.Predicate[ConflictRow[M]]) orm.Conflict[M]
- func CorrelatedScalarNullableRowQuery[O, I, V any](s CorrelatedScalar[O, I, value.Nullable[V]]) expr.RowExpression[O, value.Nullable[V]]
- func CorrelatedScalarRowQuery[O, I, V any](s CorrelatedScalar[O, I, V]) expr.RowExpression[O, value.Nullable[V]]
- func Define[R any, T Schema[R]](declare func(Builder[R], *R) T) (result T)
- func DeleteUsing[S, M any](destination orm.Query[M], source SelectionSource[S]) orm.DeleteSource[S, M]
- func EachRead[S, R any](ctx context.Context, ex database.Executor, q ReadSource[S, R], ...) error
- func ExistsQuery[S, I any](outer SelectionSource[S], inner SelectionSource[I]) expr.Predicate[S]
- func Explain[S, R any](ctx context.Context, ex database.Executor, q Result[S, R]) (orm.Plan, error)
- func ExplainAnalyze[S, R any](ctx context.Context, ex database.Executor, q Result[S, R]) (orm.Plan, error)
- func ExplainAnalyzeCursor[R any](ctx context.Context, ex database.Executor, q CursorQuery[R]) (orm.Plan, error)
- func ExplainAnalyzeTransaction[R any](ctx context.Context, tx *database.Tx, q TransactionRecordSource[R]) (orm.Plan, error)
- func ExplainAnalyzeTransactionValue[S, V any](ctx context.Context, tx *database.Tx, q TransactionValue[S, V]) (orm.Plan, error)
- func ExplainAnalyzeValueCursor[V any](ctx context.Context, ex database.Executor, q ValueCursorQuery[V]) (orm.Plan, error)
- func ExplainCursor[R any](ctx context.Context, ex database.Executor, q CursorQuery[R]) (orm.Plan, error)
- func ExplainTransaction[R any](ctx context.Context, tx *database.Tx, q TransactionRecordSource[R]) (orm.Plan, error)
- func ExplainTransactionValue[S, V any](ctx context.Context, tx *database.Tx, q TransactionValue[S, V]) (orm.Plan, error)
- func ExplainValueCursor[V any](ctx context.Context, ex database.Executor, q ValueCursorQuery[V]) (orm.Plan, error)
- func ForceDeleteUsing[S, M any](destination orm.Query[M], soft orm.SoftDeletable[M], source SelectionSource[S]) orm.DeleteSource[S, M]
- func InCorrelatedQuery[O, I, V any](v expr.RowValue[O, V], s CorrelatedScalar[O, I, V]) expr.Predicate[O]
- func InNullableCorrelatedQuery[O, I, V any](v expr.RowValue[O, V], s CorrelatedScalar[O, I, value.Nullable[V]]) expr.Predicate[O]
- func InNullableQuery[S, I, V any](left expr.RowValue[S, V], inner Scalar[I, value.Nullable[V]]) expr.Predicate[S]
- func InQuery[S, I, V any](left expr.RowValue[S, V], inner Scalar[I, V]) expr.Predicate[S]
- func InnerNullableScope[O, I, M any](c CorrelatedSource[O, I], scope expr.NullableScope[I, M]) expr.NullableScope[Correlation[O, I], M]
- func InnerScope[O, I, M any](c CorrelatedSource[O, I], scope expr.Scope[I, M]) expr.Scope[Correlation[O, I], M]
- func InsertFrom[S, M any](source SelectionSource[S], destination orm.Query[M], ...) orm.InsertSelect[S, M]
- func LateralScope[A, O, R any](source LateralSource[A, O, R]) expr.Scope[Alias[A, R], R]
- func LeftNullableScope[S, L, M any](j leftScopeSource[S, L], scope expr.NullableScope[L, M]) expr.NullableScope[S, M]
- func LeftScope[S, L, M any](j preservedLeftSource[S, L], scope expr.Scope[L, M]) expr.Scope[S, M]
- func MapInsert[S, M, V, P any, C orm.InsertTarget[M, V, P]](field C, expression expr.RowValue[S, P]) orm.InsertMapping[S, M]
- func MapUpdate[S, M, V, P any, C orm.UpdateTarget[M, V, P]](field C, expression expr.RowValue[S, P]) orm.UpdateMapping[S, M]
- func MatchNullableSource[S, M, V, P any](field orm.ExpressionColumn[M, V, P], ...) orm.SourceKey[S, M]
- func MatchSource[S, M, V, P any](field orm.ExpressionColumn[M, V, P], expression expr.RowValue[S, P]) orm.SourceKey[S, M]
- func ModelScope[M any](q orm.Query[M]) expr.Scope[M, M]
- func NullableLeftScope[S, L, M any](j nullableLeftSource[S, L], scope expr.Scope[L, M]) expr.NullableScope[S, M]
- func NullableRightScope[S, R, M any](j nullableRightSource[S, R], scope expr.Scope[R, M]) expr.NullableScope[S, M]
- func OnConflictKeys[M any](keys ...expr.GroupKey[M]) orm.Conflict[M]
- func OuterNullableScope[O, I, M any](c CorrelatedSource[O, I], scope expr.NullableScope[O, M]) expr.NullableScope[Correlation[O, I], M]
- func OuterScope[O, I, M any](c CorrelatedSource[O, I], scope expr.Scope[O, M]) expr.Scope[Correlation[O, I], M]
- func PreflightCursor[R any](ctx context.Context, q CursorQuery[R]) error
- func PreflightRead[S, R any](ctx context.Context, q ReadSource[S, R]) error
- func PreflightValueCursor[V any](ctx context.Context, q ValueCursorQuery[V]) error
- func Raw[R any](ctx context.Context, ex database.Executor, schema Schema[R], sql string, ...) ([]R, error)
- func RightScope[S, R, M any](j preservedRightSource[S, R], scope expr.Scope[R, M]) expr.Scope[S, M]
- func ScalarNullableRowQuery[S, I, V any](outer SelectionSource[S], inner Scalar[I, value.Nullable[V]]) expr.RowExpression[S, value.Nullable[V]]
- func ScalarRowQuery[S, I, V any](outer SelectionSource[S], inner Scalar[I, V]) expr.RowExpression[S, value.Nullable[V]]
- func Scope[A, M any](a Aliased[A, M]) expr.Scope[Alias[A, M], M]
- func SetConflictValue[M, V, P any](field orm.ExpressionColumn[M, V, P], ...) orm.ConflictUpdate[M]
- func TransactionCorrelatedScalarNullableRowQuery[O, I TransactionScopeType, V any](s TransactionCorrelatedScalar[O, I, value.Nullable[V]]) expr.RowExpression[O, value.Nullable[V]]
- func TransactionCorrelatedScalarRowQuery[O, I TransactionScopeType, V any](s TransactionCorrelatedScalar[O, I, V]) expr.RowExpression[O, value.Nullable[V]]
- func TransactionExistsQuery[S TransactionScopeType](outer TransactionSelectionSource[S], inner TransactionSubquerySource) expr.Predicate[S]
- func TransactionInCorrelatedQuery[O, I TransactionScopeType, V any](v expr.RowValue[O, V], s TransactionCorrelatedScalar[O, I, V]) expr.Predicate[O]
- func TransactionInNullableCorrelatedQuery[O, I TransactionScopeType, V any](v expr.RowValue[O, V], s TransactionCorrelatedScalar[O, I, value.Nullable[V]]) expr.Predicate[O]
- func TransactionInNullableQuery[S TransactionScopeType, V any](left expr.RowValue[S, V], inner TransactionValueSource[value.Nullable[V]]) expr.Predicate[S]
- func TransactionInQuery[S TransactionScopeType, V any](left expr.RowValue[S, V], inner TransactionValueSource[V]) expr.Predicate[S]
- func TransactionInnerNullableScope[O, I TransactionScopeType, M any](c TransactionCorrelatedSource[O, I], scope expr.NullableScope[I, M]) expr.NullableScope[TransactionCorrelation[O, I], M]
- func TransactionInnerScope[O, I TransactionScopeType, M any](c TransactionCorrelatedSource[O, I], scope expr.Scope[I, M]) expr.Scope[TransactionCorrelation[O, I], M]
- func TransactionLateralScope[A any, O TransactionScopeType, R any](source TransactionLateralSource[A, O, R]) expr.Scope[TransactionAlias[A, R], R]
- func TransactionOuterNullableScope[O, I TransactionScopeType, M any](c TransactionCorrelatedSource[O, I], scope expr.NullableScope[O, M]) expr.NullableScope[TransactionCorrelation[O, I], M]
- func TransactionOuterScope[O, I TransactionScopeType, M any](c TransactionCorrelatedSource[O, I], scope expr.Scope[O, M]) expr.Scope[TransactionCorrelation[O, I], M]
- func TransactionScalarNullableRowQuery[S TransactionScopeType, V any](outer TransactionSelectionSource[S], ...) expr.RowExpression[S, value.Nullable[V]]
- func TransactionScalarRowQuery[S TransactionScopeType, V any](outer TransactionSelectionSource[S], inner TransactionValueSource[V]) expr.RowExpression[S, value.Nullable[V]]
- func TransactionScope[A, R any](source TransactionAliased[A, R]) expr.Scope[TransactionAlias[A, R], R]
- func UpdateFrom[S, M any](destination orm.Query[M], source SelectionSource[S]) orm.UpdateSource[S, M]
- type Alias
- type Aliased
- type Annotated
- type Builder
- type CheckedSchema
- type CommonTable
- type ConflictRow
- type ConflictRows
- type CorrelatedRecord
- func DistinctCorrelatedRecord[O, I, R any](q CorrelatedRecord[O, I, R]) CorrelatedRecord[O, I, R]
- func HavingCorrelatedRecord[O, I, R any](q CorrelatedRecord[O, I, R], ...) CorrelatedRecord[O, I, R]
- func ProjectCorrelated[O, I, R any](c CorrelatedSource[O, I], schema Schema[R], ...) CorrelatedRecord[O, I, R]
- func SelectCorrelatedRecord[O, I, R any](c CorrelatedSource[O, I], scope expr.Scope[Correlation[O, I], R]) CorrelatedRecord[O, I, R]
- func (r CorrelatedRecord[O, I, R]) Exists() expr.Predicate[O]
- func (r CorrelatedRecord[O, I, R]) Limit(n int) CorrelatedRecord[O, I, R]
- func (r CorrelatedRecord[O, I, R]) Offset(n int) CorrelatedRecord[O, I, R]
- func (r CorrelatedRecord[O, I, R]) OrderBy(os ...expr.Order[Correlation[O, I]]) CorrelatedRecord[O, I, R]
- func (r CorrelatedRecord[O, I, R]) Where(ps ...expr.Predicate[Correlation[O, I]]) CorrelatedRecord[O, I, R]
- type CorrelatedScalar
- func DistinctOnCorrelatedScalar[O, I, V any](q CorrelatedScalar[O, I, V], keys ...expr.GroupKey[Correlation[O, I]]) CorrelatedScalar[O, I, V]
- func DistinctOnCorrelatedScalarValues[O, I, V any](q CorrelatedScalar[O, I, V], keys ...expr.ProjectionKey[Correlation[O, I]]) CorrelatedScalar[O, I, V]
- func GroupByCorrelatedScalar[O, I, V any](q CorrelatedScalar[O, I, V], keys ...expr.GroupKey[Correlation[O, I]]) CorrelatedScalar[O, I, V]
- func OrderCorrelatedScalar[O, I, V any](q CorrelatedScalar[O, I, V], orders ...expr.ProjectionOrder[Correlation[O, I]]) CorrelatedScalar[O, I, V]
- func SelectCorrelatedScalar[O, I, V any](c CorrelatedSource[O, I], v expr.Selected[Correlation[O, I], V]) CorrelatedScalar[O, I, V]
- func (s CorrelatedScalar[O, I, V]) Exists() expr.Predicate[O]
- func (s CorrelatedScalar[O, I, V]) Limit(n int) CorrelatedScalar[O, I, V]
- func (s CorrelatedScalar[O, I, V]) Offset(n int) CorrelatedScalar[O, I, V]
- func (s CorrelatedScalar[O, I, V]) OrderBy(os ...expr.Order[Correlation[O, I]]) CorrelatedScalar[O, I, V]
- func (s CorrelatedScalar[O, I, V]) Where(ps ...expr.Predicate[Correlation[O, I]]) CorrelatedScalar[O, I, V]
- type CorrelatedSource
- func (c CorrelatedSource[O, I]) Exists() expr.Predicate[O]
- func (c CorrelatedSource[O, I]) Limit(n int) CorrelatedSource[O, I]
- func (c CorrelatedSource[O, I]) Offset(n int) CorrelatedSource[O, I]
- func (c CorrelatedSource[O, I]) OrderBy(os ...expr.Order[Correlation[O, I]]) CorrelatedSource[O, I]
- func (c CorrelatedSource[O, I]) Where(ps ...expr.Predicate[Correlation[O, I]]) CorrelatedSource[O, I]
- type Correlation
- type Cross
- type CrossJoined
- type CursorQuery
- func (q CursorQuery[R]) OrderBy(os ...expr.ProjectionOrder[CursorScope[R]]) CursorQuery[R]
- func (q CursorQuery[R]) Paginate(ctx context.Context, ex database.Executor, r orm.CursorRequest[R]) (orm.CursorPage[R], error)
- func (q CursorQuery[R]) Scope() expr.Scope[CursorScope[R], R]
- func (q CursorQuery[R]) UniqueBy(keys ...expr.GroupKey[CursorScope[R]]) CursorQuery[R]
- func (q CursorQuery[R]) Where(ps ...expr.Predicate[CursorScope[R]]) CursorQuery[R]
- type CursorScope
- type Field
- func BoolOf[R any, V ~bool](b Builder[R], ptr *V) Field[R, V]
- func BytesOf[R any, V ~[]byte](b Builder[R], ptr *V) Field[R, V]
- func EnumOf[R any, E interface{ ... }](b Builder[R], ptr *E) Field[R, E]
- func FieldOf[R, V any](b Builder[R], ptr *V, option orm.ColumnOption[V]) Field[R, V]
- func IDOf[R, M any](b Builder[R], ptr *model.ID[M]) Field[R, model.ID[M]]
- func NullableBytesOf[R any, V ~[]byte](b Builder[R], ptr *value.Nullable[V]) Field[R, value.Nullable[V]]
- func NullableEnumOf[R any, E interface{ ... }](b Builder[R], ptr *value.Nullable[E]) Field[R, value.Nullable[E]]
- func NullableFieldOf[R, V any](b Builder[R], ptr *value.Nullable[V], option orm.ColumnOption[V]) Field[R, value.Nullable[V]]
- func NullableIDOf[R, M any](b Builder[R], ptr *value.Nullable[model.ID[M]]) Field[R, value.Nullable[model.ID[M]]]
- func NullableNumberOf[R any, V orm.NumberValue](b Builder[R], ptr *value.Nullable[V]) Field[R, value.Nullable[V]]
- func NullableTextOf[R any, V ~string](b Builder[R], ptr *value.Nullable[V]) Field[R, value.Nullable[V]]
- func NullableTimeOf[R any, V orm.TimeValue](b Builder[R], ptr *value.Nullable[V]) Field[R, value.Nullable[V]]
- func NumberOf[R any, V orm.NumberValue](b Builder[R], ptr *V) Field[R, V]
- func TextOf[R any, V ~string](b Builder[R], ptr *V) Field[R, V]
- func TimeOf[R any, V orm.TimeValue](b Builder[R], ptr *V) Field[R, V]
- type Full
- type FullJoined
- type Inner
- type InnerJoined
- type Input
- type JoinOn
- func On[L, R any, K comparable, LP, RP any](left expr.Expression[L, K, LP], right expr.Expression[R, K, RP]) JoinOn[L, R]
- func OnAnd[L, R any](conditions ...JoinOn[L, R]) JoinOn[L, R]
- func OnDistinctFrom[L, R any, V any](left expr.RowValue[L, V], right expr.RowValue[R, V]) JoinOn[L, R]
- func OnEqual[L, R any, V any](left expr.RowValue[L, V], right expr.RowValue[R, V]) JoinOn[L, R]
- func OnGreater[L, R any, V expr.OrderedScalar](left expr.RowValue[L, V], right expr.RowValue[R, V]) JoinOn[L, R]
- func OnGreaterNullable[L, R any, V expr.OrderedScalar](left expr.RowValue[L, value.Nullable[V]], ...) JoinOn[L, R]
- func OnGreaterOrEqual[L, R any, V expr.OrderedScalar](left expr.RowValue[L, V], right expr.RowValue[R, V]) JoinOn[L, R]
- func OnGreaterOrEqualNullable[L, R any, V expr.OrderedScalar](left expr.RowValue[L, value.Nullable[V]], ...) JoinOn[L, R]
- func OnLess[L, R any, V expr.OrderedScalar](left expr.RowValue[L, V], right expr.RowValue[R, V]) JoinOn[L, R]
- func OnLessNullable[L, R any, V expr.OrderedScalar](left expr.RowValue[L, value.Nullable[V]], ...) JoinOn[L, R]
- func OnLessOrEqual[L, R any, V expr.OrderedScalar](left expr.RowValue[L, V], right expr.RowValue[R, V]) JoinOn[L, R]
- func OnLessOrEqualNullable[L, R any, V expr.OrderedScalar](left expr.RowValue[L, value.Nullable[V]], ...) JoinOn[L, R]
- func OnLike[L, R any, V ~string](left expr.RowValue[L, V], right expr.RowValue[R, V]) JoinOn[L, R]
- func OnLikeNullable[L, R any, V ~string](left expr.RowValue[L, value.Nullable[V]], ...) JoinOn[L, R]
- func OnNotDistinctFrom[L, R any, V any](left expr.RowValue[L, V], right expr.RowValue[R, V]) JoinOn[L, R]
- func OnNotEqual[L, R any, V any](left expr.RowValue[L, V], right expr.RowValue[R, V]) JoinOn[L, R]
- func OnOr[L, R any](conditions ...JoinOn[L, R]) JoinOn[L, R]
- type JoinTable
- type LateralSource
- type Left
- type LeftJoined
- type LockTarget
- type LockedResult
- func ForKeyShare[S, R any](source ReadSource[S, R]) LockedResult[S, R]
- func ForNoKeyUpdate[S, R any](source ReadSource[S, R]) LockedResult[S, R]
- func ForShare[S, R any](source ReadSource[S, R]) LockedResult[S, R]
- func ForUpdate[S, R any](source ReadSource[S, R]) LockedResult[S, R]
- func LockRows[S, R any](source ReadSource[S, R], clauses ...RowLock[S]) LockedResult[S, R]
- func (q LockedResult[S, R]) All(ctx context.Context, tx *database.Tx) ([]R, error)
- func (q LockedResult[S, R]) First(ctx context.Context, tx *database.Tx) (value.Optional[R], error)
- func (q LockedResult[S, R]) Limit(n int) LockedResult[S, R]
- func (q LockedResult[S, R]) NoWait() LockedResult[S, R]
- func (q LockedResult[S, R]) Of(targets ...LockTarget[S]) LockedResult[S, R]
- func (q LockedResult[S, R]) Offset(n int) LockedResult[S, R]
- func (q LockedResult[S, R]) OrderBy(os ...expr.ProjectionOrder[S]) LockedResult[S, R]
- func (q LockedResult[S, R]) RequireFirst(ctx context.Context, tx *database.Tx) (R, error)
- func (q LockedResult[S, R]) SkipLocked() LockedResult[S, R]
- func (q LockedResult[S, R]) Wait() LockedResult[S, R]
- func (q LockedResult[S, R]) Where(ps ...expr.Predicate[S]) LockedResult[S, R]
- type Mapping
- type Query
- func Distinct[S, R any](q Query[S, R]) Query[S, R]
- func DistinctOn[S, R any](q Query[S, R], keys ...expr.GroupKey[S]) Query[S, R]
- func DistinctOnValues[S, R any](q Query[S, R], keys ...expr.ProjectionKey[S]) Query[S, R]
- func FromModel[M any](q orm.Query[M]) Query[M, M]
- func GroupBy[S, R any](q Query[S, R], keys ...expr.GroupKey[S]) Query[S, R]
- func Having[S, R any](q Query[S, R], predicates ...expr.HavingPredicate[S]) Query[S, R]
- func Limit[S, R any](q Query[S, R], n int) Query[S, R]
- func Offset[S, R any](q Query[S, R], n int) Query[S, R]
- func OrderBy[S, R any](q Query[S, R], orders ...expr.ProjectionOrder[S]) Query[S, R]
- func ReorderUnwindowed[S, R any](q Query[S, R], orders ...expr.ProjectionOrder[S]) Query[S, R]
- func Select[S, R any](source SelectionSource[S], schema Schema[R], mappings ...Mapping[S, R]) Query[S, R]
- func SelectValue[M, V, P any](source orm.Query[M], column orm.ExpressionColumn[M, V, P]) Query[M, P]
- type ReadSource
- type Record
- type RecordRead
- func DistinctOnRecord[S, R any](q RecordRead[S, R], keys ...expr.GroupKey[S]) RecordRead[S, R]
- func DistinctRecord[S, R any](q RecordRead[S, R]) RecordRead[S, R]
- func SelectRecord[S, R any](source SelectionSource[S], scope expr.Scope[S, R]) RecordRead[S, R]
- func WithValue[M, V any](q orm.Query[M], computed expr.RowValue[M, V]) RecordRead[M, Annotated[M, V]]
- type RecordSource
- type RecursiveSelf
- type Result
- func (q Result[S, R]) All(ctx context.Context, ex database.Executor) ([]R, error)
- func (q Result[S, R]) Count(ctx context.Context, ex database.Executor) (int64, error)
- func (q Result[S, R]) Exists(ctx context.Context, ex database.Executor) (bool, error)
- func (q Result[S, R]) First(ctx context.Context, ex database.Executor) (value.Optional[R], error)
- func (q Result[S, R]) Limit(n int) Result[S, R]
- func (q Result[S, R]) Offset(n int) Result[S, R]
- func (q Result[S, R]) OrderBy(os ...expr.ProjectionOrder[S]) Result[S, R]
- func (q Result[S, R]) Paginate(ctx context.Context, ex database.Executor, request orm.PageRequest) (orm.PageResult[R], error)
- func (q Result[S, R]) RequireFirst(ctx context.Context, ex database.Executor) (R, error)
- func (q Result[S, R]) SimplePaginate(ctx context.Context, ex database.Executor, request orm.PageRequest) (orm.SimplePage[R], error)
- func (q Result[S, R]) Where(ps ...expr.Predicate[S]) Result[S, R]
- type Right
- type RightJoined
- type Row
- type RowLock
- type Scalar
- func DistinctOnScalar[S, V any](q Scalar[S, V], keys ...expr.GroupKey[S]) Scalar[S, V]
- func DistinctOnScalarValues[S, V any](q Scalar[S, V], keys ...expr.ProjectionKey[S]) Scalar[S, V]
- func DistinctScalar[S, V any](q Scalar[S, V]) Scalar[S, V]
- func GroupByScalar[S, V any](q Scalar[S, V], keys ...expr.GroupKey[S]) Scalar[S, V]
- func HavingScalar[S, V any](q Scalar[S, V], predicates ...expr.HavingPredicate[S]) Scalar[S, V]
- func LimitScalar[S, V any](q Scalar[S, V], n int) Scalar[S, V]
- func OffsetScalar[S, V any](q Scalar[S, V], n int) Scalar[S, V]
- func OrderScalar[S, V any](q Scalar[S, V], orders ...expr.ProjectionOrder[S]) Scalar[S, V]
- func SelectScalar[S, V any](source SelectionSource[S], selected expr.Selected[S, V]) Scalar[S, V]
- func WhereScalar[S, V any](q Scalar[S, V], predicates ...expr.Predicate[S]) Scalar[S, V]
- type Schema
- type ScopeSource
- type SelectionSource
- type Set
- type SetQuery
- func DistinctSet[R any](q SetQuery[R]) SetQuery[R]
- func Except[R any](a, b RecordSource[R]) SetQuery[R]
- func ExceptAll[R any](a, b RecordSource[R]) SetQuery[R]
- func Intersect[R any](a, b RecordSource[R]) SetQuery[R]
- func IntersectAll[R any](a, b RecordSource[R]) SetQuery[R]
- func Union[R any](a, b RecordSource[R]) SetQuery[R]
- func UnionAll[R any](a, b RecordSource[R]) SetQuery[R]
- type Source
- type TransactionAlias
- type TransactionAliased
- type TransactionCommonTable
- type TransactionCorrelatedRecord
- func ProjectTransactionCorrelated[O, I TransactionScopeType, R any](c TransactionCorrelatedSource[O, I], schema Schema[R], ...) TransactionCorrelatedRecord[O, I, R]
- func SelectTransactionCorrelatedRecord[O, I TransactionScopeType, R any](c TransactionCorrelatedSource[O, I], ...) TransactionCorrelatedRecord[O, I, R]
- func (r TransactionCorrelatedRecord[O, I, R]) Distinct() TransactionCorrelatedRecord[O, I, R]
- func (r TransactionCorrelatedRecord[O, I, R]) DistinctOn(keys ...expr.GroupKey[TransactionCorrelation[O, I]]) TransactionCorrelatedRecord[O, I, R]
- func (r TransactionCorrelatedRecord[O, I, R]) DistinctOnValues(keys ...expr.ProjectionKey[TransactionCorrelation[O, I]]) TransactionCorrelatedRecord[O, I, R]
- func (r TransactionCorrelatedRecord[O, I, R]) Exists() expr.Predicate[O]
- func (q TransactionCorrelatedRecord[O, I, R]) ForKeyShare() TransactionCorrelatedRecord[O, I, R]
- func (q TransactionCorrelatedRecord[O, I, R]) ForNoKeyUpdate() TransactionCorrelatedRecord[O, I, R]
- func (q TransactionCorrelatedRecord[O, I, R]) ForShare() TransactionCorrelatedRecord[O, I, R]
- func (q TransactionCorrelatedRecord[O, I, R]) ForUpdate() TransactionCorrelatedRecord[O, I, R]
- func (r TransactionCorrelatedRecord[O, I, R]) GroupBy(keys ...expr.GroupKey[TransactionCorrelation[O, I]]) TransactionCorrelatedRecord[O, I, R]
- func (r TransactionCorrelatedRecord[O, I, R]) Having(ps ...expr.HavingPredicate[TransactionCorrelation[O, I]]) TransactionCorrelatedRecord[O, I, R]
- func (r TransactionCorrelatedRecord[O, I, R]) Limit(n int) TransactionCorrelatedRecord[O, I, R]
- func (q TransactionCorrelatedRecord[O, I, R]) LockRows(cs ...RowLock[TransactionCorrelation[O, I]]) TransactionCorrelatedRecord[O, I, R]
- func (q TransactionCorrelatedRecord[O, I, R]) NoWait() TransactionCorrelatedRecord[O, I, R]
- func (q TransactionCorrelatedRecord[O, I, R]) Of(ts ...LockTarget[TransactionCorrelation[O, I]]) TransactionCorrelatedRecord[O, I, R]
- func (r TransactionCorrelatedRecord[O, I, R]) Offset(n int) TransactionCorrelatedRecord[O, I, R]
- func (r TransactionCorrelatedRecord[O, I, R]) OrderBy(os ...expr.ProjectionOrder[TransactionCorrelation[O, I]]) TransactionCorrelatedRecord[O, I, R]
- func (q TransactionCorrelatedRecord[O, I, R]) SkipLocked() TransactionCorrelatedRecord[O, I, R]
- func (q TransactionCorrelatedRecord[O, I, R]) Wait() TransactionCorrelatedRecord[O, I, R]
- func (r TransactionCorrelatedRecord[O, I, R]) Where(ps ...expr.Predicate[TransactionCorrelation[O, I]]) TransactionCorrelatedRecord[O, I, R]
- type TransactionCorrelatedScalar
- func (s TransactionCorrelatedScalar[O, I, V]) Exists() expr.Predicate[O]
- func (q TransactionCorrelatedScalar[O, I, V]) ForKeyShare() TransactionCorrelatedScalar[O, I, V]
- func (q TransactionCorrelatedScalar[O, I, V]) ForNoKeyUpdate() TransactionCorrelatedScalar[O, I, V]
- func (q TransactionCorrelatedScalar[O, I, V]) ForShare() TransactionCorrelatedScalar[O, I, V]
- func (q TransactionCorrelatedScalar[O, I, V]) ForUpdate() TransactionCorrelatedScalar[O, I, V]
- func (r TransactionCorrelatedScalar[O, I, V]) GroupBy(keys ...expr.GroupKey[TransactionCorrelation[O, I]]) TransactionCorrelatedScalar[O, I, V]
- func (r TransactionCorrelatedScalar[O, I, V]) Having(ps ...expr.HavingPredicate[TransactionCorrelation[O, I]]) TransactionCorrelatedScalar[O, I, V]
- func (s TransactionCorrelatedScalar[O, I, V]) Limit(n int) TransactionCorrelatedScalar[O, I, V]
- func (q TransactionCorrelatedScalar[O, I, V]) LockRows(cs ...RowLock[TransactionCorrelation[O, I]]) TransactionCorrelatedScalar[O, I, V]
- func (q TransactionCorrelatedScalar[O, I, V]) NoWait() TransactionCorrelatedScalar[O, I, V]
- func (q TransactionCorrelatedScalar[O, I, V]) Of(ts ...LockTarget[TransactionCorrelation[O, I]]) TransactionCorrelatedScalar[O, I, V]
- func (s TransactionCorrelatedScalar[O, I, V]) Offset(n int) TransactionCorrelatedScalar[O, I, V]
- func (s TransactionCorrelatedScalar[O, I, V]) OrderBy(os ...expr.ProjectionOrder[TransactionCorrelation[O, I]]) TransactionCorrelatedScalar[O, I, V]
- func (q TransactionCorrelatedScalar[O, I, V]) SkipLocked() TransactionCorrelatedScalar[O, I, V]
- func (q TransactionCorrelatedScalar[O, I, V]) Wait() TransactionCorrelatedScalar[O, I, V]
- func (s TransactionCorrelatedScalar[O, I, V]) Where(ps ...expr.Predicate[TransactionCorrelation[O, I]]) TransactionCorrelatedScalar[O, I, V]
- type TransactionCorrelatedSource
- func (c TransactionCorrelatedSource[O, I]) Exists() expr.Predicate[O]
- func (c TransactionCorrelatedSource[O, I]) Limit(n int) TransactionCorrelatedSource[O, I]
- func (c TransactionCorrelatedSource[O, I]) Offset(n int) TransactionCorrelatedSource[O, I]
- func (c TransactionCorrelatedSource[O, I]) OrderBy(os ...expr.Order[TransactionCorrelation[O, I]]) TransactionCorrelatedSource[O, I]
- func (c TransactionCorrelatedSource[O, I]) Where(ps ...expr.Predicate[TransactionCorrelation[O, I]]) TransactionCorrelatedSource[O, I]
- type TransactionCorrelation
- type TransactionCross
- type TransactionCrossJoined
- func TransactionCrossJoin[L, R TransactionScopeType](left TransactionJoinSource[L], right TransactionJoinTable[R]) TransactionCrossJoined[L, R]
- func TransactionCrossJoinLateral[L TransactionScopeType, A, R any](left TransactionJoinSource[L], right TransactionLateralSource[A, L, R]) TransactionCrossJoined[L, TransactionAlias[A, R]]
- type TransactionFull
- type TransactionFullJoined
- type TransactionInner
- type TransactionInnerJoined
- func TransactionInnerJoin[L, R TransactionScopeType](left TransactionJoinSource[L], right TransactionJoinTable[R], on JoinOn[L, R]) TransactionInnerJoined[L, R]
- func TransactionInnerJoinLateral[L TransactionScopeType, A, R any](left TransactionJoinSource[L], right TransactionLateralSource[A, L, R], ...) TransactionInnerJoined[L, TransactionAlias[A, R]]
- type TransactionJoinSource
- type TransactionJoinTable
- type TransactionLateralSource
- type TransactionLeft
- type TransactionLeftJoined
- func TransactionLeftJoin[L, R TransactionScopeType](left TransactionJoinSource[L], right TransactionJoinTable[R], on JoinOn[L, R]) TransactionLeftJoined[L, R]
- func TransactionLeftJoinLateral[L TransactionScopeType, A, R any](left TransactionJoinSource[L], right TransactionLateralSource[A, L, R], ...) TransactionLeftJoined[L, TransactionAlias[A, R]]
- type TransactionRead
- func (q TransactionRead[S, R]) All(ctx context.Context, tx *database.Tx) ([]R, error)
- func (q TransactionRead[S, R]) Count(ctx context.Context, ex *database.Tx) (int64, error)
- func (q TransactionRead[S, R]) Exists(ctx context.Context, ex *database.Tx) (bool, error)
- func (q TransactionRead[S, R]) First(ctx context.Context, ex *database.Tx) (value.Optional[R], error)
- func (q TransactionRead[S, R]) Limit(n int) TransactionRead[S, R]
- func (q TransactionRead[S, R]) Offset(n int) TransactionRead[S, R]
- func (q TransactionRead[S, R]) OrderBy(os ...expr.ProjectionOrder[S]) TransactionRead[S, R]
- func (q TransactionRead[S, R]) RequireFirst(ctx context.Context, ex *database.Tx) (R, error)
- func (q TransactionRead[S, R]) Where(ps ...expr.Predicate[S]) TransactionRead[S, R]
- type TransactionRecord
- type TransactionRecordSource
- type TransactionRight
- type TransactionRightJoined
- type TransactionScalar
- func (q TransactionScalar[S, V]) ForKeyShare() TransactionScalar[S, V]
- func (q TransactionScalar[S, V]) ForNoKeyUpdate() TransactionScalar[S, V]
- func (q TransactionScalar[S, V]) ForShare() TransactionScalar[S, V]
- func (q TransactionScalar[S, V]) ForUpdate() TransactionScalar[S, V]
- func (q TransactionScalar[S, V]) LockRows(cs ...RowLock[S]) TransactionScalar[S, V]
- func (q TransactionScalar[S, V]) NoWait() TransactionScalar[S, V]
- func (q TransactionScalar[S, V]) Of(ts ...LockTarget[S]) TransactionScalar[S, V]
- func (q TransactionScalar[S, V]) SkipLocked() TransactionScalar[S, V]
- func (q TransactionScalar[S, V]) Wait() TransactionScalar[S, V]
- type TransactionScopeSource
- type TransactionScopeType
- type TransactionSelectionSource
- type TransactionSubquery
- type TransactionSubquerySource
- type TransactionValue
- func (q TransactionValue[S, V]) All(ctx context.Context, ex *database.Tx) ([]V, error)
- func (q TransactionValue[S, V]) Count(ctx context.Context, ex *database.Tx) (int64, error)
- func (q TransactionValue[S, V]) Exists(ctx context.Context, ex *database.Tx) (bool, error)
- func (q TransactionValue[S, V]) First(ctx context.Context, ex *database.Tx) (value.Optional[V], error)
- func (q TransactionValue[S, V]) Limit(n int) TransactionValue[S, V]
- func (q TransactionValue[S, V]) Offset(n int) TransactionValue[S, V]
- func (q TransactionValue[S, V]) OrderBy(os ...expr.ProjectionOrder[S]) TransactionValue[S, V]
- func (q TransactionValue[S, V]) RequireFirst(ctx context.Context, ex *database.Tx) (V, error)
- func (q TransactionValue[S, V]) Where(ps ...expr.Predicate[S]) TransactionValue[S, V]
- type TransactionValueInput
- type TransactionValueSource
- type ValueCursorQuery
- func (q ValueCursorQuery[V]) OrderBy(os ...expr.ProjectionOrder[CursorScope[V]]) ValueCursorQuery[V]
- func (q ValueCursorQuery[V]) Paginate(ctx context.Context, ex database.Executor, r orm.CursorRequest[V]) (orm.CursorPage[V], error)
- func (q ValueCursorQuery[V]) Scope() expr.Scope[CursorScope[V], V]
- func (q ValueCursorQuery[V]) UniqueBy(keys ...expr.GroupKey[CursorScope[V]]) ValueCursorQuery[V]
- func (q ValueCursorQuery[V]) Value() expr.RowExpression[CursorScope[V], V]
- func (q ValueCursorQuery[V]) Where(ps ...expr.Predicate[CursorScope[V]]) ValueCursorQuery[V]
- type ValueRecord
- type ValueSetQuery
- func DistinctOnValueSet[V any](q ValueSetQuery[V], keys ...expr.ProjectionKey[Set[V]]) ValueSetQuery[V]
- func DistinctValues[V any](q ValueSetQuery[V]) ValueSetQuery[V]
- func ExceptAllValues[V any](a, b ValueSource[V]) ValueSetQuery[V]
- func ExceptValues[V any](a, b ValueSource[V]) ValueSetQuery[V]
- func IntersectAllValues[V any](a, b ValueSource[V]) ValueSetQuery[V]
- func IntersectValues[V any](a, b ValueSource[V]) ValueSetQuery[V]
- func UnionAllValues[V any](a, b ValueSource[V]) ValueSetQuery[V]
- func UnionValues[V any](a, b ValueSource[V]) ValueSetQuery[V]
- func (q ValueSetQuery[V]) Limit(n int) ValueSetQuery[V]
- func (q ValueSetQuery[V]) Offset(n int) ValueSetQuery[V]
- func (q ValueSetQuery[V]) OrderBy(os ...expr.ProjectionOrder[Set[V]]) ValueSetQuery[V]
- func (q ValueSetQuery[V]) Value() expr.RowExpression[Set[V], V]
- func (q ValueSetQuery[V]) Where(ps ...expr.Predicate[Set[V]]) ValueSetQuery[V]
- type ValueSource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func At ¶
At reads a declared projection field within its named record scope. Example: rows.At(rows.LateralScope(totals),Totals.Count).
func AtNullable ¶
func AtNullable[S, R, V any](scope expr.NullableScope[S, R], field Field[R, V]) expr.RowExpression[S, value.Nullable[V]]
AtNullable widens a required projection field from a nullable join side. Example: rows.AtNullable(rows.NullableRightScope(j,scope),Totals.Count).
func AtNullableValue ¶
func AtNullableValue[S, R, V any](scope expr.NullableScope[S, R], field Field[R, value.Nullable[V]]) expr.RowExpression[S, value.Nullable[V]]
AtNullableValue retains one nullable layer for a nullable projection field. Example: rows.AtNullableValue(scope,Summary.Note).
func Check ¶
func Check(schemas ...CheckedSchema) error
Check collects row startup errors. Example: rows.Check(OrderRows).
func CompileCursor ¶
func CompileCursor[R any](q CursorQuery[R]) (orm.Statement, error)
CompileCursor validates output keys and compiles canonical ordering without I/O. It adds no page boundary or lookahead limit. Example: rows.CompileCursor(cursor).
func CompileRead ¶
func CompileRead[S, R any](q ReadSource[S, R]) (orm.Statement, error)
CompileRead inspects an ordinary scalar, record or set read without I/O. Example: rows.CompileRead(rows.ReadScalar(selected)).
func CompileValueCursor ¶
func CompileValueCursor[V any](q ValueCursorQuery[V]) (orm.Statement, error)
CompileValueCursor inspects a scalar cursor without a page boundary or I/O. Example: rows.CompileValueCursor(cursor).
func ConflictScalarNullableRowQuery ¶
func ConflictScalarNullableRowQuery[M, I, V any](records ConflictRows[M], inner Scalar[I, value.Nullable[V]]) expr.RowExpression[ConflictRow[M], value.Nullable[V]]
ConflictScalarNullableRowQuery preserves one nullable layer for an independent scalar. Example: rows.ConflictScalarNullableRowQuery(records,lookup).
func ConflictScalarRowQuery ¶
func ConflictScalarRowQuery[M, I, V any](records ConflictRows[M], inner Scalar[I, V]) expr.RowExpression[ConflictRow[M], value.Nullable[V]]
ConflictScalarRowQuery evaluates an independent scalar SELECT; no rows become NULL. Example: rows.ConflictScalarRowQuery(records,lookup).
func ConflictTargetWhere ¶
func ConflictTargetWhere[M any](policy orm.Conflict[M], predicates ...expr.Predicate[M]) orm.Conflict[M]
ConflictTargetWhere declares a partial index predicate using fixed migration values. Example: rows.ConflictTargetWhere(policy,expr.Eq(expr.Value(orm.ColumnExpr(Users.Active)), true)).
func ConflictWhereRows ¶
func ConflictWhereRows[M any](policy orm.Conflict[M], predicates ...expr.Predicate[ConflictRow[M]]) orm.Conflict[M]
ConflictWhereRows adds update conditions over stored and proposed records. Example: rows.ConflictWhereRows(policy,expr.Greater(proposed,stored)).
func CorrelatedScalarNullableRowQuery ¶
func CorrelatedScalarNullableRowQuery[O, I, V any](s CorrelatedScalar[O, I, value.Nullable[V]]) expr.RowExpression[O, value.Nullable[V]]
CorrelatedScalarNullableRowQuery preserves nullable row-expression results. Example: rows.CorrelatedScalarNullableRowQuery(selected).
func CorrelatedScalarRowQuery ¶
func CorrelatedScalarRowQuery[O, I, V any](s CorrelatedScalar[O, I, V]) expr.RowExpression[O, value.Nullable[V]]
CorrelatedScalarRowQuery exposes a correlated scalar in row expressions. Example: expr.GreaterNullable(age,rows.CorrelatedScalarRowQuery(selected)).
func Define ¶
Define binds and seals a complete row shape. Example: rows.Define(func(b rows.Builder[OrderRow],r *OrderRow) Fields {...}).
func DeleteUsing ¶
func DeleteUsing[S, M any](destination orm.Query[M], source SelectionSource[S]) orm.DeleteSource[S, M]
DeleteUsing applies ordinary soft deletion and deduplicates source matches. Example: rows.DeleteUsing(Users.Query(),rows.From(Archives.Query())).Match(key).
func EachRead ¶
func EachRead[S, R any](ctx context.Context, ex database.Executor, q ReadSource[S, R], yield func(R) error) error
EachRead iterates an ordinary scalar, record or set with bounded memory. Complete models with possible retrieval callbacks use DefaultChunkSize batches, closing rows before dispatch and delivery. Other results stream one row at a time. Ordering/windows and callback error identity are preserved; batches do not share a snapshot. Example: rows.EachRead(ctx, db, selectedRecord, visit).
func ExistsQuery ¶
func ExistsQuery[S, I any](outer SelectionSource[S], inner SelectionSource[I]) expr.Predicate[S]
ExistsQuery anchors an independent SELECT's existence in the outer scope. Example: rows.ExistsQuery(rows.From(users),rows.From(orders)).
func Explain ¶
Explain plans an ordinary projection, scalar or set adapted through Read. Example: rows.Explain(ctx, db, rows.Read(report)).
func ExplainAnalyze ¶
func ExplainAnalyze[S, R any](ctx context.Context, ex database.Executor, q Result[S, R]) (orm.Plan, error)
ExplainAnalyze executes an ordinary result and reports actual measurements. Example: rows.ExplainAnalyze(ctx, db, rows.ReadSet(combined)).
func ExplainAnalyzeCursor ¶
func ExplainAnalyzeCursor[R any](ctx context.Context, ex database.Executor, q CursorQuery[R]) (orm.Plan, error)
ExplainAnalyzeCursor executes the canonical cursor result without pagination. Example: rows.ExplainAnalyzeCursor(ctx, db, cursor).
func ExplainAnalyzeTransaction ¶
func ExplainAnalyzeTransaction[R any](ctx context.Context, tx *database.Tx, q TransactionRecordSource[R]) (orm.Plan, error)
ExplainAnalyzeTransaction executes transaction-owned records. Example: rows.ExplainAnalyzeTransaction(ctx, tx, selected).
func ExplainAnalyzeTransactionValue ¶
func ExplainAnalyzeTransactionValue[S, V any](ctx context.Context, tx *database.Tx, q TransactionValue[S, V]) (orm.Plan, error)
ExplainAnalyzeTransactionValue executes a transaction-owned scalar. Example: rows.ExplainAnalyzeTransactionValue(ctx, tx, selected).
func ExplainAnalyzeValueCursor ¶
func ExplainAnalyzeValueCursor[V any](ctx context.Context, ex database.Executor, q ValueCursorQuery[V]) (orm.Plan, error)
ExplainAnalyzeValueCursor executes the canonical scalar cursor result. Example: rows.ExplainAnalyzeValueCursor(ctx, db, cursor).
func ExplainCursor ¶
func ExplainCursor[R any](ctx context.Context, ex database.Executor, q CursorQuery[R]) (orm.Plan, error)
ExplainCursor plans a canonical completed cursor without a page boundary. Example: rows.ExplainCursor(ctx, db, cursor).
func ExplainTransaction ¶
func ExplainTransaction[R any](ctx context.Context, tx *database.Tx, q TransactionRecordSource[R]) (orm.Plan, error)
ExplainTransaction plans records retaining nested transaction requirements. Example: rows.ExplainTransaction(ctx, tx, rows.LockedRecord(orm.Lock(Users.Query()))).
func ExplainTransactionValue ¶
func ExplainTransactionValue[S, V any](ctx context.Context, tx *database.Tx, q TransactionValue[S, V]) (orm.Plan, error)
ExplainTransactionValue plans a transaction-owned scalar. Example: rows.ExplainTransactionValue(ctx, tx, selected).
func ExplainValueCursor ¶
func ExplainValueCursor[V any](ctx context.Context, ex database.Executor, q ValueCursorQuery[V]) (orm.Plan, error)
ExplainValueCursor plans a canonical scalar cursor without a page boundary. Example: rows.ExplainValueCursor(ctx, db, cursor).
func ForceDeleteUsing ¶
func ForceDeleteUsing[S, M any](destination orm.Query[M], soft orm.SoftDeletable[M], source SelectionSource[S]) orm.DeleteSource[S, M]
ForceDeleteUsing physically removes soft-delete models within the supplied visibility. Example: rows.ForceDeleteUsing(Users.Query().WithTrashed(),Users.Soft,rows.From(Archives.Query())).Match(key).
func InCorrelatedQuery ¶
func InCorrelatedQuery[O, I, V any](v expr.RowValue[O, V], s CorrelatedScalar[O, I, V]) expr.Predicate[O]
InCorrelatedQuery requires exact enclosing scope and value type. Example: rows.InCorrelatedQuery(userID,selected).
func InNullableCorrelatedQuery ¶
func InNullableCorrelatedQuery[O, I, V any](v expr.RowValue[O, V], s CorrelatedScalar[O, I, value.Nullable[V]]) expr.Predicate[O]
InNullableCorrelatedQuery admits nullable inner values with SQL NULL semantics. Example: rows.InNullableCorrelatedQuery(userID,nullableIDs).
func InNullableQuery ¶
func InNullableQuery[S, I, V any](left expr.RowValue[S, V], inner Scalar[I, value.Nullable[V]]) expr.Predicate[S]
InNullableQuery explicitly admits nullable inner results without replacing NULLs. Example: rows.InNullableQuery(expr.Value(orm.KeyExpr(Users.ID)),nullableIDs).
func InQuery ¶
InQuery requires an exact row/result type, including nullability. Example: rows.InQuery(expr.Value(orm.KeyExpr(Users.ID)),inner).
func InnerNullableScope ¶
func InnerNullableScope[O, I, M any](c CorrelatedSource[O, I], scope expr.NullableScope[I, M]) expr.NullableScope[Correlation[O, I], M]
InnerNullableScope preserves an inner outer join's nullability. Example: rows.InnerNullableScope(c,rows.NullableRightScope(j,scope)).
func InnerScope ¶
func InnerScope[O, I, M any](c CorrelatedSource[O, I], scope expr.Scope[I, M]) expr.Scope[Correlation[O, I], M]
InnerScope lifts a preserved inner model into a correlation. Example: rows.InnerScope(c,rows.Scope(child)).
func InsertFrom ¶
func InsertFrom[S, M any](source SelectionSource[S], destination orm.Query[M], mappings ...orm.InsertMapping[S, M]) orm.InsertSelect[S, M]
InsertFrom inserts the selected source window, keeping defaults and NULL for omitted fields. Example: rows.InsertFrom(rows.From(Users.Query()),Archives.Query(),mapping).
func LateralScope ¶
func LateralScope[A, O, R any](source LateralSource[A, O, R]) expr.Scope[Alias[A, R], R]
LateralScope exposes the named complete record for ON and result mapping. Example: expr.At(rows.LateralScope(latest), orm.KeyExpr(Orders.ID)).
func LeftNullableScope ¶
func LeftNullableScope[S, L, M any](j leftScopeSource[S, L], scope expr.NullableScope[L, M]) expr.NullableScope[S, M]
LeftNullableScope retains an already nullable scope through another join. Example: rows.LeftNullableScope(chain,nullableOrders).
func LeftScope ¶
LeftScope preserves a model from the non-nullable left side. Example: rows.LeftScope(joined,rows.Scope(members)).
func MapInsert ¶
func MapInsert[S, M, V, P any, C orm.InsertTarget[M, V, P]](field C, expression expr.RowValue[S, P]) orm.InsertMapping[S, M]
MapInsert maps an exact stored SQL value without running a mutator. Example: rows.MapInsert(orm.TextExpr(Archives.Name), expr.Value(orm.TextExpr(Users.Name))).
func MapUpdate ¶
func MapUpdate[S, M, V, P any, C orm.UpdateTarget[M, V, P]](field C, expression expr.RowValue[S, P]) orm.UpdateMapping[S, M]
MapUpdate maps an exact stored SQL value to a non-primary field. Example: rows.MapUpdate(orm.TextExpr(Users.Name), expr.Value(orm.TextExpr(Archives.Name))).
func MatchNullableSource ¶
func MatchNullableSource[S, M, V, P any](field orm.ExpressionColumn[M, V, P], expression expr.RowValue[S, value.Nullable[P]]) orm.SourceKey[S, M]
MatchNullableSource accepts outer-join keys; NULL matches no destination. Example: rows.MatchNullableSource(Users.ID,nullableUserID).
func MatchSource ¶
func MatchSource[S, M, V, P any](field orm.ExpressionColumn[M, V, P], expression expr.RowValue[S, P]) orm.SourceKey[S, M]
MatchSource matches compatible stored primary values without assigning them. Example: rows.MatchSource(orm.KeyExpr(Users.ID), expr.Value(orm.ColumnExpr(Archives.UserID))).
func ModelScope ¶
ModelScope exposes an ordinary model query's declaration. Example: rows.ModelScope(Users.Query()).
func NullableLeftScope ¶
func NullableLeftScope[S, L, M any](j nullableLeftSource[S, L], scope expr.Scope[L, M]) expr.NullableScope[S, M]
NullableLeftScope widens the missing left rows of a right/full join. Example: rows.NullableLeftScope(joined,rows.Scope(members)).
func NullableRightScope ¶
func NullableRightScope[S, R, M any](j nullableRightSource[S, R], scope expr.Scope[R, M]) expr.NullableScope[S, M]
NullableRightScope widens the missing right rows of a left/full join. Example: rows.NullableRightScope(joined,rows.Scope(orders)).
func OnConflictKeys ¶
OnConflictKeys infers a unique index using row-phase expressions. Example: rows.OnConflictKeys(expr.Group(expr.Add(age,age))).
func OuterNullableScope ¶
func OuterNullableScope[O, I, M any](c CorrelatedSource[O, I], scope expr.NullableScope[O, M]) expr.NullableScope[Correlation[O, I], M]
OuterNullableScope preserves an enclosing outer join's nullability. Example: rows.OuterNullableScope(c,rows.NullableRightScope(j,scope)).
func OuterScope ¶
func OuterScope[O, I, M any](c CorrelatedSource[O, I], scope expr.Scope[O, M]) expr.Scope[Correlation[O, I], M]
OuterScope lifts a preserved enclosing model into a correlation. Example: rows.OuterScope(c,rows.Scope(parent)).
func PreflightCursor ¶
func PreflightCursor[R any](ctx context.Context, q CursorQuery[R]) error
PreflightCursor validates a cursor with the executing request context and no I/O. Example: rows.PreflightCursor(ctx,cursor).
func PreflightRead ¶
func PreflightRead[S, R any](ctx context.Context, q ReadSource[S, R]) error
PreflightRead validates an ordinary read using the executing request context. Example: rows.PreflightRead(ctx, rows.ReadSet(combined)).
func PreflightValueCursor ¶
func PreflightValueCursor[V any](ctx context.Context, q ValueCursorQuery[V]) error
PreflightValueCursor validates a scalar cursor with the executing request context. Example: rows.PreflightValueCursor(ctx,cursor).
func Raw ¶
func Raw[R any](ctx context.Context, ex database.Executor, schema Schema[R], sql string, args ...any) ([]R, error)
Raw hydrates exactly the schema's declared columns, matched by name in any order. It applies NO scopes and uses ex directly without read routing: raw SQL may write. Decode failure discards all results, but does not imply a write rolled back. Example: rows.Raw(ctx, tx, OrderRows, "SELECT id, label FROM orders WHERE id=$1", id).
func RightScope ¶
RightScope preserves a model from the non-nullable right side. Example: rows.RightScope(joined,rows.Scope(orders)).
func ScalarNullableRowQuery ¶
func ScalarNullableRowQuery[S, I, V any](outer SelectionSource[S], inner Scalar[I, value.Nullable[V]]) expr.RowExpression[S, value.Nullable[V]]
ScalarNullableRowQuery retains one nullable layer in row expressions. Example: rows.ScalarNullableRowQuery(outer,nullableInner).
func ScalarRowQuery ¶
func ScalarRowQuery[S, I, V any](outer SelectionSource[S], inner Scalar[I, V]) expr.RowExpression[S, value.Nullable[V]]
ScalarRowQuery evaluates an independent scalar in row comparisons or arithmetic. Example: expr.GreaterNullable(age,rows.ScalarRowQuery(outer,inner)).
func Scope ¶
Scope selects the model scope of an alias. Example: expr.At(rows.Scope(members),orm.KeyExpr(Members.ID)).
func SetConflictValue ¶
func SetConflictValue[M, V, P any](field orm.ExpressionColumn[M, V, P], calculation expr.RowValue[ConflictRow[M], P]) orm.ConflictUpdate[M]
SetConflictValue assigns an exact stored type, including nullability, from the conflict row phase. Example: rows.SetConflictValue(orm.NumberExpr(Users.Age), expr.Add(stored,proposed)).
func TransactionCorrelatedScalarNullableRowQuery ¶
func TransactionCorrelatedScalarNullableRowQuery[O, I TransactionScopeType, V any](s TransactionCorrelatedScalar[O, I, value.Nullable[V]]) expr.RowExpression[O, value.Nullable[V]]
TransactionCorrelatedScalarNullableRowQuery preserves nullable row-expression results. Example: rows.TransactionCorrelatedScalarNullableRowQuery(selected).
func TransactionCorrelatedScalarRowQuery ¶
func TransactionCorrelatedScalarRowQuery[O, I TransactionScopeType, V any](s TransactionCorrelatedScalar[O, I, V]) expr.RowExpression[O, value.Nullable[V]]
TransactionCorrelatedScalarRowQuery exposes a correlated scalar in row expressions. Example: expr.GreaterNullable(age,rows.TransactionCorrelatedScalarRowQuery(selected)).
func TransactionExistsQuery ¶
func TransactionExistsQuery[S TransactionScopeType](outer TransactionSelectionSource[S], inner TransactionSubquerySource) expr.Predicate[S]
TransactionExistsQuery anchors an independent SELECT to a transaction scope. Example: rows.TransactionExistsQuery(parent,selected).
func TransactionInCorrelatedQuery ¶
func TransactionInCorrelatedQuery[O, I TransactionScopeType, V any](v expr.RowValue[O, V], s TransactionCorrelatedScalar[O, I, V]) expr.Predicate[O]
TransactionInCorrelatedQuery requires exact enclosing scope and value type. Example: rows.TransactionInCorrelatedQuery(userID,selected).
func TransactionInNullableCorrelatedQuery ¶
func TransactionInNullableCorrelatedQuery[O, I TransactionScopeType, V any](v expr.RowValue[O, V], s TransactionCorrelatedScalar[O, I, value.Nullable[V]]) expr.Predicate[O]
TransactionInNullableCorrelatedQuery admits nullable inner values with SQL NULL semantics. Example: rows.TransactionInNullableCorrelatedQuery(userID,nullableIDs).
func TransactionInNullableQuery ¶
func TransactionInNullableQuery[S TransactionScopeType, V any](left expr.RowValue[S, V], inner TransactionValueSource[value.Nullable[V]]) expr.Predicate[S]
TransactionInNullableQuery explicitly admits NULL inner values. Example: rows.TransactionInNullableQuery(id,nullableIDs).
func TransactionInQuery ¶
func TransactionInQuery[S TransactionScopeType, V any](left expr.RowValue[S, V], inner TransactionValueSource[V]) expr.Predicate[S]
TransactionInQuery requires an exact row/result type in a transaction scope. Example: rows.TransactionInQuery(id,selected).
func TransactionInnerNullableScope ¶
func TransactionInnerNullableScope[O, I TransactionScopeType, M any](c TransactionCorrelatedSource[O, I], scope expr.NullableScope[I, M]) expr.NullableScope[TransactionCorrelation[O, I], M]
TransactionInnerNullableScope preserves an inner outer join's nullability. Example: rows.TransactionInnerNullableScope(c,rows.NullableRightScope(j,scope)).
func TransactionInnerScope ¶
func TransactionInnerScope[O, I TransactionScopeType, M any](c TransactionCorrelatedSource[O, I], scope expr.Scope[I, M]) expr.Scope[TransactionCorrelation[O, I], M]
TransactionInnerScope lifts a preserved inner model into a correlation. Example: rows.TransactionInnerScope(c,rows.TransactionScope(child)).
func TransactionLateralScope ¶
func TransactionLateralScope[A any, O TransactionScopeType, R any](source TransactionLateralSource[A, O, R]) expr.Scope[TransactionAlias[A, R], R]
TransactionLateralScope exposes the named complete record for ON and result mapping. Example: expr.At(rows.TransactionLateralScope(latest), orm.KeyExpr(Orders.ID)).
func TransactionOuterNullableScope ¶
func TransactionOuterNullableScope[O, I TransactionScopeType, M any](c TransactionCorrelatedSource[O, I], scope expr.NullableScope[O, M]) expr.NullableScope[TransactionCorrelation[O, I], M]
TransactionOuterNullableScope preserves an enclosing outer join's nullability. Example: rows.TransactionOuterNullableScope(c,rows.NullableRightScope(j,scope)).
func TransactionOuterScope ¶
func TransactionOuterScope[O, I TransactionScopeType, M any](c TransactionCorrelatedSource[O, I], scope expr.Scope[O, M]) expr.Scope[TransactionCorrelation[O, I], M]
TransactionOuterScope lifts a preserved enclosing model into a correlation. Example: rows.TransactionOuterScope(c,rows.TransactionScope(parent)).
func TransactionScalarNullableRowQuery ¶
func TransactionScalarNullableRowQuery[S TransactionScopeType, V any](outer TransactionSelectionSource[S], inner TransactionValueSource[value.Nullable[V]]) expr.RowExpression[S, value.Nullable[V]]
TransactionScalarNullableRowQuery makes a transaction scalar available in row expressions. Example: rows.TransactionScalarNullableRowQuery(parent,selected).
func TransactionScalarRowQuery ¶
func TransactionScalarRowQuery[S TransactionScopeType, V any](outer TransactionSelectionSource[S], inner TransactionValueSource[V]) expr.RowExpression[S, value.Nullable[V]]
TransactionScalarRowQuery makes a transaction scalar available in row expressions. Example: rows.TransactionScalarRowQuery(parent,selected).
func TransactionScope ¶
func TransactionScope[A, R any](source TransactionAliased[A, R]) expr.Scope[TransactionAlias[A, R], R]
TransactionScope exposes preserved transaction-owned model or projection fields. Example: expr.At(rows.TransactionScope(source), orm.KeyExpr(Orders.ID)).
func UpdateFrom ¶
func UpdateFrom[S, M any](destination orm.Query[M], source SelectionSource[S]) orm.UpdateSource[S, M]
UpdateFrom preserves source windows and destination scopes independently. Example: rows.UpdateFrom(Users.Query(),rows.From(Archives.Query())).Match(key).
Types ¶
type Alias ¶
type Alias[A, M any] struct { // contains filtered or unexported fields }
Alias gives each model occurrence a distinct scope. Example: Alias[memberSide,Member].
type Aliased ¶
type Aliased[A, M any] struct { // contains filtered or unexported fields }
Aliased is a model source with one typed alias. Example: rows.As[memberSide](Members.Query(),"members").
type Annotated ¶
type Annotated[M, V any] struct { Model M Value V // contains filtered or unexported fields }
Annotated pairs a complete hydrated model with a computed value from its row. Example: item.Model.Name and item.Value from rows.WithValue.
type Builder ¶
type Builder[R any] struct { // contains filtered or unexported fields }
Builder binds result fields at startup. Example: rows.NumberOf(b,&r.Amount).
type CheckedSchema ¶
type CheckedSchema interface {
// contains filtered or unexported methods
}
CheckedSchema is implemented by row declarations. Example: rows.Check(OrderRows).
type CommonTable ¶
type CommonTable[R any] struct { // contains filtered or unexported fields }
CommonTable is a reusable, complete, read-only record definition. Example: rows.AsRecord[tag](rows.CTE("active",records),"a").
func CTE ¶
func CTE[R any](name string, source RecordSource[R]) CommonTable[R]
CTE names a complete model or projection; dependencies are emitted once per statement. Example: rows.CTE("active",rows.ModelRecord(Users.Query().Where(orm.ColumnEq(Users.Active, true)))).
func RecursiveAllCTE ¶
func RecursiveAllCTE[R any](name string, anchor RecordSource[R], step func(RecursiveSelf[R]) RecordSource[R]) CommonTable[R]
RecursiveAllCTE retains duplicates and requires application data to terminate recursion. Execute with a cancellable context; an outer LIMIT is not a recursion bound. Example: rows.RecursiveAllCTE("paths",anchor,step).
func RecursiveCTE ¶
func RecursiveCTE[R any](name string, anchor RecordSource[R], step func(RecursiveSelf[R]) RecordSource[R]) CommonTable[R]
RecursiveCTE uses UNION to remove duplicate complete records across iterations. The step runs once synchronously to build SQL and must reference self exactly once. Example: rows.RecursiveCTE("tree",anchor,func(self rows.RecursiveSelf[Node]) rows.RecordSource[Node] { return step(self) }).
func (CommonTable[R]) Materialized ¶
func (c CommonTable[R]) Materialized() CommonTable[R]
Materialized requests explicit PostgreSQL materialization. Example: cte.Materialized().
func (CommonTable[R]) NotMaterialized ¶
func (c CommonTable[R]) NotMaterialized() CommonTable[R]
NotMaterialized requests inlining; recursive definitions reject it. Example: cte.NotMaterialized().
type ConflictRow ¶
type ConflictRow[M any] struct { // contains filtered or unexported fields }
ConflictRow separates stored/proposed expressions from ordinary model queries. Example: rows.ConflictRow[User].
type ConflictRows ¶
type ConflictRows[M any] struct { // contains filtered or unexported fields }
ConflictRows exposes complete stored/proposed records without standalone SELECT. Example: rows.ConflictRowsOf(Users.Query()).
func ConflictRowsOf ¶
func ConflictRowsOf[M any](q orm.Query[M]) ConflictRows[M]
ConflictRowsOf obtains declaration metadata; query filters do not become update conditions. Example: rows.ConflictRowsOf(Users.Query()).
func (ConflictRows[M]) Proposed ¶
func (r ConflictRows[M]) Proposed() expr.Scope[ConflictRow[M], M]
Proposed identifies EXCLUDED, including defaults and trigger changes. Example: expr.At(records.Proposed(), orm.NumberExpr(Users.Age)).
func (ConflictRows[M]) Stored ¶
func (r ConflictRows[M]) Stored() expr.Scope[ConflictRow[M], M]
Stored identifies the existing conflicting row. Example: expr.At(records.Stored(), orm.NumberExpr(Users.Age)).
type CorrelatedRecord ¶
type CorrelatedRecord[O, I, R any] struct { // contains filtered or unexported fields }
CorrelatedRecord keeps a complete record bound to its enclosing scope. Example: rows.SelectCorrelatedRecord(c,rows.InnerScope(c,scope)).
func DistinctCorrelatedRecord ¶
func DistinctCorrelatedRecord[O, I, R any](q CorrelatedRecord[O, I, R]) CorrelatedRecord[O, I, R]
DistinctCorrelatedRecord removes duplicate inner results, replacing DISTINCT ON. Example: rows.DistinctCorrelatedRecord(selected).
func HavingCorrelatedRecord ¶
func HavingCorrelatedRecord[O, I, R any](q CorrelatedRecord[O, I, R], predicates ...expr.HavingPredicate[Correlation[O, I]]) CorrelatedRecord[O, I, R]
HavingCorrelatedRecord appends group predicates inside the correlated SELECT. Example: rows.HavingCorrelatedRecord(summary, expr.GtValue(count, 0)).
func ProjectCorrelated ¶
func ProjectCorrelated[O, I, R any](c CorrelatedSource[O, I], schema Schema[R], mappings ...Mapping[Correlation[O, I], R]) CorrelatedRecord[O, I, R]
ProjectCorrelated maps a complete declared record without granting execution. Example: rows.ProjectCorrelated(c,Totals,rows.MapSelected(Totals.Count,count)).
func SelectCorrelatedRecord ¶
func SelectCorrelatedRecord[O, I, R any](c CorrelatedSource[O, I], scope expr.Scope[Correlation[O, I], R]) CorrelatedRecord[O, I, R]
SelectCorrelatedRecord selects a complete preserved inner model. Example: rows.SelectCorrelatedRecord(c,rows.InnerScope(c,rows.Scope(child))).
func (CorrelatedRecord[O, I, R]) Exists ¶
func (r CorrelatedRecord[O, I, R]) Exists() expr.Predicate[O]
Exists tests the record within its required outer scope. Example: record.Exists().
func (CorrelatedRecord[O, I, R]) Limit ¶
func (r CorrelatedRecord[O, I, R]) Limit(n int) CorrelatedRecord[O, I, R]
Limit retains the record's inner limit. Example: record.Limit(1).
func (CorrelatedRecord[O, I, R]) Offset ¶
func (r CorrelatedRecord[O, I, R]) Offset(n int) CorrelatedRecord[O, I, R]
Offset retains the record's inner offset. Example: record.Offset(1).
func (CorrelatedRecord[O, I, R]) OrderBy ¶
func (r CorrelatedRecord[O, I, R]) OrderBy(os ...expr.Order[Correlation[O, I]]) CorrelatedRecord[O, I, R]
OrderBy appends inner result ordering. Example: record.OrderBy(expr.Desc(childID)).
func (CorrelatedRecord[O, I, R]) Where ¶
func (r CorrelatedRecord[O, I, R]) Where(ps ...expr.Predicate[Correlation[O, I]]) CorrelatedRecord[O, I, R]
Where appends lifted inner predicates. Example: record.Where(expr.Equal(childID,parentID)).
type CorrelatedScalar ¶
type CorrelatedScalar[O, I, V any] struct { // contains filtered or unexported fields }
CorrelatedScalar keeps one value bound to its enclosing scope. Example: rows.SelectCorrelatedScalar(c,expr.AsSelected(expr.Row(childID))).
func DistinctOnCorrelatedScalar ¶
func DistinctOnCorrelatedScalar[O, I, V any](q CorrelatedScalar[O, I, V], keys ...expr.GroupKey[Correlation[O, I]]) CorrelatedScalar[O, I, V]
DistinctOnCorrelatedScalar selects one inner value per lifted row-key combination. Example: rows.DistinctOnCorrelatedScalar(selected, expr.Group(buyerID)).
func DistinctOnCorrelatedScalarValues ¶
func DistinctOnCorrelatedScalarValues[O, I, V any](q CorrelatedScalar[O, I, V], keys ...expr.ProjectionKey[Correlation[O, I]]) CorrelatedScalar[O, I, V]
DistinctOnCorrelatedScalarValues accepts selected keys inside the correlated SELECT. Example: rows.DistinctOnCorrelatedScalarValues(selected, expr.Key(expr.AsSelected(count))).
func GroupByCorrelatedScalar ¶
func GroupByCorrelatedScalar[O, I, V any](q CorrelatedScalar[O, I, V], keys ...expr.GroupKey[Correlation[O, I]]) CorrelatedScalar[O, I, V]
GroupByCorrelatedScalar appends lifted row keys inside the correlated SELECT. Example: rows.GroupByCorrelatedScalar(selected, expr.Group(bucket)).
func OrderCorrelatedScalar ¶
func OrderCorrelatedScalar[O, I, V any](q CorrelatedScalar[O, I, V], orders ...expr.ProjectionOrder[Correlation[O, I]]) CorrelatedScalar[O, I, V]
OrderCorrelatedScalar appends row or selected ordering inside the correlated SELECT. Example: rows.OrderCorrelatedScalar(selected, expr.DescValue(count)).
func SelectCorrelatedScalar ¶
func SelectCorrelatedScalar[O, I, V any](c CorrelatedSource[O, I], v expr.Selected[Correlation[O, I], V]) CorrelatedScalar[O, I, V]
SelectCorrelatedScalar selects one lifted value without an execution escape. Example: rows.SelectCorrelatedScalar(c,expr.AsSelected(expr.Count[rows.Correlation[User, Order]]())).
func (CorrelatedScalar[O, I, V]) Exists ¶
func (s CorrelatedScalar[O, I, V]) Exists() expr.Predicate[O]
Exists tests the selected result in the enclosing scope. Example: selected.Limit(0).Exists().
func (CorrelatedScalar[O, I, V]) Limit ¶
func (s CorrelatedScalar[O, I, V]) Limit(n int) CorrelatedScalar[O, I, V]
Limit retains an explicit inner limit. Example: selected.Limit(1).
func (CorrelatedScalar[O, I, V]) Offset ¶
func (s CorrelatedScalar[O, I, V]) Offset(n int) CorrelatedScalar[O, I, V]
Offset retains an explicit inner offset. Example: selected.Offset(1).
func (CorrelatedScalar[O, I, V]) OrderBy ¶
func (s CorrelatedScalar[O, I, V]) OrderBy(os ...expr.Order[Correlation[O, I]]) CorrelatedScalar[O, I, V]
OrderBy appends inner ordering. Example: selected.OrderBy(expr.Desc(childID)).
func (CorrelatedScalar[O, I, V]) Where ¶
func (s CorrelatedScalar[O, I, V]) Where(ps ...expr.Predicate[Correlation[O, I]]) CorrelatedScalar[O, I, V]
Where filters the inner SELECT with lifted predicates. Example: selected.Where(expr.Equal(childID,parentID)).
type CorrelatedSource ¶
type CorrelatedSource[O, I any] struct { // contains filtered or unexported fields }
CorrelatedSource retains its enclosing scope and cannot execute independently. Example: rows.Correlate(rows.From(users),rows.From(orders)).
func Correlate ¶
func Correlate[O, I any](outer ScopeSource[O], inner SelectionSource[I]) CorrelatedSource[O, I]
Correlate makes only the supplied enclosing scopes visible inside inner. Example: rows.Correlate(parent,child).
func (CorrelatedSource[O, I]) Exists ¶
func (c CorrelatedSource[O, I]) Exists() expr.Predicate[O]
Exists returns a predicate in the enclosing scope. Example: expr.Where(users,c.Exists()).
func (CorrelatedSource[O, I]) Limit ¶
func (c CorrelatedSource[O, I]) Limit(n int) CorrelatedSource[O, I]
Limit retains an inner result limit. Example: c.Limit(1).
func (CorrelatedSource[O, I]) Offset ¶
func (c CorrelatedSource[O, I]) Offset(n int) CorrelatedSource[O, I]
Offset retains an inner result offset. Example: c.Offset(1).
func (CorrelatedSource[O, I]) OrderBy ¶
func (c CorrelatedSource[O, I]) OrderBy(os ...expr.Order[Correlation[O, I]]) CorrelatedSource[O, I]
OrderBy appends scoped ordering. Example: c.OrderBy(expr.Desc(childID)).
func (CorrelatedSource[O, I]) Where ¶
func (c CorrelatedSource[O, I]) Where(ps ...expr.Predicate[Correlation[O, I]]) CorrelatedSource[O, I]
Where appends predicates in the lifted correlation scope. Example: c.Where(expr.Equal(childID,parentID)).
type Correlation ¶
type Correlation[O, I any] struct { // contains filtered or unexported fields }
Correlation identifies an explicit enclosing/inner scope pair. Example: Correlation[User,Order].
type Cross ¶
type Cross[L, R any] struct { // contains filtered or unexported fields }
Cross identifies a cross join's distinct result scope. Example: rows.Cross[L,R].
type CrossJoined ¶
type CrossJoined[L, R any] struct { // contains filtered or unexported fields }
CrossJoined retains typed sides and non-generic join state. Example: rows.CrossJoin(a,b).
func CrossJoin ¶
func CrossJoin[L, R any](left Source[L], right JoinTable[R]) CrossJoined[L, R]
CrossJoin combines aliased inputs with cross join semantics. Example: rows.CrossJoin(a,b).
func CrossJoinLateral ¶
func CrossJoinLateral[L, A, R any](left Source[L], right LateralSource[A, L, R]) CrossJoined[L, Alias[A, R]]
CrossJoinLateral evaluates right for each preceding left row. Example: rows.CrossJoinLateral(parent,latest).
type CursorQuery ¶
type CursorQuery[R any] struct { // contains filtered or unexported fields }
CursorQuery pages complete results using an explicit unique output identity. Example: rows.CursorFor(rows.ModelRecord(Users.Query())).
func CursorFor ¶
func CursorFor[R any](source RecordSource[R]) CursorQuery[R]
CursorFor retains filters and windows behind a completed-result boundary. Example: rows.CursorFor(rows.RecordOf(report)).UniqueBy(expr.Group(id)).
func (CursorQuery[R]) OrderBy ¶
func (q CursorQuery[R]) OrderBy(os ...expr.ProjectionOrder[CursorScope[R]]) CursorQuery[R]
OrderBy orders plain output fields. Example: c.OrderBy(expr.Asc(id)).
func (CursorQuery[R]) Paginate ¶
func (q CursorQuery[R]) Paginate(ctx context.Context, ex database.Executor, r orm.CursorRequest[R]) (orm.CursorPage[R], error)
Paginate reads one lookahead row; tokens are positions, not authorization. Example: c.Paginate(ctx,db,orm.CursorRequest[R]{Size:20}).
func (CursorQuery[R]) Scope ¶
func (q CursorQuery[R]) Scope() expr.Scope[CursorScope[R], R]
Scope exposes completed output fields. Example: expr.At(c.Scope(), orm.KeyExpr(Users.ID)).
func (CursorQuery[R]) UniqueBy ¶
func (q CursorQuery[R]) UniqueBy(keys ...expr.GroupKey[CursorScope[R]]) CursorQuery[R]
UniqueBy asserts result uniqueness and appends missing identity orders. Example: c.UniqueBy(expr.Group(id)).
func (CursorQuery[R]) Where ¶
func (q CursorQuery[R]) Where(ps ...expr.Predicate[CursorScope[R]]) CursorQuery[R]
Where filters completed rows. Example: c.Where(expr.Ne(id, zero)).
type CursorScope ¶
type CursorScope[R any] struct { // contains filtered or unexported fields }
CursorScope identifies completed output independently of the input scope. Example: expr.At(cursor.Scope(), orm.KeyExpr(Users.ID)).
type Field ¶
type Field[R, V any] struct { // contains filtered or unexported fields }
Field preserves the row and value types of one result field. Example: rows.Map(OrderRows.Amount,amount).
func BoolOf ¶
BoolOf binds a Boolean row field, including defined Boolean types. Example: rows.BoolOf(b, &r.Enabled).
func EnumOf ¶
func EnumOf[R any, E interface { enum.Scalar EnumDescriptor() enum.Descriptor[E] }](b Builder[R], ptr *E) Field[R, E]
EnumOf validates and uses the generated descriptor. Example: rows.EnumOf(b,&r.Status).
func FieldOf ¶
func FieldOf[R, V any](b Builder[R], ptr *V, option orm.ColumnOption[V]) Field[R, V]
FieldOf binds a custom row value with an explicit codec. Example: rows.FieldOf(b,&r.Code,orm.Codec(custom)).
func NullableBytesOf ¶
func NullableBytesOf[R any, V ~[]byte](b Builder[R], ptr *value.Nullable[V]) Field[R, value.Nullable[V]]
NullableBytesOf binds nullable owned buffers. Example: rows.NullableBytesOf(b,&r.Payload).
func NullableEnumOf ¶
func NullableEnumOf[R any, E interface { enum.Scalar EnumDescriptor() enum.Descriptor[E] }](b Builder[R], ptr *value.Nullable[E]) Field[R, value.Nullable[E]]
NullableEnumOf binds nullable enums with their generated descriptor. Example: rows.NullableEnumOf(b,&r.Status).
func NullableFieldOf ¶
func NullableFieldOf[R, V any](b Builder[R], ptr *value.Nullable[V], option orm.ColumnOption[V]) Field[R, value.Nullable[V]]
NullableFieldOf binds a nullable custom value. Example: rows.NullableFieldOf(b,&r.Code,orm.Codec(custom)).
func NullableIDOf ¶
func NullableIDOf[R, M any](b Builder[R], ptr *value.Nullable[model.ID[M]]) Field[R, value.Nullable[model.ID[M]]]
NullableIDOf binds a nullable model identifier. Example: rows.NullableIDOf(b,&r.OwnerID).
func NullableNumberOf ¶
func NullableNumberOf[R any, V orm.NumberValue](b Builder[R], ptr *value.Nullable[V]) Field[R, value.Nullable[V]]
NullableNumberOf chooses a nullable numeric codec. Example: rows.NullableNumberOf(b,&r.Balance).
func NullableTextOf ¶
func NullableTextOf[R any, V ~string](b Builder[R], ptr *value.Nullable[V]) Field[R, value.Nullable[V]]
NullableTextOf binds nullable text. Example: rows.NullableTextOf(b,&r.Nickname).
func NullableTimeOf ¶
func NullableTimeOf[R any, V orm.TimeValue](b Builder[R], ptr *value.Nullable[V]) Field[R, value.Nullable[V]]
NullableTimeOf chooses a nullable temporal codec. Example: rows.NullableTimeOf(b,&r.DeletedAt).
func NumberOf ¶
func NumberOf[R any, V orm.NumberValue](b Builder[R], ptr *V) Field[R, V]
NumberOf chooses the numeric codec at startup. Example: rows.NumberOf(b,&r.Amount).
type Full ¶
type Full[L, R any] struct { // contains filtered or unexported fields }
Full identifies a full join's distinct result scope. Example: rows.Full[L,R].
type FullJoined ¶
type FullJoined[L, R any] struct { // contains filtered or unexported fields }
FullJoined retains typed sides and non-generic join state. Example: rows.FullJoin(a,b,on).
type Inner ¶
type Inner[L, R any] struct { // contains filtered or unexported fields }
Inner preserves the scopes of both joined inputs. Example: Inner[Alias[left,Member],Alias[right,Order]].
type InnerJoined ¶
type InnerJoined[L, R any] struct { // contains filtered or unexported fields }
InnerJoined retains both sides for type-safe re-scoping. Example: rows.InnerJoin(members,orders,on).
func InnerJoin ¶
func InnerJoin[L, R any](left Source[L], right JoinTable[R], on JoinOn[L, R]) InnerJoined[L, R]
InnerJoin joins two distinct typed aliases. Example: rows.InnerJoin(members,orders,rows.On(mID,oMemberID)).
func InnerJoinLateral ¶
func InnerJoinLateral[L, A, R any](left Source[L], right LateralSource[A, L, R], on ...JoinOn[L, Alias[A, R]]) InnerJoined[L, Alias[A, R]]
InnerJoinLateral combines optional typed ON conditions; no conditions means ON TRUE. Example: rows.InnerJoinLateral(parent,latest).
type Input ¶
type Input[S any] struct { // contains filtered or unexported fields }
Input retains a SELECT's scope without adding methods to model or row queries. Example: rows.From(Users.Query()).
type JoinOn ¶
type JoinOn[L, R any] struct { // contains filtered or unexported fields }
JoinOn retains the two operand scopes. Example: rows.On(memberID,orderMemberID).
func On ¶
func On[L, R any, K comparable, LP, RP any](left expr.Expression[L, K, LP], right expr.Expression[R, K, RP]) JoinOn[L, R]
On joins expressions with the same value type. Example: rows.On(memberID,orderMemberID).
func OnAnd ¶
OnAnd combines conditions with the same left/right scopes. Example: rows.OnAnd(key,age).
func OnDistinctFrom ¶
func OnDistinctFrom[L, R any, V any](left expr.RowValue[L, V], right expr.RowValue[R, V]) JoinOn[L, R]
OnDistinctFrom compares same-typed row values across distinct join sides. Example: rows.OnDistinctFrom(left,right).
func OnEqual ¶
OnEqual compares same-typed row values across distinct join sides. Example: rows.OnEqual(left,right).
func OnGreater ¶
func OnGreater[L, R any, V expr.OrderedScalar](left expr.RowValue[L, V], right expr.RowValue[R, V]) JoinOn[L, R]
OnGreater compares same-typed row values across distinct join sides. Example: rows.OnGreater(left,right).
func OnGreaterNullable ¶
func OnGreaterNullable[L, R any, V expr.OrderedScalar](left expr.RowValue[L, value.Nullable[V]], right expr.RowValue[R, value.Nullable[V]]) JoinOn[L, R]
OnGreaterNullable compares same-typed row values across distinct join sides. Example: rows.OnGreaterNullable(left,right).
func OnGreaterOrEqual ¶
func OnGreaterOrEqual[L, R any, V expr.OrderedScalar](left expr.RowValue[L, V], right expr.RowValue[R, V]) JoinOn[L, R]
OnGreaterOrEqual compares same-typed row values across distinct join sides. Example: rows.OnGreaterOrEqual(left,right).
func OnGreaterOrEqualNullable ¶
func OnGreaterOrEqualNullable[L, R any, V expr.OrderedScalar](left expr.RowValue[L, value.Nullable[V]], right expr.RowValue[R, value.Nullable[V]]) JoinOn[L, R]
OnGreaterOrEqualNullable compares same-typed row values across distinct join sides. Example: rows.OnGreaterOrEqualNullable(left,right).
func OnLess ¶
func OnLess[L, R any, V expr.OrderedScalar](left expr.RowValue[L, V], right expr.RowValue[R, V]) JoinOn[L, R]
OnLess compares same-typed row values across distinct join sides. Example: rows.OnLess(left,right).
func OnLessNullable ¶
func OnLessNullable[L, R any, V expr.OrderedScalar](left expr.RowValue[L, value.Nullable[V]], right expr.RowValue[R, value.Nullable[V]]) JoinOn[L, R]
OnLessNullable compares same-typed row values across distinct join sides. Example: rows.OnLessNullable(left,right).
func OnLessOrEqual ¶
func OnLessOrEqual[L, R any, V expr.OrderedScalar](left expr.RowValue[L, V], right expr.RowValue[R, V]) JoinOn[L, R]
OnLessOrEqual compares same-typed row values across distinct join sides. Example: rows.OnLessOrEqual(left,right).
func OnLessOrEqualNullable ¶
func OnLessOrEqualNullable[L, R any, V expr.OrderedScalar](left expr.RowValue[L, value.Nullable[V]], right expr.RowValue[R, value.Nullable[V]]) JoinOn[L, R]
OnLessOrEqualNullable compares same-typed row values across distinct join sides. Example: rows.OnLessOrEqualNullable(left,right).
func OnLike ¶
OnLike compares same-typed row values across distinct join sides. Example: rows.OnLike(left,right).
func OnLikeNullable ¶
func OnLikeNullable[L, R any, V ~string](left expr.RowValue[L, value.Nullable[V]], right expr.RowValue[R, value.Nullable[V]]) JoinOn[L, R]
OnLikeNullable compares same-typed row values across distinct join sides. Example: rows.OnLikeNullable(left,right).
func OnNotDistinctFrom ¶
func OnNotDistinctFrom[L, R any, V any](left expr.RowValue[L, V], right expr.RowValue[R, V]) JoinOn[L, R]
OnNotDistinctFrom compares same-typed row values across distinct join sides. Example: rows.OnNotDistinctFrom(left,right).
func OnNotEqual ¶
OnNotEqual compares same-typed row values across distinct join sides. Example: rows.OnNotEqual(left,right).
func OnOr ¶
OnOr combines alternatives without changing side ownership. Example: rows.OnOr(primary,fallback).
type LateralSource ¶
type LateralSource[A, O, R any] struct { // contains filtered or unexported fields }
LateralSource retains its required preceding scope without ordinary source methods. Example: rows.AsLateral[latest](record,"latest").
func AsLateral ¶
func AsLateral[A, O, I, R any](record CorrelatedRecord[O, I, R], alias string) LateralSource[A, O, R]
AsLateral always creates a derived SELECT for a correlated record. Example: rows.AsLateral[latest](record.Limit(1),"latest").
type Left ¶
type Left[L, R any] struct { // contains filtered or unexported fields }
Left identifies a left join's distinct result scope. Example: rows.Left[L,R].
type LeftJoined ¶
type LeftJoined[L, R any] struct { // contains filtered or unexported fields }
LeftJoined retains typed sides and non-generic join state. Example: rows.LeftJoin(a,b,on).
func LeftJoin ¶
func LeftJoin[L, R any](left Source[L], right JoinTable[R], on JoinOn[L, R]) LeftJoined[L, R]
LeftJoin combines aliased inputs with left join semantics. Example: rows.LeftJoin(a,b,on).
func LeftJoinLateral ¶
func LeftJoinLateral[L, A, R any](left Source[L], right LateralSource[A, L, R], on ...JoinOn[L, Alias[A, R]]) LeftJoined[L, Alias[A, R]]
LeftJoinLateral preserves unmatched parents and widens the right scope. Example: rows.LeftJoinLateral(parent,latest).
type LockTarget ¶
type LockTarget[S any] struct { // contains filtered or unexported fields }
LockTarget identifies one preserved input; nullable scopes are excluded. Example: rows.Target(rows.Scope(users)).
type LockedResult ¶
type LockedResult[S, R any] struct { // contains filtered or unexported fields }
LockedResult requires Tx and offers no count, pagination or ordinary source conversion. Example: rows.ForUpdate(rows.Read(report)).All(ctx,tx).
func ForKeyShare ¶
func ForKeyShare[S, R any](source ReadSource[S, R]) LockedResult[S, R]
ForKeyShare locks eligible contributing rows; narrow outer joins with Of. Example: rows.ForKeyShare(rows.Read(report)).All(ctx,tx).
func ForNoKeyUpdate ¶
func ForNoKeyUpdate[S, R any](source ReadSource[S, R]) LockedResult[S, R]
ForNoKeyUpdate locks eligible contributing rows; narrow outer joins with Of. Example: rows.ForNoKeyUpdate(rows.Read(report)).All(ctx,tx).
func ForShare ¶
func ForShare[S, R any](source ReadSource[S, R]) LockedResult[S, R]
ForShare locks eligible contributing rows; narrow outer joins with Of. Example: rows.ForShare(rows.Read(report)).All(ctx,tx).
func ForUpdate ¶
func ForUpdate[S, R any](source ReadSource[S, R]) LockedResult[S, R]
ForUpdate locks eligible contributing rows; narrow outer joins with Of. Example: rows.ForUpdate(rows.Read(report)).All(ctx,tx).
func LockRows ¶
func LockRows[S, R any](source ReadSource[S, R], clauses ...RowLock[S]) LockedResult[S, R]
LockRows applies independent clauses using the existing lock compiler. Example: rows.LockRows(rows.Read(report),rows.UpdateLock(rows.Target(scope))).
func (LockedResult[S, R]) All ¶
All requires a transaction and discards partial results. Example: locked.All(ctx,tx).
func (LockedResult[S, R]) First ¶
First preserves an omitted result when no row matches. Example: locked.First(ctx,tx).
func (LockedResult[S, R]) Limit ¶
func (q LockedResult[S, R]) Limit(n int) LockedResult[S, R]
Limit bounds selected rows. Example: locked.Limit(10).
func (LockedResult[S, R]) NoWait ¶
func (q LockedResult[S, R]) NoWait() LockedResult[S, R]
NoWait sets every clause's wait policy. Example: locked.NoWait().
func (LockedResult[S, R]) Of ¶
func (q LockedResult[S, R]) Of(targets ...LockTarget[S]) LockedResult[S, R]
Of replaces a single clause's targets with preserved scopes. Example: locked.Of(rows.Target(scope)).
func (LockedResult[S, R]) Offset ¶
func (q LockedResult[S, R]) Offset(n int) LockedResult[S, R]
Offset skips selected rows. Example: locked.Offset(10).
func (LockedResult[S, R]) OrderBy ¶
func (q LockedResult[S, R]) OrderBy(os ...expr.ProjectionOrder[S]) LockedResult[S, R]
OrderBy orders contributing rows. Example: locked.OrderBy(expr.Asc(id)).
func (LockedResult[S, R]) RequireFirst ¶
RequireFirst reports database.NotFound when no row matches. Example: locked.RequireFirst(ctx,tx).
func (LockedResult[S, R]) SkipLocked ¶
func (q LockedResult[S, R]) SkipLocked() LockedResult[S, R]
SkipLocked sets every clause's wait policy. Example: locked.SkipLocked().
func (LockedResult[S, R]) Wait ¶
func (q LockedResult[S, R]) Wait() LockedResult[S, R]
Wait sets every clause's wait policy. Example: locked.Wait().
func (LockedResult[S, R]) Where ¶
func (q LockedResult[S, R]) Where(ps ...expr.Predicate[S]) LockedResult[S, R]
Where filters contributing rows. Example: locked.Where(expr.Ne(id, zero)).
type Mapping ¶
type Mapping[S, R any] struct { // contains filtered or unexported fields }
Mapping binds a row field to a same-typed expression in S. Example: rows.Map(OrderRows.Label,label).
type Query ¶
type Query[S, R any] struct { // contains filtered or unexported fields }
Query retains input scope S and result R without heavy engine types. Example: rows.Read(projection).All(ctx,db).
func Distinct ¶
Distinct removes duplicate results and replaces earlier DISTINCT ON. Example: rows.Distinct(rows.FromModel(Users.Query())).
func DistinctOn ¶
DistinctOn selects one result per row-key combination; order by keys first. Example: rows.DistinctOn(q,expr.Group(buyer)).
func DistinctOnValues ¶
func DistinctOnValues[S, R any](q Query[S, R], keys ...expr.ProjectionKey[S]) Query[S, R]
DistinctOnValues accepts selected keys while preserving grouping validation. Example: rows.DistinctOnValues(q,expr.Key(expr.AsSelected(count))).
func FromModel ¶
FromModel adapts a model query to a complete read-only model result/source. Scopes remain applied; eager-loading requests require explicit collection loading. Example: rows.Read(rows.Distinct(rows.FromModel(Users.Query()))).All(ctx,db).
func Having ¶
func Having[S, R any](q Query[S, R], predicates ...expr.HavingPredicate[S]) Query[S, R]
Having appends group conditions. Example: rows.Having(q,expr.GtValue(count, 0)).
func Limit ¶
Limit retains an ordinary projection's window without adding Query methods. Example: rows.Limit(report,10).
func Offset ¶
Offset retains an ordinary projection's offset without adding Query methods. Example: rows.Offset(report,10).
func OrderBy ¶
func OrderBy[S, R any](q Query[S, R], orders ...expr.ProjectionOrder[S]) Query[S, R]
OrderBy accepts row and selected ordering through this read-only boundary. Example: rows.OrderBy(q,expr.DescValue(count),expr.Asc(buyer)).
func ReorderUnwindowed ¶
func ReorderUnwindowed[S, R any](q Query[S, R], orders ...expr.ProjectionOrder[S]) Query[S, R]
ReorderUnwindowed replaces report ordering, rejecting outer windows and DISTINCT ON. Example: rows.ReorderUnwindowed(q,expr.Asc(name),expr.Asc(id)).
func Select ¶
func Select[S, R any](source SelectionSource[S], schema Schema[R], mappings ...Mapping[S, R]) Query[S, R]
Select maps every declared row field exactly once. Example: rows.Select(joined,OrderRows,rows.Map(OrderRows.ID,id),...).
func SelectValue ¶
func SelectValue[M, V, P any](source orm.Query[M], column orm.ExpressionColumn[M, V, P]) Query[M, P]
SelectValue selects just a column's value type. Example: rows.SelectValue(Orders.Query(), orm.NumberExpr(Orders.TotalCents)).
type ReadSource ¶
type ReadSource[S, R any] interface { // contains filtered or unexported methods }
ReadSource carries scope, complete decoding and executor kind together for locking. Example: rows.ForUpdate(rows.Read(report)).
type Record ¶
type Record[R any] struct { // contains filtered or unexported fields }
Record is a complete ordinary result adapter without execution or mutation methods. Example: rows.ModelRecord(Orders.Query()).
func ModelRecord ¶
ModelRecord adapts a model read without eager loading or write capabilities. Example: rows.ModelRecord(Users.Query().Limit(10)).
type RecordRead ¶
type RecordRead[S, R any] struct { // contains filtered or unexported fields }
RecordRead retains the input scope and complete record decoder without model writes. Example: rows.ReadRecord(rows.SelectRecord(alias,rows.Scope(alias))).All(ctx,db).
func DistinctOnRecord ¶
func DistinctOnRecord[S, R any](q RecordRead[S, R], keys ...expr.GroupKey[S]) RecordRead[S, R]
DistinctOnRecord selects a complete read-only record per input-key combination. Ordering stays in the input scope, including columns not in the selected record. Example: rows.DistinctOnRecord(rows.SelectRecord(joined,left),expr.Group(buyerID)).OrderBy(expr.Asc(buyerID),expr.Desc(orderID)).
func DistinctRecord ¶
func DistinctRecord[S, R any](q RecordRead[S, R]) RecordRead[S, R]
DistinctRecord removes duplicate complete records without adding model writes. Example: rows.DistinctRecord(rows.SelectRecord(joined, scope)).
func SelectRecord ¶
func SelectRecord[S, R any](source SelectionSource[S], scope expr.Scope[S, R]) RecordRead[S, R]
SelectRecord selects a complete preserved source through its original decoder. Nullable sides require an explicit declared projection instead. Example: rows.SelectRecord(joined,rows.LeftScope(joined,rows.Scope(parent))).
func WithValue ¶
func WithValue[M, V any](q orm.Query[M], computed expr.RowValue[M, V]) RecordRead[M, Annotated[M, V]]
WithValue selects a complete model and a computed row value in one statement. Model retrieval callbacks and eager relations retain their ordinary ownership. Example: rows.ReadRecord(rows.WithValue(Users.Query(),expr.RelatedValue(UserRelations.Orders,expr.Count[Order]()))).All(ctx,db).
func (RecordRead[S, R]) Limit ¶
func (r RecordRead[S, R]) Limit(n int) RecordRead[S, R]
Limit retains the result window. Example: result.Limit(10).
func (RecordRead[S, R]) Offset ¶
func (r RecordRead[S, R]) Offset(n int) RecordRead[S, R]
Offset retains the result offset. Example: result.Offset(10).
func (RecordRead[S, R]) OrderBy ¶
func (r RecordRead[S, R]) OrderBy(os ...expr.ProjectionOrder[S]) RecordRead[S, R]
OrderBy retains row or selected ordering. Example: result.OrderBy(expr.Asc(id)).
func (RecordRead[S, R]) Where ¶
func (r RecordRead[S, R]) Where(ps ...expr.Predicate[S]) RecordRead[S, R]
Where retains predicates in the input scope. Example: result.Where(expr.Gt(id, 0)).
type RecordSource ¶
type RecordSource[R any] interface { // contains filtered or unexported methods }
RecordSource carries a complete declared result, separately from its input scope. Example: rows.AsRecord[tag](rows.RecordOf(report),"report").
type RecursiveSelf ¶
type RecursiveSelf[R any] struct { // contains filtered or unexported fields }
RecursiveSelf exposes the working record only through a typed alias. Captured references fail compilation outside their owning recursive step. Example: rows.AsRecord[parent](self,"parent").
type Result ¶
type Result[S, R any] struct { // contains filtered or unexported fields }
Result exposes ordinary read terminals without adding Query methods. Example: rows.Read(report).Paginate(ctx,db,orm.Page(1,20)).
func Read ¶
Read adapts complete projections and single-value queries for ordinary terminals. Example: rows.Read(rows.SelectValue(Users.Query(), orm.TextExpr(Users.Name))).First(ctx,db).
func ReadRecord ¶
func ReadRecord[S, R any](q RecordRead[S, R]) Result[S, R]
ReadRecord adapts complete selected records for ordinary terminals. Example: rows.ReadRecord(selected).First(ctx,db).
func ReadScalar ¶
ReadScalar adapts a selected scalar with its exact codec. Example: rows.ReadScalar(selected).All(ctx,db).
func ReadSet ¶
ReadSet adapts the completed scope of a record set. Example: rows.ReadSet(combined).Count(ctx,db).
func ReadValues ¶
func ReadValues[V any](q ValueSetQuery[V]) Result[Set[V], V]
ReadValues adapts the completed scope of a scalar set. Example: rows.ReadValues(combined).SimplePaginate(ctx,db,orm.Page(1,20)).
func (Result[S, R]) All ¶
All collects complete results or discards the entire batch. Example: selected.All(ctx,executor).
func (Result[S, R]) Count ¶
Count counts the selected window, preserving nested locks. Example: selected.Count(ctx,executor).
func (Result[S, R]) Exists ¶
Exists tests the selected window. Example: selected.Exists(ctx,executor).
func (Result[S, R]) First ¶
First returns an omitted optional for an empty result. Example: selected.First(ctx,executor).
func (Result[S, R]) OrderBy ¶
func (q Result[S, R]) OrderBy(os ...expr.ProjectionOrder[S]) Result[S, R]
OrderBy retains explicit result ordering. Example: selected.OrderBy(expr.Asc(id)).
func (Result[S, R]) Paginate ¶
func (q Result[S, R]) Paginate(ctx context.Context, ex database.Executor, request orm.PageRequest) (orm.PageResult[R], error)
Paginate requires explicit ordering and no outer window; nested windows remain. Example: rows.Read(report).Paginate(ctx,db,orm.Page(1,20)).
func (Result[S, R]) RequireFirst ¶
RequireFirst reports database.NotFound for an empty result. Example: selected.RequireFirst(ctx,executor).
func (Result[S, R]) SimplePaginate ¶
func (q Result[S, R]) SimplePaginate(ctx context.Context, ex database.Executor, request orm.PageRequest) (orm.SimplePage[R], error)
SimplePaginate reads one lookahead row without a total. Example: rows.Read(report).SimplePaginate(ctx,db,orm.Page(1,20)).
type Right ¶
type Right[L, R any] struct { // contains filtered or unexported fields }
Right identifies a right join's distinct result scope. Example: rows.Right[L,R].
type RightJoined ¶
type RightJoined[L, R any] struct { // contains filtered or unexported fields }
RightJoined retains typed sides and non-generic join state. Example: rows.RightJoin(a,b,on).
type Row ¶
type Row[R any] struct { // contains filtered or unexported fields }
Row is embedded in a row-field schema. Example: type Fields struct { rows.Row[OrderRow]; ID rows.Field[OrderRow,model.ID[Order]] }.
type RowLock ¶
type RowLock[S any] struct { // contains filtered or unexported fields }
RowLock declares one lock strength and wait policy for preserved inputs. Example: rows.UpdateLock(rows.Target(scope)).SkipLocked().
func KeyShareLock ¶
func KeyShareLock[S any](targets ...LockTarget[S]) RowLock[S]
KeyShareLock declares a lock on explicit preserved targets. Example: rows.KeyShareLock(rows.Target(scope)).
func NoKeyUpdateLock ¶
func NoKeyUpdateLock[S any](targets ...LockTarget[S]) RowLock[S]
NoKeyUpdateLock declares a lock on explicit preserved targets. Example: rows.NoKeyUpdateLock(rows.Target(scope)).
func ShareLock ¶
func ShareLock[S any](targets ...LockTarget[S]) RowLock[S]
ShareLock declares a lock on explicit preserved targets. Example: rows.ShareLock(rows.Target(scope)).
func UpdateLock ¶
func UpdateLock[S any](targets ...LockTarget[S]) RowLock[S]
UpdateLock declares a lock on explicit preserved targets. Example: rows.UpdateLock(rows.Target(scope)).
func (RowLock[S]) SkipLocked ¶
SkipLocked sets this clause's wait policy. Example: clause.SkipLocked().
type Scalar ¶
type Scalar[S, V any] struct { // contains filtered or unexported fields }
Scalar retains exactly one selected value without standalone execution. Example: rows.SelectScalar(rows.From(q),expr.AsSelected(expr.Row(age))).
func DistinctOnScalar ¶
DistinctOnScalar selects one scalar per row-key combination; order by keys first. Example: rows.DistinctOnScalar(selected, expr.Group(buyer)).
func DistinctOnScalarValues ¶
func DistinctOnScalarValues[S, V any](q Scalar[S, V], keys ...expr.ProjectionKey[S]) Scalar[S, V]
DistinctOnScalarValues accepts selected keys and retains group/window validation. Example: rows.DistinctOnScalarValues(selected, expr.Key(expr.AsSelected(count))).
func DistinctScalar ¶
DistinctScalar removes duplicate scalar results, replacing DISTINCT ON. Example: rows.DistinctScalar(selected).
func GroupByScalar ¶
GroupByScalar appends row keys inside the scalar SELECT. Example: rows.GroupByScalar(selected, expr.Group(buyer)).
func HavingScalar ¶
func HavingScalar[S, V any](q Scalar[S, V], predicates ...expr.HavingPredicate[S]) Scalar[S, V]
HavingScalar appends group predicates inside the scalar SELECT. Example: rows.HavingScalar(selected, expr.GtValue(count, 0)).
func LimitScalar ¶
LimitScalar replaces the inner limit without changing scalar cardinality rules. Example: rows.LimitScalar(selected, 1).
func OffsetScalar ¶
OffsetScalar replaces the offset inside the scalar SELECT. Example: rows.OffsetScalar(selected, 1).
func OrderScalar ¶
func OrderScalar[S, V any](q Scalar[S, V], orders ...expr.ProjectionOrder[S]) Scalar[S, V]
OrderScalar appends row or selected ordering inside the scalar SELECT. Example: rows.OrderScalar(selected, expr.Asc(age)).
func SelectScalar ¶
func SelectScalar[S, V any](source SelectionSource[S], selected expr.Selected[S, V]) Scalar[S, V]
SelectScalar selects one exact value for scalar, IN or EXISTS composition. Example: rows.SelectScalar(rows.From(q),expr.AsSelected(expr.Row(expr.Value(orm.NumberExpr(Users.Age))))).
type Schema ¶
type Schema[R any] interface { // contains filtered or unexported methods }
Schema retains a complete row declaration. Example: rows.Select(joined,OrderRows,mappings...).
type ScopeSource ¶
type ScopeSource[S any] interface { // contains filtered or unexported methods }
ScopeSource exposes enclosing visibility without granting execution. Example: rows.Correlate(parent,child).
type SelectionSource ¶
type SelectionSource[S any] interface { // contains filtered or unexported methods }
SelectionSource retains a scope for projections and subqueries, without granting join access. Example: rows.SelectScalar(rows.From(query), expr.AsSelected(expr.Row(age))).
type Set ¶
type Set[R any] struct { // contains filtered or unexported fields }
Set is the combined output scope, separate from both inputs. Example: expr.Scope[rows.Set[User],User].
type SetQuery ¶
type SetQuery[R any] struct { // contains filtered or unexported fields }
SetQuery combines complete records without model mutation methods. Example: rows.Union(rows.ModelRecord(a),rows.ModelRecord(b)).
func DistinctSet ¶
DistinctSet removes duplicate combined records, preserving both input SELECTs. Example: rows.DistinctSet(rows.UnionAll(left, right)).
func Except ¶
func Except[R any](a, b RecordSource[R]) SetQuery[R]
Except keeps distinct left rows absent on the right, retaining each input window. Example: rows.Except(a,b).
func ExceptAll ¶
func ExceptAll[R any](a, b RecordSource[R]) SetQuery[R]
ExceptAll subtracts right multiplicities from the left, retaining each input window. Example: rows.ExceptAll(a,b).
func Intersect ¶
func Intersect[R any](a, b RecordSource[R]) SetQuery[R]
Intersect keeps distinct rows present in both inputs, retaining each input window. Example: rows.Intersect(a,b).
func IntersectAll ¶
func IntersectAll[R any](a, b RecordSource[R]) SetQuery[R]
IntersectAll keeps the smaller shared multiplicity, retaining each input window. Example: rows.IntersectAll(a,b).
func Union ¶
func Union[R any](a, b RecordSource[R]) SetQuery[R]
Union removes duplicate rows, retaining each input window. Example: rows.Union(a,b).
func UnionAll ¶
func UnionAll[R any](a, b RecordSource[R]) SetQuery[R]
UnionAll retains duplicate rows, retaining each input window. Example: rows.UnionAll(a,b).
func (SetQuery[R]) OrderBy ¶
func (q SetQuery[R]) OrderBy(os ...expr.ProjectionOrder[Set[R]]) SetQuery[R]
OrderBy orders combined rows independently of input ordering. Example: combined.OrderBy(expr.Asc(id)).
type Source ¶
type Source[S any] interface { SelectionSource[S] // contains filtered or unexported methods }
Source accepts an alias or join chain in S with a preserved join boundary. Example: rows.LeftJoin(users, orders, on).
type TransactionAlias ¶
type TransactionAlias[A, R any] struct { // contains filtered or unexported fields }
TransactionAlias gives transaction-owned fields a distinct scope from ordinary aliases. Example: TransactionAlias[claimed,Order].
type TransactionAliased ¶
type TransactionAliased[A, R any] struct { // contains filtered or unexported fields }
TransactionAliased names one complete record without ordinary source methods. Example: rows.AsTransaction[claimed](record,"claimed").
func AsTransaction ¶
func AsTransaction[A, R any](source TransactionRecordSource[R], alias string) TransactionAliased[A, R]
AsTransaction retains locks within the aliased SELECT and its executor kind. Example: rows.AsTransaction[claimed](rows.LockedRecord(orm.Lock(q)),"claimed").
type TransactionCommonTable ¶
type TransactionCommonTable[R any] struct { // contains filtered or unexported fields }
TransactionCommonTable retains a complete record's transaction requirement and locks. Example: rows.AsTransaction[tag](cte,"claim").
func TransactionCTE ¶
func TransactionCTE[R any](name string, source TransactionRecordSource[R]) TransactionCommonTable[R]
TransactionCTE names a transaction-required complete record. Example: rows.TransactionCTE("claimed",rows.LockedRecord(orm.Lock(Orders.Query()))).
func (TransactionCommonTable[R]) Materialized ¶
func (c TransactionCommonTable[R]) Materialized() TransactionCommonTable[R]
Materialized retains the executor requirement. Example: cte.Materialized().
func (TransactionCommonTable[R]) NotMaterialized ¶
func (c TransactionCommonTable[R]) NotMaterialized() TransactionCommonTable[R]
NotMaterialized retains all locks even when PostgreSQL ignores the hint. Example: cte.NotMaterialized().
type TransactionCorrelatedRecord ¶
type TransactionCorrelatedRecord[O, I TransactionScopeType, R any] struct { // contains filtered or unexported fields }
TransactionCorrelatedRecord keeps a complete record bound to its enclosing scope. Example: rows.SelectTransactionCorrelatedRecord(c,rows.TransactionInnerScope(c,scope)).
func ProjectTransactionCorrelated ¶
func ProjectTransactionCorrelated[O, I TransactionScopeType, R any](c TransactionCorrelatedSource[O, I], schema Schema[R], mappings ...Mapping[TransactionCorrelation[O, I], R]) TransactionCorrelatedRecord[O, I, R]
ProjectTransactionCorrelated maps a complete declared record without granting execution. Example: rows.ProjectTransactionCorrelated(c,Totals,rows.MapSelected(Totals.Count,count)).
func SelectTransactionCorrelatedRecord ¶
func SelectTransactionCorrelatedRecord[O, I TransactionScopeType, R any](c TransactionCorrelatedSource[O, I], scope expr.Scope[TransactionCorrelation[O, I], R]) TransactionCorrelatedRecord[O, I, R]
SelectTransactionCorrelatedRecord selects a complete preserved inner model. Example: rows.SelectTransactionCorrelatedRecord(c,rows.TransactionInnerScope(c,rows.TransactionScope(child))).
func (TransactionCorrelatedRecord[O, I, R]) Distinct ¶
func (r TransactionCorrelatedRecord[O, I, R]) Distinct() TransactionCorrelatedRecord[O, I, R]
Distinct retains the correlated result clause. Example: selected.Distinct().
func (TransactionCorrelatedRecord[O, I, R]) DistinctOn ¶
func (r TransactionCorrelatedRecord[O, I, R]) DistinctOn(keys ...expr.GroupKey[TransactionCorrelation[O, I]]) TransactionCorrelatedRecord[O, I, R]
DistinctOn retains the correlated result clause. Example: selected.DistinctOn(clause).
func (TransactionCorrelatedRecord[O, I, R]) DistinctOnValues ¶
func (r TransactionCorrelatedRecord[O, I, R]) DistinctOnValues(keys ...expr.ProjectionKey[TransactionCorrelation[O, I]]) TransactionCorrelatedRecord[O, I, R]
DistinctOnValues retains the correlated result clause. Example: selected.DistinctOnValues(clause).
func (TransactionCorrelatedRecord[O, I, R]) Exists ¶
func (r TransactionCorrelatedRecord[O, I, R]) Exists() expr.Predicate[O]
Exists tests the record within its required outer scope. Example: record.Exists().
func (TransactionCorrelatedRecord[O, I, R]) ForKeyShare ¶
func (q TransactionCorrelatedRecord[O, I, R]) ForKeyShare() TransactionCorrelatedRecord[O, I, R]
ForKeyShare retains this correlated SELECT’s lock without execution. Example: selected.ForKeyShare().
func (TransactionCorrelatedRecord[O, I, R]) ForNoKeyUpdate ¶
func (q TransactionCorrelatedRecord[O, I, R]) ForNoKeyUpdate() TransactionCorrelatedRecord[O, I, R]
ForNoKeyUpdate retains this correlated SELECT’s lock without execution. Example: selected.ForNoKeyUpdate().
func (TransactionCorrelatedRecord[O, I, R]) ForShare ¶
func (q TransactionCorrelatedRecord[O, I, R]) ForShare() TransactionCorrelatedRecord[O, I, R]
ForShare retains this correlated SELECT’s lock without execution. Example: selected.ForShare().
func (TransactionCorrelatedRecord[O, I, R]) ForUpdate ¶
func (q TransactionCorrelatedRecord[O, I, R]) ForUpdate() TransactionCorrelatedRecord[O, I, R]
ForUpdate retains this correlated SELECT’s lock without execution. Example: selected.ForUpdate().
func (TransactionCorrelatedRecord[O, I, R]) GroupBy ¶
func (r TransactionCorrelatedRecord[O, I, R]) GroupBy(keys ...expr.GroupKey[TransactionCorrelation[O, I]]) TransactionCorrelatedRecord[O, I, R]
GroupBy retains the correlated result clause. Example: selected.GroupBy(clause).
func (TransactionCorrelatedRecord[O, I, R]) Having ¶
func (r TransactionCorrelatedRecord[O, I, R]) Having(ps ...expr.HavingPredicate[TransactionCorrelation[O, I]]) TransactionCorrelatedRecord[O, I, R]
Having retains the correlated result clause. Example: selected.Having(clause).
func (TransactionCorrelatedRecord[O, I, R]) Limit ¶
func (r TransactionCorrelatedRecord[O, I, R]) Limit(n int) TransactionCorrelatedRecord[O, I, R]
Limit retains the record's inner limit. Example: record.Limit(1).
func (TransactionCorrelatedRecord[O, I, R]) LockRows ¶
func (q TransactionCorrelatedRecord[O, I, R]) LockRows(cs ...RowLock[TransactionCorrelation[O, I]]) TransactionCorrelatedRecord[O, I, R]
LockRows sets independent preserved-input locks. Example: selected.LockRows(rows.ShareLock(target)).
func (TransactionCorrelatedRecord[O, I, R]) NoWait ¶
func (q TransactionCorrelatedRecord[O, I, R]) NoWait() TransactionCorrelatedRecord[O, I, R]
NoWait derives an existing lock policy. Example: selected.ForUpdate().NoWait().
func (TransactionCorrelatedRecord[O, I, R]) Of ¶
func (q TransactionCorrelatedRecord[O, I, R]) Of(ts ...LockTarget[TransactionCorrelation[O, I]]) TransactionCorrelatedRecord[O, I, R]
Of narrows one existing lock to preserved scopes. Example: selected.ForUpdate().Of(target).
func (TransactionCorrelatedRecord[O, I, R]) Offset ¶
func (r TransactionCorrelatedRecord[O, I, R]) Offset(n int) TransactionCorrelatedRecord[O, I, R]
Offset retains the record's inner offset. Example: record.Offset(1).
func (TransactionCorrelatedRecord[O, I, R]) OrderBy ¶
func (r TransactionCorrelatedRecord[O, I, R]) OrderBy(os ...expr.ProjectionOrder[TransactionCorrelation[O, I]]) TransactionCorrelatedRecord[O, I, R]
OrderBy appends inner result ordering. Example: record.OrderBy(expr.Desc(childID)).
func (TransactionCorrelatedRecord[O, I, R]) SkipLocked ¶
func (q TransactionCorrelatedRecord[O, I, R]) SkipLocked() TransactionCorrelatedRecord[O, I, R]
SkipLocked derives an existing lock policy. Example: selected.ForUpdate().SkipLocked().
func (TransactionCorrelatedRecord[O, I, R]) Wait ¶
func (q TransactionCorrelatedRecord[O, I, R]) Wait() TransactionCorrelatedRecord[O, I, R]
Wait derives an existing lock policy. Example: selected.ForUpdate().Wait().
func (TransactionCorrelatedRecord[O, I, R]) Where ¶
func (r TransactionCorrelatedRecord[O, I, R]) Where(ps ...expr.Predicate[TransactionCorrelation[O, I]]) TransactionCorrelatedRecord[O, I, R]
Where appends lifted inner predicates. Example: record.Where(expr.Equal(childID,parentID)).
type TransactionCorrelatedScalar ¶
type TransactionCorrelatedScalar[O, I TransactionScopeType, V any] struct { // contains filtered or unexported fields }
TransactionCorrelatedScalar keeps one value bound to its enclosing scope. Example: rows.SelectTransactionCorrelatedScalar(c,expr.AsSelected(expr.Row(childID))).
func SelectTransactionCorrelatedScalar ¶
func SelectTransactionCorrelatedScalar[O, I TransactionScopeType, V any](c TransactionCorrelatedSource[O, I], v expr.Selected[TransactionCorrelation[O, I], V]) TransactionCorrelatedScalar[O, I, V]
SelectTransactionCorrelatedScalar selects one lifted value without an execution escape. Example: rows.SelectTransactionCorrelatedScalar(c,expr.AsSelected(expr.Row(childID))).
func (TransactionCorrelatedScalar[O, I, V]) Exists ¶
func (s TransactionCorrelatedScalar[O, I, V]) Exists() expr.Predicate[O]
Exists tests the selected result in the enclosing scope. Example: selected.Limit(0).Exists().
func (TransactionCorrelatedScalar[O, I, V]) ForKeyShare ¶
func (q TransactionCorrelatedScalar[O, I, V]) ForKeyShare() TransactionCorrelatedScalar[O, I, V]
ForKeyShare retains this correlated SELECT’s lock without execution. Example: selected.ForKeyShare().
func (TransactionCorrelatedScalar[O, I, V]) ForNoKeyUpdate ¶
func (q TransactionCorrelatedScalar[O, I, V]) ForNoKeyUpdate() TransactionCorrelatedScalar[O, I, V]
ForNoKeyUpdate retains this correlated SELECT’s lock without execution. Example: selected.ForNoKeyUpdate().
func (TransactionCorrelatedScalar[O, I, V]) ForShare ¶
func (q TransactionCorrelatedScalar[O, I, V]) ForShare() TransactionCorrelatedScalar[O, I, V]
ForShare retains this correlated SELECT’s lock without execution. Example: selected.ForShare().
func (TransactionCorrelatedScalar[O, I, V]) ForUpdate ¶
func (q TransactionCorrelatedScalar[O, I, V]) ForUpdate() TransactionCorrelatedScalar[O, I, V]
ForUpdate retains this correlated SELECT’s lock without execution. Example: selected.ForUpdate().
func (TransactionCorrelatedScalar[O, I, V]) GroupBy ¶
func (r TransactionCorrelatedScalar[O, I, V]) GroupBy(keys ...expr.GroupKey[TransactionCorrelation[O, I]]) TransactionCorrelatedScalar[O, I, V]
GroupBy retains the correlated result clause. Example: selected.GroupBy(clause).
func (TransactionCorrelatedScalar[O, I, V]) Having ¶
func (r TransactionCorrelatedScalar[O, I, V]) Having(ps ...expr.HavingPredicate[TransactionCorrelation[O, I]]) TransactionCorrelatedScalar[O, I, V]
Having retains the correlated result clause. Example: selected.Having(clause).
func (TransactionCorrelatedScalar[O, I, V]) Limit ¶
func (s TransactionCorrelatedScalar[O, I, V]) Limit(n int) TransactionCorrelatedScalar[O, I, V]
Limit retains an explicit inner limit. Example: selected.Limit(1).
func (TransactionCorrelatedScalar[O, I, V]) LockRows ¶
func (q TransactionCorrelatedScalar[O, I, V]) LockRows(cs ...RowLock[TransactionCorrelation[O, I]]) TransactionCorrelatedScalar[O, I, V]
LockRows sets independent preserved-input locks. Example: selected.LockRows(rows.ShareLock(target)).
func (TransactionCorrelatedScalar[O, I, V]) NoWait ¶
func (q TransactionCorrelatedScalar[O, I, V]) NoWait() TransactionCorrelatedScalar[O, I, V]
NoWait derives an existing lock policy. Example: selected.ForUpdate().NoWait().
func (TransactionCorrelatedScalar[O, I, V]) Of ¶
func (q TransactionCorrelatedScalar[O, I, V]) Of(ts ...LockTarget[TransactionCorrelation[O, I]]) TransactionCorrelatedScalar[O, I, V]
Of narrows one existing lock to preserved scopes. Example: selected.ForUpdate().Of(target).
func (TransactionCorrelatedScalar[O, I, V]) Offset ¶
func (s TransactionCorrelatedScalar[O, I, V]) Offset(n int) TransactionCorrelatedScalar[O, I, V]
Offset retains an explicit inner offset. Example: selected.Offset(1).
func (TransactionCorrelatedScalar[O, I, V]) OrderBy ¶
func (s TransactionCorrelatedScalar[O, I, V]) OrderBy(os ...expr.ProjectionOrder[TransactionCorrelation[O, I]]) TransactionCorrelatedScalar[O, I, V]
OrderBy appends inner ordering. Example: selected.OrderBy(expr.Desc(childID)).
func (TransactionCorrelatedScalar[O, I, V]) SkipLocked ¶
func (q TransactionCorrelatedScalar[O, I, V]) SkipLocked() TransactionCorrelatedScalar[O, I, V]
SkipLocked derives an existing lock policy. Example: selected.ForUpdate().SkipLocked().
func (TransactionCorrelatedScalar[O, I, V]) Wait ¶
func (q TransactionCorrelatedScalar[O, I, V]) Wait() TransactionCorrelatedScalar[O, I, V]
Wait derives an existing lock policy. Example: selected.ForUpdate().Wait().
func (TransactionCorrelatedScalar[O, I, V]) Where ¶
func (s TransactionCorrelatedScalar[O, I, V]) Where(ps ...expr.Predicate[TransactionCorrelation[O, I]]) TransactionCorrelatedScalar[O, I, V]
Where filters the inner SELECT with lifted predicates. Example: selected.Where(expr.Equal(childID,parentID)).
type TransactionCorrelatedSource ¶
type TransactionCorrelatedSource[O, I TransactionScopeType] struct { // contains filtered or unexported fields }
TransactionCorrelatedSource retains its enclosing scope and cannot execute independently. Example: rows.TransactionCorrelate(parent,child).
func TransactionCorrelate ¶
func TransactionCorrelate[O, I TransactionScopeType](outer TransactionScopeSource[O], inner TransactionSelectionSource[I]) TransactionCorrelatedSource[O, I]
TransactionCorrelate makes only the supplied enclosing scopes visible inside inner. Example: rows.TransactionCorrelate(parent,child).
func (TransactionCorrelatedSource[O, I]) Exists ¶
func (c TransactionCorrelatedSource[O, I]) Exists() expr.Predicate[O]
Exists returns a predicate in the enclosing scope. Example: expr.Where(users,c.Exists()).
func (TransactionCorrelatedSource[O, I]) Limit ¶
func (c TransactionCorrelatedSource[O, I]) Limit(n int) TransactionCorrelatedSource[O, I]
Limit retains an inner result limit. Example: c.Limit(1).
func (TransactionCorrelatedSource[O, I]) Offset ¶
func (c TransactionCorrelatedSource[O, I]) Offset(n int) TransactionCorrelatedSource[O, I]
Offset retains an inner result offset. Example: c.Offset(1).
func (TransactionCorrelatedSource[O, I]) OrderBy ¶
func (c TransactionCorrelatedSource[O, I]) OrderBy(os ...expr.Order[TransactionCorrelation[O, I]]) TransactionCorrelatedSource[O, I]
OrderBy appends scoped ordering. Example: c.OrderBy(expr.Desc(childID)).
func (TransactionCorrelatedSource[O, I]) Where ¶
func (c TransactionCorrelatedSource[O, I]) Where(ps ...expr.Predicate[TransactionCorrelation[O, I]]) TransactionCorrelatedSource[O, I]
Where appends predicates in the lifted correlation scope. Example: c.Where(expr.Equal(childID,parentID)).
type TransactionCorrelation ¶
type TransactionCorrelation[O, I TransactionScopeType] struct { // contains filtered or unexported fields }
TransactionCorrelation identifies an explicit enclosing/inner scope pair. Example: TransactionCorrelation[TransactionAlias[parent,User],TransactionAlias[child,Order]].
type TransactionCross ¶
type TransactionCross[L, R TransactionScopeType] struct { // contains filtered or unexported fields }
TransactionCross identifies a transaction-only cross join scope. Example: rows.TransactionCross[L,R].
type TransactionCrossJoined ¶
type TransactionCrossJoined[L, R TransactionScopeType] struct { // contains filtered or unexported fields }
TransactionCrossJoined retains both input boundaries and their nested locks. Example: rows.TransactionCrossJoin(left,right).
func TransactionCrossJoin ¶
func TransactionCrossJoin[L, R TransactionScopeType](left TransactionJoinSource[L], right TransactionJoinTable[R]) TransactionCrossJoined[L, R]
TransactionCrossJoin preserves filters, windows and locks at each alias boundary. Example: rows.TransactionCrossJoin(left,right).
func TransactionCrossJoinLateral ¶
func TransactionCrossJoinLateral[L TransactionScopeType, A, R any](left TransactionJoinSource[L], right TransactionLateralSource[A, L, R]) TransactionCrossJoined[L, TransactionAlias[A, R]]
TransactionCrossJoinLateral evaluates right for each preceding left row. Example: rows.TransactionCrossJoinLateral(parent,latest).
type TransactionFull ¶
type TransactionFull[L, R TransactionScopeType] struct { // contains filtered or unexported fields }
TransactionFull identifies a transaction-only full join scope. Example: rows.TransactionFull[L,R].
type TransactionFullJoined ¶
type TransactionFullJoined[L, R TransactionScopeType] struct { // contains filtered or unexported fields }
TransactionFullJoined retains both input boundaries and their nested locks. Example: rows.TransactionFullJoin(left,right,on).
func TransactionFullJoin ¶
func TransactionFullJoin[L, R TransactionScopeType](left TransactionJoinSource[L], right TransactionJoinTable[R], on JoinOn[L, R]) TransactionFullJoined[L, R]
TransactionFullJoin preserves filters, windows and locks at each alias boundary. Example: rows.TransactionFullJoin(left,right,on).
type TransactionInner ¶
type TransactionInner[L, R TransactionScopeType] struct { // contains filtered or unexported fields }
TransactionInner identifies a transaction-only inner join scope. Example: rows.TransactionInner[L,R].
type TransactionInnerJoined ¶
type TransactionInnerJoined[L, R TransactionScopeType] struct { // contains filtered or unexported fields }
TransactionInnerJoined retains both input boundaries and their nested locks. Example: rows.TransactionInnerJoin(left,right,on).
func TransactionInnerJoin ¶
func TransactionInnerJoin[L, R TransactionScopeType](left TransactionJoinSource[L], right TransactionJoinTable[R], on JoinOn[L, R]) TransactionInnerJoined[L, R]
TransactionInnerJoin preserves filters, windows and locks at each alias boundary. Example: rows.TransactionInnerJoin(left,right,on).
func TransactionInnerJoinLateral ¶
func TransactionInnerJoinLateral[L TransactionScopeType, A, R any](left TransactionJoinSource[L], right TransactionLateralSource[A, L, R], on ...JoinOn[L, TransactionAlias[A, R]]) TransactionInnerJoined[L, TransactionAlias[A, R]]
TransactionInnerJoinLateral combines optional typed ON conditions; no conditions means ON TRUE. Example: rows.TransactionInnerJoinLateral(parent,latest).
type TransactionJoinSource ¶
type TransactionJoinSource[S TransactionScopeType] interface{ TransactionSelectionSource[S] }
TransactionJoinSource retains transaction scope and complete alias boundaries. Example: rows.TransactionLeftJoin(users,orders,on).
type TransactionJoinTable ¶
type TransactionJoinTable[S TransactionScopeType] interface { TransactionJoinSource[S] // contains filtered or unexported methods }
TransactionJoinTable admits a single transaction alias on a join's right side. Example: rows.TransactionInnerJoin(users,orders,on).
type TransactionLateralSource ¶
type TransactionLateralSource[A any, O TransactionScopeType, R any] struct { // contains filtered or unexported fields }
TransactionLateralSource retains its required preceding scope without ordinary source methods. Example: rows.AsTransactionLateral[latest](record,"latest").
func AsTransactionLateral ¶
func AsTransactionLateral[A any, O, I TransactionScopeType, R any](record TransactionCorrelatedRecord[O, I, R], alias string) TransactionLateralSource[A, O, R]
AsTransactionLateral always creates a derived SELECT for a correlated record. Example: rows.AsTransactionLateral[latest](record.Limit(1),"latest").
type TransactionLeft ¶
type TransactionLeft[L, R TransactionScopeType] struct { // contains filtered or unexported fields }
TransactionLeft identifies a transaction-only left join scope. Example: rows.TransactionLeft[L,R].
type TransactionLeftJoined ¶
type TransactionLeftJoined[L, R TransactionScopeType] struct { // contains filtered or unexported fields }
TransactionLeftJoined retains both input boundaries and their nested locks. Example: rows.TransactionLeftJoin(left,right,on).
func TransactionLeftJoin ¶
func TransactionLeftJoin[L, R TransactionScopeType](left TransactionJoinSource[L], right TransactionJoinTable[R], on JoinOn[L, R]) TransactionLeftJoined[L, R]
TransactionLeftJoin preserves filters, windows and locks at each alias boundary. Example: rows.TransactionLeftJoin(left,right,on).
func TransactionLeftJoinLateral ¶
func TransactionLeftJoinLateral[L TransactionScopeType, A, R any](left TransactionJoinSource[L], right TransactionLateralSource[A, L, R], on ...JoinOn[L, TransactionAlias[A, R]]) TransactionLeftJoined[L, TransactionAlias[A, R]]
TransactionLeftJoinLateral preserves unmatched parents and widens the right scope. Example: rows.TransactionLeftJoinLateral(parent,latest).
type TransactionRead ¶
type TransactionRead[S, R any] struct { // contains filtered or unexported fields }
TransactionRead returns a complete result only through a transaction executor. Example: selected.All(ctx,tx).
func SelectTransaction ¶
func SelectTransaction[S, R any](source TransactionSelectionSource[S], schema Schema[R], mappings ...Mapping[S, R]) TransactionRead[S, R]
SelectTransaction reuses complete projection mapping and declaration validation. Example: rows.SelectTransaction(source,Summary,rows.Map(Summary.ID,id)).
func SelectTransactionRecord ¶
func SelectTransactionRecord[S, R any](source TransactionSelectionSource[S], scope expr.Scope[S, R]) TransactionRead[S, R]
SelectTransactionRecord selects every field from a preserved transaction scope. Example: rows.SelectTransactionRecord(source,rows.TransactionScope(source)).
func (TransactionRead[S, R]) All ¶
All requires the caller's transaction and discards every partial result on error. Example: selected.All(ctx,tx).
func (TransactionRead[S, R]) Count ¶
Count counts the selected window, preserving nested locks. Example: selected.Count(ctx,executor).
func (TransactionRead[S, R]) Exists ¶
Exists tests the selected window. Example: selected.Exists(ctx,executor).
func (TransactionRead[S, R]) First ¶
func (q TransactionRead[S, R]) First(ctx context.Context, ex *database.Tx) (value.Optional[R], error)
First returns an omitted optional for an empty result. Example: selected.First(ctx,executor).
func (TransactionRead[S, R]) Limit ¶
func (q TransactionRead[S, R]) Limit(n int) TransactionRead[S, R]
Limit retains the transaction selection's window. Example: selected.Limit(10).
func (TransactionRead[S, R]) Offset ¶
func (q TransactionRead[S, R]) Offset(n int) TransactionRead[S, R]
Offset retains the transaction selection's offset. Example: selected.Offset(10).
func (TransactionRead[S, R]) OrderBy ¶
func (q TransactionRead[S, R]) OrderBy(os ...expr.ProjectionOrder[S]) TransactionRead[S, R]
OrderBy orders the transaction selection. Example: selected.OrderBy(expr.Asc(id)).
func (TransactionRead[S, R]) RequireFirst ¶
RequireFirst reports database.NotFound for an empty result. Example: selected.RequireFirst(ctx,executor).
func (TransactionRead[S, R]) Where ¶
func (q TransactionRead[S, R]) Where(ps ...expr.Predicate[S]) TransactionRead[S, R]
Where retains transaction input ownership. Example: selected.Where(expr.Gt(id, 0)).
type TransactionRecord ¶
type TransactionRecord[R any] struct { // contains filtered or unexported fields }
TransactionRecord explicitly retains the transaction requirement, without execution. Example: rows.TransactionOf(rows.ModelRecord(Users.Query())).
func LockedRecord ¶
func LockedRecord[M any](q orm.LockedQuery[M]) TransactionRecord[M]
LockedRecord retains all model locks and their wait policy inside the source. Example: rows.LockedRecord(orm.Lock(Users.Query()).SkipLocked()).
func TransactionOf ¶
func TransactionOf[R any](source RecordSource[R]) TransactionRecord[R]
TransactionOf lifts an ordinary complete record into transaction composition. Example: rows.TransactionOf(rows.RecordOf(report)).
type TransactionRecordSource ¶
type TransactionRecordSource[R any] interface { // contains filtered or unexported methods }
TransactionRecordSource carries complete results and nested locks in one getter. Example: rows.AsTransaction[tag](rows.LockedRecord(orm.Lock(q)),"claim").
type TransactionRight ¶
type TransactionRight[L, R TransactionScopeType] struct { // contains filtered or unexported fields }
TransactionRight identifies a transaction-only right join scope. Example: rows.TransactionRight[L,R].
type TransactionRightJoined ¶
type TransactionRightJoined[L, R TransactionScopeType] struct { // contains filtered or unexported fields }
TransactionRightJoined retains both input boundaries and their nested locks. Example: rows.TransactionRightJoin(left,right,on).
func TransactionRightJoin ¶
func TransactionRightJoin[L, R TransactionScopeType](left TransactionJoinSource[L], right TransactionJoinTable[R], on JoinOn[L, R]) TransactionRightJoined[L, R]
TransactionRightJoin preserves filters, windows and locks at each alias boundary. Example: rows.TransactionRightJoin(left,right,on).
type TransactionScalar ¶
type TransactionScalar[S TransactionScopeType, V any] struct { // contains filtered or unexported fields }
TransactionScalar retains a selected value and optional locks for composition only. Example: rows.TransactionScalarOf(selected).ForUpdate().SkipLocked().
func TransactionScalarOf ¶
func TransactionScalarOf[S TransactionScopeType, V any](q TransactionValue[S, V]) TransactionScalar[S, V]
TransactionScalarOf retains codecs when adding locks to scalar subqueries. Example: rows.TransactionScalarOf(rows.SelectTransactionValue(source,expr.AsSelected(expr.Row(id)))).ForShare().
func (TransactionScalar[S, V]) ForKeyShare ¶
func (q TransactionScalar[S, V]) ForKeyShare() TransactionScalar[S, V]
ForKeyShare retains a scalar SELECT lock for composition. Example: rows.TransactionScalarOf(selected).ForKeyShare().
func (TransactionScalar[S, V]) ForNoKeyUpdate ¶
func (q TransactionScalar[S, V]) ForNoKeyUpdate() TransactionScalar[S, V]
ForNoKeyUpdate retains a scalar SELECT lock for composition. Example: rows.TransactionScalarOf(selected).ForNoKeyUpdate().
func (TransactionScalar[S, V]) ForShare ¶
func (q TransactionScalar[S, V]) ForShare() TransactionScalar[S, V]
ForShare retains a scalar SELECT lock for composition. Example: rows.TransactionScalarOf(selected).ForShare().
func (TransactionScalar[S, V]) ForUpdate ¶
func (q TransactionScalar[S, V]) ForUpdate() TransactionScalar[S, V]
ForUpdate retains a scalar SELECT lock for composition. Example: rows.TransactionScalarOf(selected).ForUpdate().
func (TransactionScalar[S, V]) LockRows ¶
func (q TransactionScalar[S, V]) LockRows(cs ...RowLock[S]) TransactionScalar[S, V]
LockRows applies independent locks to a scalar subquery. Example: selected.LockRows(rows.ShareLock(target)).
func (TransactionScalar[S, V]) NoWait ¶
func (q TransactionScalar[S, V]) NoWait() TransactionScalar[S, V]
NoWait derives an existing scalar lock policy. Example: selected.ForUpdate().NoWait().
func (TransactionScalar[S, V]) Of ¶
func (q TransactionScalar[S, V]) Of(ts ...LockTarget[S]) TransactionScalar[S, V]
Of narrows one scalar lock to preserved inputs. Example: selected.ForUpdate().Of(target).
func (TransactionScalar[S, V]) SkipLocked ¶
func (q TransactionScalar[S, V]) SkipLocked() TransactionScalar[S, V]
SkipLocked derives an existing scalar lock policy. Example: selected.ForUpdate().SkipLocked().
func (TransactionScalar[S, V]) Wait ¶
func (q TransactionScalar[S, V]) Wait() TransactionScalar[S, V]
Wait derives an existing scalar lock policy. Example: selected.ForUpdate().Wait().
type TransactionScopeSource ¶
type TransactionScopeSource[S TransactionScopeType] interface { // contains filtered or unexported methods }
TransactionScopeSource exposes enclosing visibility without granting execution. Example: rows.TransactionCorrelate(parent,child).
type TransactionScopeType ¶
type TransactionScopeType interface {
// contains filtered or unexported methods
}
TransactionScopeType identifies scopes whose composition requires a transaction. Example: rows.TransactionInner[rows.TransactionAlias[a,User],rows.TransactionAlias[b,Order]].
type TransactionSelectionSource ¶
type TransactionSelectionSource[S any] interface { // contains filtered or unexported methods }
TransactionSelectionSource exposes only transaction-required input scopes. Example: rows.SelectTransaction(source,Summary,mappings...).
type TransactionSubquery ¶
type TransactionSubquery struct {
// contains filtered or unexported fields
}
TransactionSubquery explicitly lifts an ordinary SELECT for transaction composition. Example: rows.TransactionSubqueryOf(rows.From(Users.Query())).
func TransactionSubqueryOf ¶
func TransactionSubqueryOf[S any](source SelectionSource[S]) TransactionSubquery
TransactionSubqueryOf preserves all clauses of an ordinary SELECT. Example: rows.TransactionSubqueryOf(rows.FromRows(report)).
type TransactionSubquerySource ¶
type TransactionSubquerySource interface {
// contains filtered or unexported methods
}
TransactionSubquerySource retains a SELECT without permitting ordinary execution. Example: rows.TransactionExistsQuery(parent,child).
type TransactionValue ¶
type TransactionValue[S, V any] struct { // contains filtered or unexported fields }
TransactionValue is a scalar result executable only through a transaction. Example: selected.First(ctx,tx).
func SelectTransactionValue ¶
func SelectTransactionValue[S, V any](source TransactionSelectionSource[S], selected expr.Selected[S, V]) TransactionValue[S, V]
SelectTransactionValue retains exact scalar codecs and the transaction requirement. Example: rows.SelectTransactionValue(source,expr.AsSelected(expr.Row(id))).All(ctx,tx).
func (TransactionValue[S, V]) All ¶
All collects complete results or discards the entire batch. Example: selected.All(ctx,executor).
func (TransactionValue[S, V]) Count ¶
Count counts the selected window, preserving nested locks. Example: selected.Count(ctx,executor).
func (TransactionValue[S, V]) Exists ¶
Exists tests the selected window. Example: selected.Exists(ctx,executor).
func (TransactionValue[S, V]) First ¶
func (q TransactionValue[S, V]) First(ctx context.Context, ex *database.Tx) (value.Optional[V], error)
First returns an omitted optional for an empty result. Example: selected.First(ctx,executor).
func (TransactionValue[S, V]) Limit ¶
func (q TransactionValue[S, V]) Limit(n int) TransactionValue[S, V]
Limit bounds selected rows. Example: selected.Limit(10).
func (TransactionValue[S, V]) Offset ¶
func (q TransactionValue[S, V]) Offset(n int) TransactionValue[S, V]
Offset skips selected rows. Example: selected.Offset(10).
func (TransactionValue[S, V]) OrderBy ¶
func (q TransactionValue[S, V]) OrderBy(os ...expr.ProjectionOrder[S]) TransactionValue[S, V]
OrderBy retains explicit result ordering. Example: selected.OrderBy(expr.Asc(id)).
func (TransactionValue[S, V]) RequireFirst ¶
RequireFirst reports database.NotFound for an empty result. Example: selected.RequireFirst(ctx,executor).
func (TransactionValue[S, V]) Where ¶
func (q TransactionValue[S, V]) Where(ps ...expr.Predicate[S]) TransactionValue[S, V]
Where filters the retained input scope. Example: selected.Where(expr.Ne(id, zero)).
type TransactionValueInput ¶
type TransactionValueInput[V any] struct { // contains filtered or unexported fields }
TransactionValueInput lifts an ordinary single-column source without execution. Example: rows.TransactionValueOf(rows.Values(selected)).
func TransactionValueOf ¶
func TransactionValueOf[V any](source ValueSource[V]) TransactionValueInput[V]
TransactionValueOf retains an ordinary scalar's codec, clauses and sensitivity. Example: rows.TransactionInQuery(id,rows.TransactionValueOf(rows.Values(selected))).
type TransactionValueSource ¶
type TransactionValueSource[V any] interface { // contains filtered or unexported methods }
TransactionValueSource retains a single value's exact codec and executor requirement. Example: expr.AsSelected(rows.TransactionScalarRowQuery(parent, selected)).
type ValueCursorQuery ¶
type ValueCursorQuery[V any] struct { // contains filtered or unexported fields }
ValueCursorQuery pages one exact scalar type, including nullable results. Example: rows.ValueCursorFor(rows.Values(selected)).
func ValueCursorFor ¶
func ValueCursorFor[V any](source ValueSource[V]) ValueCursorQuery[V]
ValueCursorFor preserves duplicates; UniqueBy is the caller's uniqueness assertion. Example: rows.ValueCursorFor(rows.UnionValues(a,b)).
func (ValueCursorQuery[V]) OrderBy ¶
func (q ValueCursorQuery[V]) OrderBy(os ...expr.ProjectionOrder[CursorScope[V]]) ValueCursorQuery[V]
OrderBy orders plain output fields. Example: c.OrderBy(expr.Asc(id)).
func (ValueCursorQuery[V]) Paginate ¶
func (q ValueCursorQuery[V]) Paginate(ctx context.Context, ex database.Executor, r orm.CursorRequest[V]) (orm.CursorPage[V], error)
Paginate reads one lookahead row; tokens are positions, not authorization. Example: c.Paginate(ctx,db,orm.CursorRequest[V]{Size:20}).
func (ValueCursorQuery[V]) Scope ¶
func (q ValueCursorQuery[V]) Scope() expr.Scope[CursorScope[V], V]
Scope exposes completed output fields. Example: expr.At(c.Scope(), orm.KeyExpr(Users.ID)).
func (ValueCursorQuery[V]) UniqueBy ¶
func (q ValueCursorQuery[V]) UniqueBy(keys ...expr.GroupKey[CursorScope[V]]) ValueCursorQuery[V]
UniqueBy asserts result uniqueness and appends missing identity orders. Example: c.UniqueBy(expr.Group(id)).
func (ValueCursorQuery[V]) Value ¶
func (q ValueCursorQuery[V]) Value() expr.RowExpression[CursorScope[V], V]
Value exposes the completed scalar for filtering and ordering. Example: expr.Asc(c.Value()).
func (ValueCursorQuery[V]) Where ¶
func (q ValueCursorQuery[V]) Where(ps ...expr.Predicate[CursorScope[V]]) ValueCursorQuery[V]
Where filters completed rows. Example: c.Where(expr.Ne(id, zero)).
type ValueRecord ¶
type ValueRecord[V any] struct { // contains filtered or unexported fields }
ValueRecord adapts one selected scalar without widening its type or granting record access. Example: rows.Values(rows.SelectScalar(source,expr.AsSelected(expr.Row(id)))).
func Values ¶
func Values[S, V any](q Scalar[S, V]) ValueRecord[V]
Values adapts a typed scalar selection for value set operations. Example: rows.Values(rows.SelectScalar(rows.From(Users.Query()),expr.AsSelected(expr.Row(expr.Value(orm.KeyExpr(Users.ID)))))).
type ValueSetQuery ¶
type ValueSetQuery[V any] struct { // contains filtered or unexported fields }
ValueSetQuery retains one exact scalar type in the combined output scope. Example: rows.ReadValues(values.Where(expr.Ne(values.Value(), id))).All(ctx,db).
func DistinctOnValueSet ¶
func DistinctOnValueSet[V any](q ValueSetQuery[V], keys ...expr.ProjectionKey[Set[V]]) ValueSetQuery[V]
DistinctOnValueSet selects one combined value per selected-key combination. Keys and ordering belong to the combined output scope, not either input SELECT. Example: rows.DistinctOnValueSet(values, expr.Key(expr.AsSelected(expr.Row(values.Value())))).
func DistinctValues ¶
func DistinctValues[V any](q ValueSetQuery[V]) ValueSetQuery[V]
DistinctValues removes duplicate combined values with their original codec. Example: rows.DistinctValues(rows.UnionAllValues(left, right)).
func ExceptAllValues ¶
func ExceptAllValues[V any](a, b ValueSource[V]) ValueSetQuery[V]
ExceptAllValues subtracts right multiplicities from the left with an exact scalar result type. Example: rows.ExceptAllValues(a,b).
func ExceptValues ¶
func ExceptValues[V any](a, b ValueSource[V]) ValueSetQuery[V]
ExceptValues keeps distinct left rows absent on the right with an exact scalar result type. Example: rows.ExceptValues(a,b).
func IntersectAllValues ¶
func IntersectAllValues[V any](a, b ValueSource[V]) ValueSetQuery[V]
IntersectAllValues keeps the smaller shared multiplicity with an exact scalar result type. Example: rows.IntersectAllValues(a,b).
func IntersectValues ¶
func IntersectValues[V any](a, b ValueSource[V]) ValueSetQuery[V]
IntersectValues keeps distinct rows present in both inputs with an exact scalar result type. Example: rows.IntersectValues(a,b).
func UnionAllValues ¶
func UnionAllValues[V any](a, b ValueSource[V]) ValueSetQuery[V]
UnionAllValues retains duplicate rows with an exact scalar result type. Example: rows.UnionAllValues(a,b).
func UnionValues ¶
func UnionValues[V any](a, b ValueSource[V]) ValueSetQuery[V]
UnionValues removes duplicate rows with an exact scalar result type. Example: rows.UnionValues(a,b).
func (ValueSetQuery[V]) Limit ¶
func (q ValueSetQuery[V]) Limit(n int) ValueSetQuery[V]
Limit bounds combined values. Example: combined.Limit(10).
func (ValueSetQuery[V]) Offset ¶
func (q ValueSetQuery[V]) Offset(n int) ValueSetQuery[V]
Offset skips combined values. Example: combined.Offset(10).
func (ValueSetQuery[V]) OrderBy ¶
func (q ValueSetQuery[V]) OrderBy(os ...expr.ProjectionOrder[Set[V]]) ValueSetQuery[V]
OrderBy orders combined values. Example: combined.OrderBy(expr.Asc(combined.Value())).
func (ValueSetQuery[V]) Value ¶
func (q ValueSetQuery[V]) Value() expr.RowExpression[Set[V], V]
Value exposes the combined scalar with its original codec and nullability. Example: expr.AsSelected(expr.Row(values.Value())).
func (ValueSetQuery[V]) Where ¶
func (q ValueSetQuery[V]) Where(ps ...expr.Predicate[Set[V]]) ValueSetQuery[V]
Where filters combined values. Example: combined.Where(expr.Eq(combined.Value(), v)).
type ValueSource ¶
type ValueSource[V any] interface { // contains filtered or unexported methods }
ValueSource retains exact scalar types across set inputs. Example: rows.UnionValues(a,b).
Source Files
¶
- annotated.go
- clauses.go
- conflict.go
- constructors.go
- correlated_clauses.go
- correlated_record.go
- correlated_scalar.go
- correlation.go
- correlation_source.go
- cte.go
- cursor_terminal.go
- declaration.go
- explain.go
- join.go
- join_condition.go
- lateral.go
- outer_join.go
- projection.go
- raw.go
- read.go
- read_terminal.go
- record.go
- record_clauses.go
- recursive_cte.go
- result_cursor.go
- result_lock.go
- result_read.go
- scalar_clauses.go
- scoped_field.go
- set.go
- set_operations.go
- source_write.go
- subquery.go
- transaction_correlated_lock.go
- transaction_correlated_record.go
- transaction_correlated_scalar.go
- transaction_correlation.go
- transaction_join.go
- transaction_lateral.go
- transaction_record.go
- transaction_subquery.go
- value_set.go