Skip to content
Snippets Groups Projects
Commit 88cf4ccfe86f authored by Florent Aide's avatar Florent Aide
Browse files

ArrayContains.ToSQL -> ToSql to implement proper interface

parent ce59b9e7b7bc
No related branches found
No related tags found
No related merge requests found
Pipeline #29669 failed
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
type ArrayContains map[string]interface{} type ArrayContains map[string]interface{}
func (ac ArrayContains) ToSQL() (sql string, args []interface{}, err error) { func (ac ArrayContains) ToSql() (sql string, args []interface{}, err error) {
if len(ac) == 0 { if len(ac) == 0 {
// Empty Sql{} evaluates to true. // Empty Sql{} evaluates to true.
sql = "(1=1)" sql = "(1=1)"
......
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
return nil return nil
} }
// Upsert upserts a Mapped into the db // UpsertColumns upserts a Mapped into the db using only the given columns as update source
func (h *SQLHelper) UpsertColumns(insertColumns, updateColumns []string, instances ...Mapped) error { func (h *SQLHelper) UpsertColumns(insertColumns, updateColumns []string, instances ...Mapped) error {
for _, instance := range instances { for _, instance := range instances {
query := SQLUpsertColumns(instance, insertColumns, updateColumns) query := SQLUpsertColumns(instance, insertColumns, updateColumns)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment