refactor: move schemaCacheDescription to SqlFragment
This doesn't belong in the schema cache module, as it's unused there. It's only used on Query.hs.
This commit is contained in:
committed by
Steve Chavez
parent
96d2b69af4
commit
1ace298a1a
@@ -23,7 +23,6 @@ module PostgREST.SchemaCache
|
||||
, querySchemaCache
|
||||
, accessibleTables
|
||||
, accessibleFuncs
|
||||
, schemaDescription
|
||||
, showSummary
|
||||
) where
|
||||
|
||||
@@ -475,12 +474,6 @@ funcsSqlQuery = encodeUtf8 [trimming|
|
||||
AND prokind = 'f'
|
||||
AND p.pronamespace = ANY($$1::regnamespace[]) |]
|
||||
|
||||
schemaDescription :: Bool -> SQL.Statement Schema (Maybe Text)
|
||||
schemaDescription =
|
||||
SQL.Statement sql (param HE.text) (join <$> HD.rowMaybe (nullableColumn HD.text))
|
||||
where
|
||||
sql = "SELECT pg_catalog.obj_description($1::regnamespace, 'pg_namespace')"
|
||||
|
||||
accessibleTables :: Bool -> SQL.Statement [Schema] AccessSet
|
||||
accessibleTables =
|
||||
SQL.Statement sql params decodeAccessibleIdentifiers
|
||||
|
||||
Reference in New Issue
Block a user