mirror of
https://gitee.com/johng/gf
synced 2026-06-06 02:25:47 +08:00
fix(contrib/drivers/pgsql): Fixed table field call issue in primary key acquisition logic (#4546)
`pgsql driver`中`getPrimaryKeys`未使用现有缓存,导致每次`insert`都会重新查询表字段
This commit is contained in:
@ -75,7 +75,7 @@ func (d *Driver) DoInsert(
|
||||
// getPrimaryKeys retrieves the primary key field list of the table.
|
||||
// This method extracts primary key information from TableFields.
|
||||
func (d *Driver) getPrimaryKeys(ctx context.Context, table string) ([]string, error) {
|
||||
tableFields, err := d.TableFields(ctx, table)
|
||||
tableFields, err := d.GetCore().GetDB().TableFields(ctx, table)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user