Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Database.DuckDB.Simple.ToField
Description
The ToField
class mirrors the interface provided by sqlite-simple
while
delegating to the DuckDB C API under the hood.
Synopsis
- data FieldBinding
- class ToField a where
- toField :: a -> FieldBinding
- data NamedParam where
- (:=) :: ToField a => Text -> a -> NamedParam
- bindFieldBinding :: Statement -> DuckDBIdx -> FieldBinding -> IO ()
- renderFieldBinding :: FieldBinding -> String
Documentation
data FieldBinding Source #
Encapsulates the action required to bind a single positional parameter, together with a textual description used in diagnostics.
class ToField a where Source #
Types that can be used as positional parameters.
Methods
toField :: a -> FieldBinding Source #
Instances
data NamedParam where Source #
Represents a named parameter binding using the :=
operator.
Constructors
(:=) :: ToField a => Text -> a -> NamedParam infixr 3 |
bindFieldBinding :: Statement -> DuckDBIdx -> FieldBinding -> IO () Source #
Apply a FieldBinding
to the given statement/index.
renderFieldBinding :: FieldBinding -> String Source #
Render a bound parameter for error reporting.