refactor: Simplify schemaDescription query
This commit is contained in:
committed by
Wolfgang Walther
parent
86c3257f54
commit
b598b594df
@@ -471,14 +471,7 @@ schemaDescription :: Bool -> SQL.Statement Schema (Maybe Text)
|
|||||||
schemaDescription =
|
schemaDescription =
|
||||||
SQL.Statement sql (param HE.text) (join <$> HD.rowMaybe (nullableColumn HD.text))
|
SQL.Statement sql (param HE.text) (join <$> HD.rowMaybe (nullableColumn HD.text))
|
||||||
where
|
where
|
||||||
sql = encodeUtf8 [trimming|
|
sql = "SELECT pg_catalog.obj_description($1::regnamespace, 'pg_namespace')"
|
||||||
select
|
|
||||||
description
|
|
||||||
from
|
|
||||||
pg_namespace n
|
|
||||||
left join pg_description d on d.objoid = n.oid
|
|
||||||
where
|
|
||||||
n.oid = $$1::regnamespace |]
|
|
||||||
|
|
||||||
accessibleTables :: Bool -> SQL.Statement [Schema] AccessSet
|
accessibleTables :: Bool -> SQL.Statement [Schema] AccessSet
|
||||||
accessibleTables =
|
accessibleTables =
|
||||||
|
|||||||
Reference in New Issue
Block a user