format code (#884)
This commit is contained in:
@@ -7,16 +7,14 @@ import (
|
||||
"github.com/tal-tech/go-zero/core/stores/sqlx"
|
||||
)
|
||||
|
||||
var (
|
||||
p2m = map[string]string{
|
||||
"int8": "bigint",
|
||||
"numeric": "bigint",
|
||||
"float8": "double",
|
||||
"float4": "float",
|
||||
"int2": "smallint",
|
||||
"int4": "integer",
|
||||
}
|
||||
)
|
||||
var p2m = map[string]string{
|
||||
"int8": "bigint",
|
||||
"numeric": "bigint",
|
||||
"float8": "double",
|
||||
"float4": "float",
|
||||
"int2": "smallint",
|
||||
"int4": "integer",
|
||||
}
|
||||
|
||||
// PostgreSqlModel gets table information from information_schema、pg_catalog
|
||||
type PostgreSqlModel struct {
|
||||
@@ -173,7 +171,7 @@ func (m *PostgreSqlModel) getIndex(schema, table string) (map[string][]*DbIndex,
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
var index = make(map[string][]*DbIndex)
|
||||
index := make(map[string][]*DbIndex)
|
||||
for _, e := range indexes {
|
||||
if e.IsPrimary.Bool {
|
||||
index[e.ColumnName.String] = append(index[e.ColumnName.String], &DbIndex{
|
||||
|
||||
Reference in New Issue
Block a user