mirror of
https://github.com/khibino/haskell-relational-record.git
synced 2024-12-02 08:12:49 +03:00
relational-query: apply deprecation of ColumnSQL.
This commit is contained in:
parent
220a80145d
commit
db938770e8
@ -15,11 +15,11 @@ module Database.Relational.Query.Internal.UntypedTable (
|
||||
import Data.Array (Array, elems)
|
||||
import qualified Data.Array as Array
|
||||
|
||||
import Database.Relational.Query.Internal.SQL (ColumnSQL)
|
||||
import Database.Relational.Query.Internal.SQL (StringSQL)
|
||||
|
||||
|
||||
-- | Untyped typed table type
|
||||
data Untyped = Untyped String Int (Array Int ColumnSQL) deriving Show
|
||||
data Untyped = Untyped String Int (Array Int StringSQL) deriving Show
|
||||
|
||||
-- | Name string of table in SQL
|
||||
name' :: Untyped -> String
|
||||
@ -30,15 +30,15 @@ width' :: Untyped -> Int
|
||||
width' (Untyped _ w _) = w
|
||||
|
||||
-- | Column name strings in SQL
|
||||
columnArray :: Untyped -> Array Int ColumnSQL
|
||||
columnArray :: Untyped -> Array Int StringSQL
|
||||
columnArray (Untyped _ _ c) = c
|
||||
|
||||
-- | Column name strings in SQL
|
||||
columns' :: Untyped -> [ColumnSQL]
|
||||
columns' :: Untyped -> [StringSQL]
|
||||
columns' = elems . columnArray
|
||||
|
||||
-- | Column name string in SQL specified by index
|
||||
(!) :: Untyped
|
||||
-> Int -- ^ Column index
|
||||
-> ColumnSQL -- ^ Column name String in SQL
|
||||
-> StringSQL -- ^ Column name String in SQL
|
||||
t ! i = columnArray t Array.! i
|
||||
|
Loading…
Reference in New Issue
Block a user