improve package gdb for structire retrieving in transaction operations

This commit is contained in:
John
2020-11-21 12:24:32 +08:00
parent 042dc0b33f
commit e1bfe90833
5 changed files with 5 additions and 5 deletions

View File

@ -199,7 +199,7 @@ func (d *DriverMssql) TableFields(table string, schema ...string) (fields map[st
checkSchema = schema[0]
}
v, _ := internalCache.GetOrSetFunc(
fmt.Sprintf(`mssql_table_fields_%s_%s`, table, checkSchema),
fmt.Sprintf(`mssql_table_fields_%s_%s@group:%s`, table, checkSchema, d.GetGroup()),
func() (interface{}, error) {
var (
result Result

View File

@ -103,7 +103,7 @@ func (d *DriverMysql) TableFields(table string, schema ...string) (fields map[st
checkSchema = schema[0]
}
v, _ := internalCache.GetOrSetFunc(
fmt.Sprintf(`mysql_table_fields_%s_%s`, table, checkSchema),
fmt.Sprintf(`mysql_table_fields_%s_%s@group:%s`, table, checkSchema, d.GetGroup()),
func() (interface{}, error) {
var (
result Result

View File

@ -159,7 +159,7 @@ func (d *DriverOracle) TableFields(table string, schema ...string) (fields map[s
checkSchema = schema[0]
}
v, _ := internalCache.GetOrSetFunc(
fmt.Sprintf(`oracle_table_fields_%s_%s`, table, checkSchema),
fmt.Sprintf(`oracle_table_fields_%s_%s@group:%s`, table, checkSchema, d.GetGroup()),
func() (interface{}, error) {
result := (Result)(nil)
structureSql := fmt.Sprintf(`

View File

@ -108,7 +108,7 @@ func (d *DriverPgsql) TableFields(table string, schema ...string) (fields map[st
checkSchema = schema[0]
}
v, _ := internalCache.GetOrSetFunc(
fmt.Sprintf(`pgsql_table_fields_%s_%s`, table, checkSchema),
fmt.Sprintf(`pgsql_table_fields_%s_%s@group:%s`, table, checkSchema, d.GetGroup()),
func() (interface{}, error) {
var (
result Result

View File

@ -98,7 +98,7 @@ func (d *DriverSqlite) TableFields(table string, schema ...string) (fields map[s
checkSchema = schema[0]
}
v, _ := internalCache.GetOrSetFunc(
fmt.Sprintf(`sqlite_table_fields_%s_%s`, table, checkSchema),
fmt.Sprintf(`sqlite_table_fields_%s_%s@group:%s`, table, checkSchema, d.GetGroup()),
func() (interface{}, error) {
var (
result Result