@@ -3,9 +3,6 @@ module Database.Postgres
33 , Client ()
44 , DB ()
55 , ConnectionInfo ()
6- , SqlValue ()
7- , IsSqlValue
8- , toSql
96 , connect
107 , end
118 , execute , execute_
@@ -23,13 +20,14 @@ import Data.Array
2320import Data.Foreign
2421import Data.Foreign.Class
2522import Data.Maybe
26- import Data.Int
2723import Control.Monad.Aff
2824import Control.Monad.Eff.Class
2925import Control.Monad.Eff.Exception (Error (), error )
3026import Control.Monad.Error.Class (throwError )
3127import Data.Traversable (sequence )
3228
29+ import Database.Postgres.SqlValue
30+
3331newtype Query a = Query String
3432
3533foreign import data Client :: *
@@ -123,26 +121,6 @@ finally a sequel = do
123121 sequel
124122 either throwError pure res
125123
126- foreign import data SqlValue :: *
127-
128- foreign import unsafeToSqlValue " " "
129- function unsafeToSqlValue(x) {
130- return x;
131- }
132- " " " :: forall a . a -> SqlValue
133-
134- class IsSqlValue a where
135- toSql :: a -> SqlValue
136-
137- instance isSqlValueString :: IsSqlValue String where
138- toSql = unsafeToSqlValue
139-
140- instance isSqlValueNumber :: IsSqlValue Number where
141- toSql = unsafeToSqlValue
142-
143- instance isSqlValueInt :: IsSqlValue Int where
144- toSql = unsafeToSqlValue <<< toNumber
145-
146124
147125foreign import connect' " " "
148126 function connect$prime(conString) {
0 commit comments