fork github.com/doug-martin
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
package exp
|
||||
|
||||
type (
|
||||
lateral struct {
|
||||
table AppendableExpression
|
||||
}
|
||||
)
|
||||
|
||||
// Creates a new SQL lateral expression
|
||||
//
|
||||
// L(From("test")) -> LATERAL (SELECT * FROM "tests")
|
||||
func NewLateralExpression(table AppendableExpression) LateralExpression {
|
||||
return lateral{table: table}
|
||||
}
|
||||
|
||||
func (l lateral) Clone() Expression {
|
||||
return NewLateralExpression(l.table)
|
||||
}
|
||||
|
||||
func (l lateral) Table() AppendableExpression {
|
||||
return l.table
|
||||
}
|
||||
|
||||
func (l lateral) Expression() Expression { return l }
|
||||
func (l lateral) As(val interface{}) AliasedExpression { return NewAliasExpression(l, val) }
|
||||
Reference in New Issue
Block a user