Documentation ¶
Index ¶
- func MapExpressionToField(e impls.Expression, targetRelationName string, proj ProjectedExpression) impls.Expression
- func MapFieldToExpression(e impls.Expression, field fields.Field, target impls.Expression) impls.Expression
- type AliasedTable
- type ProjectedExpression
- type Projection
- func (p *Projection) Aliases() []ProjectedExpression
- func (p *Projection) DeprojectExpression(expression impls.Expression) impls.Expression
- func (p *Projection) Fields() []fields.Field
- func (p *Projection) Optimize(ctx impls.OptimizationContext)
- func (p *Projection) ProjectExpression(expression impls.Expression) impls.Expression
- func (p *Projection) String() string
- type ProjectionExpression
- func NewAliasedExpression(expression impls.Expression, alias string) ProjectionExpression
- func NewAliasedExpressionFromField(field fields.Field) ProjectionExpression
- func NewTableWildcardProjectionExpression(relationName string) ProjectionExpression
- func NewWildcardProjectionExpression() ProjectionExpression
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MapExpressionToField ¶
func MapExpressionToField(e impls.Expression, targetRelationName string, proj ProjectedExpression) impls.Expression
func MapFieldToExpression ¶
func MapFieldToExpression(e impls.Expression, field fields.Field, target impls.Expression) impls.Expression
Types ¶
type AliasedTable ¶
type ProjectedExpression ¶
type ProjectedExpression struct { Expression impls.Expression Alias string }
func ExpandProjection ¶
func ExpandProjection(fields []fields.Field, expressions []ProjectionExpression, aliasedTables ...AliasedTable) ([]ProjectedExpression, error)
func NewProjectedExpression ¶
func NewProjectedExpression(expression impls.Expression, alias string) ProjectedExpression
func NewProjectedExpressionFromField ¶
func NewProjectedExpressionFromField(field fields.Field) ProjectedExpression
func (ProjectedExpression) String ¶
func (p ProjectedExpression) String() string
type Projection ¶
type Projection struct {
// contains filtered or unexported fields
}
func NewProjectionFromProjectedExpressions ¶
func NewProjectionFromProjectedExpressions( targetRelationName string, projectedExpressions []ProjectedExpression, ) (*Projection, error)
func NewProjectionFromProjectionExpressions ¶
func NewProjectionFromProjectionExpressions( targetRelationName string, relationFields []fields.Field, projectionExpressions []ProjectionExpression, aliasedTables ...AliasedTable, ) (*Projection, error)
func (*Projection) Aliases ¶
func (p *Projection) Aliases() []ProjectedExpression
func (*Projection) DeprojectExpression ¶
func (p *Projection) DeprojectExpression(expression impls.Expression) impls.Expression
func (*Projection) Fields ¶
func (p *Projection) Fields() []fields.Field
func (*Projection) Optimize ¶
func (p *Projection) Optimize(ctx impls.OptimizationContext)
func (*Projection) ProjectExpression ¶
func (p *Projection) ProjectExpression(expression impls.Expression) impls.Expression
func (*Projection) String ¶
func (p *Projection) String() string
type ProjectionExpression ¶
type ProjectionExpression interface {
Expand(fields []fields.Field, aliasedTables ...AliasedTable) ([]ProjectedExpression, error)
}
func NewAliasedExpression ¶
func NewAliasedExpression(expression impls.Expression, alias string) ProjectionExpression
func NewAliasedExpressionFromField ¶
func NewAliasedExpressionFromField(field fields.Field) ProjectionExpression
func NewTableWildcardProjectionExpression ¶
func NewTableWildcardProjectionExpression(relationName string) ProjectionExpression
func NewWildcardProjectionExpression ¶
func NewWildcardProjectionExpression() ProjectionExpression
Click to show internal directories.
Click to hide internal directories.