relational-query-HDBC-0.7.2.1: HDBC instance of relational-query and typed query interface for HDBC
Copyright2013-2018 Kei Hibino
LicenseBSD3
Maintainerex8k.hibino@gmail.com
Stabilityexperimental
Portabilityunknown
Safe HaskellSafe-Inferred
LanguageHaskell2010

Database.HDBC.Record.Insert

Description

This module provides typed Insert running sequence which intermediate structures are typed.

Synopsis

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.