init - add project files
This commit is contained in:
24
tools/jet-2.12.0/mysql/lateral.go
Normal file
24
tools/jet-2.12.0/mysql/lateral.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package mysql
|
||||
|
||||
import "github.com/go-jet/jet/v2/internal/jet"
|
||||
|
||||
// LATERAL derived tables constructor from select statement
|
||||
func LATERAL(selectStmt SelectStatement) lateralImpl {
|
||||
return lateralImpl{
|
||||
selectStmt: selectStmt,
|
||||
}
|
||||
}
|
||||
|
||||
type lateralImpl struct {
|
||||
selectStmt SelectStatement
|
||||
}
|
||||
|
||||
func (l lateralImpl) AS(alias string) SelectTable {
|
||||
subQuery := &selectTableImpl{
|
||||
SelectTable: jet.NewLateral(l.selectStmt, alias),
|
||||
}
|
||||
|
||||
subQuery.readableTableInterfaceImpl.parent = subQuery
|
||||
|
||||
return subQuery
|
||||
}
|
||||
Reference in New Issue
Block a user