multi-tenant

This commit is contained in:
2024-06-19 11:15:39 +08:00
parent b9c9734b16
commit 7a785182b7
9 changed files with 247 additions and 55 deletions

View File

@@ -1286,9 +1286,9 @@ func XormGetColStringArrayByWhere(table, coln, where string, colv *[]string) err
func XormFindColStringArrayByWhere(table, col, where string, cols *[]string) error {
log.Debug("XormFindColStringArrayByWhere processing... ")
err := xEngine.Table(table).Where(where).Cols(col).Distinct().Find(cols)
err := xEngine.Table(table).Where(where).Cols(col).Find(cols)
if err != nil {
log.Errorf("Failed to Find %s from table %s:%v", col, table, err)
log.Errorf("Failed to find %s from table %s: %v", col, table, err)
return err
}
return nil
@@ -1300,7 +1300,7 @@ func XormGetSingleColStringByWhere(table, col, where string) (string, error) {
var colv string
_, err := xEngine.Table(table).Where(where).Cols(col).Get(&colv)
if err != nil {
log.Errorf("Failed to Find %s from table %s:%v", col, table, err)
log.Errorf("Failed to find %s from table %s: %v", col, table, err)
return colv, err
}
return colv, nil