fix text array contains

This commit is contained in:
Elio Bischof
2023-06-30 02:11:17 +02:00
parent d5d365d154
commit 39e8e869ac
12 changed files with 84 additions and 92 deletions

View File

@@ -4,6 +4,7 @@ import (
"database/sql"
"encoding/json"
"errors"
"fmt"
"github.com/zitadel/logging"
@@ -62,11 +63,10 @@ func NewJSONCol(name string, value interface{}) Column {
return NewCol(name, marshalled)
}
type Condition Column
type Condition func(param string) (string, interface{})
func NewCond(name string, value interface{}) Condition {
return Condition{
Name: name,
Value: value,
return func(param string) (string, interface{}) {
return fmt.Sprintf("%s = %s", name, param), value
}
}