fix query order when using ttl and unique
This commit is contained in:
committed by
Michał Matczuk
parent
ca0bd49565
commit
9fa5432a65
@@ -45,11 +45,10 @@ func (b *InsertBuilder) ToCql() (stmt string, names []string) {
|
||||
placeholders(&cql, len(b.columns))
|
||||
cql.WriteString(") ")
|
||||
|
||||
names = append(names, b.using.writeCql(&cql)...)
|
||||
|
||||
if b.unique {
|
||||
cql.WriteString("IF NOT EXISTS ")
|
||||
}
|
||||
names = append(names, b.using.writeCql(&cql)...)
|
||||
|
||||
stmt = cql.String()
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user