Add USING clause support for DELETE statements
This commit is contained in:
parent
72e8d7d584
commit
60ffd004c5
6 changed files with 134 additions and 11 deletions
|
|
@ -58,7 +58,7 @@ type SelectStatement interface {
|
|||
AsTable(alias string) SelectTable
|
||||
}
|
||||
|
||||
//SELECT creates new SelectStatement with list of projections
|
||||
// SELECT creates new SelectStatement with list of projections
|
||||
func SELECT(projection Projection, projections ...Projection) SelectStatement {
|
||||
return newSelectStatement(nil, append([]Projection{projection}, projections...))
|
||||
}
|
||||
|
|
@ -106,10 +106,7 @@ func (s *selectStatementImpl) DISTINCT() SelectStatement {
|
|||
}
|
||||
|
||||
func (s *selectStatementImpl) FROM(tables ...ReadableTable) SelectStatement {
|
||||
s.From.Tables = nil
|
||||
for _, table := range tables {
|
||||
s.From.Tables = append(s.From.Tables, table)
|
||||
}
|
||||
s.From.Tables = readableTablesToSerializerList(tables)
|
||||
return s
|
||||
}
|
||||
|
||||
|
|
@ -189,3 +186,11 @@ func toJetFrameOffset(offset interface{}) jet.Serializer {
|
|||
|
||||
return jet.FixedLiteral(offset)
|
||||
}
|
||||
|
||||
func readableTablesToSerializerList(tables []ReadableTable) []jet.Serializer {
|
||||
var ret []jet.Serializer
|
||||
for _, table := range tables {
|
||||
ret = append(ret, table)
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue