Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
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
- newtype Query = Query {}
- newtype Connection = Connection {}
- data ConnectionState
- data Statement = Statement {}
- data StatementState
- data StatementStreamState
- data StatementStream = StatementStream {}
- data StatementStreamColumn = StatementStreamColumn {}
- data StatementStreamChunk = StatementStreamChunk {}
- data StatementStreamChunkVector = StatementStreamChunkVector {}
- data SQLError = SQLError {}
- toSQLError :: Exception e => e -> SQLError
- connectionClosedError :: SQLError
- statementClosedError :: Statement -> SQLError
- withConnectionHandle :: Connection -> (DuckDBConnection -> IO a) -> IO a
- withStatementHandle :: Statement -> (DuckDBPreparedStatement -> IO a) -> IO a
- withQueryCString :: Query -> (CString -> IO a) -> IO a
Data constructors (internal use only)
Represents a textual SQL query with UTF-8 encoding semantics.
Constructors
Query | |
newtype Connection Source #
Tracks the lifetime of a DuckDB database and connection pair.
Constructors
Connection | |
Fields |
data ConnectionState Source #
Internal connection lifecycle state.
Constructors
ConnectionClosed | |
ConnectionOpen | |
Tracks the lifetime of a prepared statement.
Constructors
Statement | |
data StatementState Source #
Internal statement lifecycle state.
Constructors
StatementClosed | |
StatementOpen | |
Fields |
data StatementStreamState Source #
Streaming execution state for prepared statements.
Constructors
StatementStreamIdle | |
StatementStreamActive !StatementStream |
data StatementStream Source #
Streaming cursor backing an active result set.
Constructors
StatementStream | |
data StatementStreamColumn Source #
Metadata describing a result column surfaced through streaming.
Constructors
StatementStreamColumn | |
data StatementStreamChunk Source #
Currently loaded data chunk plus iteration cursor.
data StatementStreamChunkVector Source #
Raw vector pointers backing a chunk column.
Constructors
StatementStreamChunkVector | |
Represents an error reported by DuckDB or by duckdb-simple itself.
Constructors
SQLError | |
Fields |
Instances
Exception SQLError Source # | |
Defined in Database.DuckDB.Simple.Internal Methods toException :: SQLError -> SomeException # fromException :: SomeException -> Maybe SQLError # displayException :: SQLError -> String # | |
Show SQLError Source # | |
Eq SQLError Source # | |
toSQLError :: Exception e => e -> SQLError Source #
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.