Implemented postgres enum comment generation
This commit is contained in:
parent
ff82eb5df7
commit
0f21699a1f
1 changed files with 1 additions and 0 deletions
|
|
@ -103,6 +103,7 @@ order by
|
||||||
func (p postgresQuerySet) GetEnumsMetaData(db *sql.DB, schemaName string) ([]metadata.Enum, error) {
|
func (p postgresQuerySet) GetEnumsMetaData(db *sql.DB, schemaName string) ([]metadata.Enum, error) {
|
||||||
query := `
|
query := `
|
||||||
SELECT t.typname as "enum.name",
|
SELECT t.typname as "enum.name",
|
||||||
|
obj_description(t.oid) as "enum.comment",
|
||||||
e.enumlabel as "values"
|
e.enumlabel as "values"
|
||||||
FROM pg_catalog.pg_type t
|
FROM pg_catalog.pg_type t
|
||||||
JOIN pg_catalog.pg_enum e on t.oid = e.enumtypid
|
JOIN pg_catalog.pg_enum e on t.oid = e.enumtypid
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue