on dev help sign in
comment out statement preparation
1e4cb98Eitan Chatav
squeel-postgresql/src/Squeel/PostgreSQL/PQ.hs+13−13
@@ -114,11 +114,11 @@ class MonadPQ db m | m -> db where
114 -> m (Maybe (Result ys))
114 -> m (Maybe (Result ys))
115 pqExecNil statement = pqExecParams statement Nil
115 pqExecNil statement = pqExecParams statement Nil
116
116
117− pqExecPrepared
117+ -- pqExecPrepared
118− :: AllZip HasEncoding ps xs
118+ -- :: AllZip HasEncoding ps xs
119− => PreparedStatement ps ys db db
119+ -- => PreparedStatement ps ys db db
120− -> NP I xs
120+ -- -> NP I xs
121− -> m (Maybe (Result ys))
121+ -- -> m (Maybe (Result ys))
122
122
123instance AtkeyPQ PQ where
123instance AtkeyPQ PQ where
124
124
@@ -158,14 +158,14 @@ instance MonadBase IO io => MonadPQ db (PQ db db io) where
158 result <- liftBase $ LibPQ.execParams conn q params' LibPQ.Binary
158 result <- liftBase $ LibPQ.execParams conn q params' LibPQ.Binary
159 return (Result <$> result, Connection conn)
159 return (Result <$> result, Connection conn)
160
160
161− pqExecPrepared (q :: PreparedStatement ps ys db0 db1) params =
161+ -- pqExecPrepared (q :: PreparedStatement ps ys db0 db1) params =
162− PQ $ \ (Connection conn) -> do
162+ -- PQ $ \ (Connection conn) -> do
163− let
163+ -- let
164− paramValues = encodings (Proxy :: Proxy ps) params
164+ -- paramValues = encodings (Proxy :: Proxy ps) params
165− params' = [ Just (param', LibPQ.Binary) | param' <- paramValues ]
165+ -- params' = [ Just (param', LibPQ.Binary) | param' <- paramValues ]
166− result <- liftBase $
166+ -- result <- liftBase $
167− LibPQ.execPrepared conn (renderPreparedStatement q) params' LibPQ.Binary
167+ -- LibPQ.execPrepared conn (renderPreparedStatement q) params' LibPQ.Binary
168− return (Result <$> result, Connection conn)
168+ -- return (Result <$> result, Connection conn)
169
169
170instance Monad m => Applicative (PQ db db m) where
170instance Monad m => Applicative (PQ db db m) where
171 pure x = PQ $ \ conn -> pure (x, conn)
171 pure x = PQ $ \ conn -> pure (x, conn)
squeel-postgresql/src/Squeel/PostgreSQL/Statement.hs+7−7
@@ -339,13 +339,13 @@ newtype Statement
339 = UnsafeStatement { renderStatement :: ByteString }
339 = UnsafeStatement { renderStatement :: ByteString }
340 deriving (Show,Eq)
340 deriving (Show,Eq)
341
341
342−newtype PreparedStatement
342+-- newtype PreparedStatement
343− (params :: [ColumnType])
343+-- (params :: [ColumnType])
344− (columns :: [(Symbol,ColumnType)])
344+-- (columns :: [(Symbol,ColumnType)])
345− (schema0 :: [(Symbol,[(Symbol,ColumnType)])])
345+-- (schema0 :: [(Symbol,[(Symbol,ColumnType)])])
346− (schema1 :: [(Symbol,[(Symbol,ColumnType)])])
346+-- (schema1 :: [(Symbol,[(Symbol,ColumnType)])])
347− = UnsafePreparedStatement { renderPreparedStatement :: ByteString }
347+-- = UnsafePreparedStatement { renderPreparedStatement :: ByteString }
348− deriving (Show,Eq)
348+-- deriving (Show,Eq)
349
349
350{-----------------------------------------
350{-----------------------------------------
351SELECT statements
351SELECT statements