fix query order when using ttl and unique

This commit is contained in:
Eric Renard authored and Michał Matczuk committed 2017-12-28 11:16:54 +01:00
1 parent ca0bd49565
commit 9fa5432a65
1 file changed
+1 -2
+1 -2
View File
@@ -45,11 +45,10 @@ func (b *InsertBuilder) ToCql() (stmt string, names []string) {
placeholders(&cql, len(b.columns)) placeholders(&cql, len(b.columns))
cql.WriteString(") ") cql.WriteString(") ")
names = append(names, b.using.writeCql(&cql)...)
if b.unique { if b.unique {
cql.WriteString("IF NOT EXISTS ") cql.WriteString("IF NOT EXISTS ")
} }
names = append(names, b.using.writeCql(&cql)...)
stmt = cql.String() stmt = cql.String()
return return