Refactor to use plain GoStyleCamelCase instead of json_style_snake_case.

This commit is contained in:
Zed A. Shaw 2025-09-18 15:44:53 -04:00
parent 931c493928
commit 051474bdc9
12 changed files with 60 additions and 61 deletions

View file

@ -9,7 +9,6 @@ import (
)
func SearchTable(search string, table string, the_type reflect.Type, limit uint64, page uint64) ([]any, error) {
var results []any
like := fmt.Sprint("%", search, "%")
@ -127,14 +126,12 @@ func Update(table string, value reflect.Value) error {
// skip update of id to avoid replacing it
if tag == "id" { continue }
fmt.Println(">>>>>>>>>>>>>>>>> field", tag, "=", field.Interface())
builder = builder.Set(tag, field.Interface())
}
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...)