duckdb-simple
Safe HaskellNone
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 Database.DuckDB.Simple.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
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 #

IsString Query Source # 
Instance details

Defined in Database.DuckDB.Simple.Internal

Methods

fromString :: String -> 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
FromField Null Source # 
Instance details

Defined in Database.DuckDB.Simple.FromField

DuckDBColumnType Null Source # 
Instance details

Defined in Database.DuckDB.Simple.ToField

ToDuckValue Null Source # 
Instance details

Defined in Database.DuckDB.Simple.ToField

ToField Null Source # 
Instance details

Defined in Database.DuckDB.Simple.ToField

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 #

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
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 #

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 #

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 and ToRow instances.

Constructors

h :. t infixr 3 

Instances

Instances details
(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 #

(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 #

(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 #