mirror of
https://gitee.com/johng/gf
synced 2026-07-07 06:15:15 +08:00
improve package gdb for structire retrieving in transaction operations
This commit is contained in:
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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(`
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Reference in New Issue
Block a user