Copyright | 2013-2018 Kei Hibino |
---|---|
License | BSD3 |
Maintainer | ex8k.hibino@gmail.com |
Stability | experimental |
Portability | unknown |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
This module provides typed Insert
running sequence
which intermediate structures are typed.
Synopsis
- type PreparedInsert a = PreparedStatement a ()
- prepare :: IConnection conn => conn -> Insert a -> IO (PreparedInsert a)
- prepareInsert :: IConnection conn => conn -> Insert a -> IO (PreparedInsert a)
- runPreparedInsert :: ToSql SqlValue a => PreparedInsert a -> a -> IO Integer
- runInsert :: (IConnection conn, ToSql SqlValue a) => conn -> Insert a -> a -> IO Integer
- mapInsert :: (IConnection conn, ToSql SqlValue a) => conn -> Insert a -> [a] -> IO [Integer]
- bulkInsert :: (IConnection conn, ToSql SqlValue a) => conn -> Insert a -> [a] -> IO ()
- bulkInsert' :: (IConnection conn, ToSql SqlValue a) => conn -> Insert a -> [a] -> IO ([Integer], [Integer])
- bulkInsertInterleave :: (IConnection conn, ToSql SqlValue a) => conn -> Insert a -> [a] -> IO ([Integer], [Integer])
- chunksInsert :: (IConnection conn, ToSql SqlValue a) => conn -> Insert a -> [a] -> IO [[Integer]]
Documentation
type PreparedInsert a = PreparedStatement a () Source #
Typed prepared insert type.
prepare :: IConnection conn => conn -> Insert a -> IO (PreparedInsert a) Source #
Typed prepare insert operation.
prepareInsert :: IConnection conn => conn -> Insert a -> IO (PreparedInsert a) Source #
Same as prepare
.
runPreparedInsert :: ToSql SqlValue a => PreparedInsert a -> a -> IO Integer Source #
Bind parameters, execute statement and get execution result.
runInsert :: (IConnection conn, ToSql SqlValue a) => conn -> Insert a -> a -> IO Integer Source #
Prepare insert statement, bind parameters, execute statement and get execution result.
mapInsert :: (IConnection conn, ToSql SqlValue a) => conn -> Insert a -> [a] -> IO [Integer] Source #
Prepare and insert each record.
bulkInsert :: (IConnection conn, ToSql SqlValue a) => conn -> Insert a -> [a] -> IO () Source #
Prepare and insert using chunk insert statement.
bulkInsert' :: (IConnection conn, ToSql SqlValue a) => conn -> Insert a -> [a] -> IO ([Integer], [Integer]) Source #
Prepare and insert using chunk insert statement, with the results of insert statements.
bulkInsertInterleave :: (IConnection conn, ToSql SqlValue a) => conn -> Insert a -> [a] -> IO ([Integer], [Integer]) Source #
Prepare and insert using chunk insert statement, with the Lazy-IO results of insert statements.
chunksInsert :: (IConnection conn, ToSql SqlValue a) => conn -> Insert a -> [a] -> IO [[Integer]] Source #
Deprecated: use bulkInsert' instead of this.
Deprecated. Use bulkInsert' instead of this. Prepare and insert using chunk insert statement.