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

Database.DuckDB.Simple.Internal

Description

This module provides access to the opaque data constructors and helper utilities required by the high-level API. It is not part of the supported public interface; consumers should depend on Simple instead.

Synopsis

Data constructors (internal use only)

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 #

newtype Connection Source #

Tracks the lifetime of a DuckDB database and connection pair.

data StatementState Source #

Internal statement lifecycle state.

data StatementStreamState Source #

Streaming execution state for prepared statements.

data StatementStreamColumn Source #

Metadata describing a result column surfaced through streaming.

data SQLError Source #

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

Helpers

connectionClosedError :: SQLError Source #

Shared error value used when an operation targets a closed connection.

statementClosedError :: Statement -> SQLError Source #

Shared error value used when an operation targets a closed statement.

withConnectionHandle :: Connection -> (DuckDBConnection -> IO a) -> IO a Source #

Internal helper for safely accessing the underlying connection handle.

withStatementHandle :: Statement -> (DuckDBPreparedStatement -> IO a) -> IO a Source #

Internal helper for safely accessing the underlying prepared statement.

withQueryCString :: Query -> (CString -> IO a) -> IO a Source #

Provide a UTF-8 encoded C string view of the query text.