refactor: table list to table map

This commit is contained in:
steve-chavez
2022-04-18 15:48:03 -05:00
committed by Steve Chavez
parent f995799e8f
commit cdcc175abf
4 changed files with 32 additions and 34 deletions
+3 -5
View File
@@ -5,9 +5,11 @@ module PostgREST.DbStructure.Table
( Column(..)
, Table(..)
, tableQi
, TablesMap
) where
import qualified Data.Aeson as JSON
import qualified Data.HashMap.Strict as M
import PostgREST.DbStructure.Identifiers (FieldName,
QualifiedIdentifier (..),
@@ -50,8 +52,4 @@ data Column = Column
instance Eq Column where
Column{colTable=t1,colName=n1} == Column{colTable=t2,colName=n2} = t1 == t2 && n1 == n2
data PrimaryKey = PrimaryKey
{ pkTable :: Table
, pkName :: Text
}
deriving (Generic, JSON.ToJSON)
type TablesMap = M.HashMap QualifiedIdentifier Table