duckdb-simple-0.1.1.1: Haskell FFI bindings for DuckDB
Safe HaskellSafe-Inferred
LanguageHaskell2010

Database.DuckDB.Simple.Types

Description

The datatypes in this module are intentionally kept lightweight. The main Simple module exposes the types without their constructors so that callers interact with them through the high-level API. The actual definitions live in Internal.

Synopsis

Documentation

data Connection Source #

Tracks the lifetime of a DuckDB database and connection pair.

data Statement Source #

Tracks the lifetime of a prepared statement.

newtype Query Source #

Represents a textual SQL query with UTF-8 encoding semantics.

Constructors

Query 

Fields

  • fromQuery :: Text

    Extract the underlying textual representation of the query.

Instances

Instances details
IsString Query Source # 
Instance details

Defined in Database.DuckDB.Simple.Internal

Methods

fromString :: String -> Query #

Semigroup Query Source # 
Instance details

Defined in Database.DuckDB.Simple.Internal

Methods

(<>) :: Query -> Query -> Query #

sconcat :: NonEmpty Query -> Query #

stimes :: Integral b => b -> Query -> Query #

Show Query Source # 
Instance details

Defined in Database.DuckDB.Simple.Internal

Methods

showsPrec :: Int -> Query -> ShowS #

show :: Query -> String #

showList :: [Query] -> ShowS #

Eq Query Source # 
Instance details

Defined in Database.DuckDB.Simple.Internal

Methods

(==) :: Query -> Query -> Bool #

(/=) :: Query -> Query -> Bool #

Ord Query Source # 
Instance details

Defined in Database.DuckDB.Simple.Internal

Methods

compare :: Query -> Query -> Ordering #

(<) :: Query -> Query -> Bool #

(<=) :: Query -> Query -> Bool #

(>) :: Query -> Query -> Bool #

(>=) :: Query -> Query -> Bool #

max :: Query -> Query -> Query #

min :: Query -> Query -> Query #

data SQLError Source #

Represents an error reported by DuckDB or by duckdb-simple itself.

data FormatError Source #

Raised when parameter formatting fails before a statement is executed.

Constructors

FormatError 

Fields

data Null Source #

Placeholder representing SQL NULL.

Constructors

Null 

Instances

Instances details
Read Null Source # 
Instance details

Defined in Database.DuckDB.Simple.Types

Show Null Source # 
Instance details

Defined in Database.DuckDB.Simple.Types

Methods

showsPrec :: Int -> Null -> ShowS #

show :: Null -> String #

showList :: [Null] -> ShowS #

FromField Null Source # 
Instance details

Defined in Database.DuckDB.Simple.FromField

ToField Null Source # 
Instance details

Defined in Database.DuckDB.Simple.ToField

Eq Null Source # 
Instance details

Defined in Database.DuckDB.Simple.Types

Methods

(==) :: Null -> Null -> Bool #

(/=) :: Null -> Null -> Bool #

Ord Null Source # 
Instance details

Defined in Database.DuckDB.Simple.Types

Methods

compare :: Null -> Null -> Ordering #

(<) :: Null -> Null -> Bool #

(<=) :: Null -> Null -> Bool #

(>) :: Null -> Null -> Bool #

(>=) :: Null -> Null -> Bool #

max :: Null -> Null -> Null #

min :: Null -> Null -> Null #

newtype Only a Source #

Wrapper used for single-column rows.

Constructors

Only 

Fields

Instances

Instances details
Read a => Read (Only a) Source # 
Instance details

Defined in Database.DuckDB.Simple.Types

Show a => Show (Only a) Source # 
Instance details

Defined in Database.DuckDB.Simple.Types

Methods

showsPrec :: Int -> Only a -> ShowS #

show :: Only a -> String #

showList :: [Only a] -> ShowS #

FromField a => FromRow (Only a) Source # 
Instance details

Defined in Database.DuckDB.Simple.FromRow

Methods

fromRow :: RowParser (Only a) Source #

ToField a => ToRow (Only a) Source # 
Instance details

Defined in Database.DuckDB.Simple.ToRow

Methods

toRow :: Only a -> [FieldBinding] Source #

Eq a => Eq (Only a) Source # 
Instance details

Defined in Database.DuckDB.Simple.Types

Methods

(==) :: Only a -> Only a -> Bool #

(/=) :: Only a -> Only a -> Bool #

Ord a => Ord (Only a) Source # 
Instance details

Defined in Database.DuckDB.Simple.Types

Methods

compare :: Only a -> Only a -> Ordering #

(<) :: Only a -> Only a -> Bool #

(<=) :: Only a -> Only a -> Bool #

(>) :: Only a -> Only a -> Bool #

(>=) :: Only a -> Only a -> Bool #

max :: Only a -> Only a -> Only a #

min :: Only a -> Only a -> Only a #

data h :. t infixr 3 Source #

Convenience product type for combining FromRow/ToRow instances.

Constructors

h :. t infixr 3 

Instances

Instances details
(Read h, Read t) => Read (h :. t) Source # 
Instance details

Defined in Database.DuckDB.Simple.Types

Methods

readsPrec :: Int -> ReadS (h :. t) #

readList :: ReadS [h :. t] #

readPrec :: ReadPrec (h :. t) #

readListPrec :: ReadPrec [h :. t] #

(Show h, Show t) => Show (h :. t) Source # 
Instance details

Defined in Database.DuckDB.Simple.Types

Methods

showsPrec :: Int -> (h :. t) -> ShowS #

show :: (h :. t) -> String #

showList :: [h :. t] -> ShowS #

(FromRow a, FromRow b) => FromRow (a :. b) Source # 
Instance details

Defined in Database.DuckDB.Simple.FromRow

Methods

fromRow :: RowParser (a :. b) Source #

(ToRow a, ToRow b) => ToRow (a :. b) Source # 
Instance details

Defined in Database.DuckDB.Simple.ToRow

Methods

toRow :: (a :. b) -> [FieldBinding] Source #

(Eq h, Eq t) => Eq (h :. t) Source # 
Instance details

Defined in Database.DuckDB.Simple.Types

Methods

(==) :: (h :. t) -> (h :. t) -> Bool #

(/=) :: (h :. t) -> (h :. t) -> Bool #

(Ord h, Ord t) => Ord (h :. t) Source # 
Instance details

Defined in Database.DuckDB.Simple.Types

Methods

compare :: (h :. t) -> (h :. t) -> Ordering #

(<) :: (h :. t) -> (h :. t) -> Bool #

(<=) :: (h :. t) -> (h :. t) -> Bool #

(>) :: (h :. t) -> (h :. t) -> Bool #

(>=) :: (h :. t) -> (h :. t) -> Bool #

max :: (h :. t) -> (h :. t) -> h :. t #

min :: (h :. t) -> (h :. t) -> h :. t #