Upgraded to the latest go-web-kit.
This commit is contained in:
parent
051474bdc9
commit
41f31a621f
14 changed files with 124 additions and 142 deletions
|
|
@ -9,6 +9,7 @@ import (
|
|||
)
|
||||
|
||||
func SearchTable(search string, table string, the_type reflect.Type, limit uint64, page uint64) ([]any, error) {
|
||||
|
||||
var results []any
|
||||
like := fmt.Sprint("%", search, "%")
|
||||
|
||||
|
|
@ -132,6 +133,7 @@ func Update(table string, value reflect.Value) error {
|
|||
builder = builder.Where(sq.Eq{"id": value.FieldByName("Id").Interface()})
|
||||
sql_query, args, err := builder.ToSql()
|
||||
|
||||
fmt.Println("UPDATE QUERY", sql_query, args)
|
||||
if err != nil { return err}
|
||||
|
||||
_, err = data.DB.Exec(sql_query, args...)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue