Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Database.DuckDB.FFI
Description
The individual modules under Database.DuckDB.FFI.*
group the raw FFI imports
by the sections documented in api.md
. This module preserves the historic
surface area by re-exporting all of those symbols.
Synopsis
- newtype DuckDBState = DuckDBState {}
- pattern DuckDBSuccess :: DuckDBState
- pattern DuckDBError :: DuckDBState
- newtype DuckDBType = DuckDBType {
- unDuckDBType :: CInt
- pattern DuckDBTypeInvalid :: DuckDBType
- pattern DuckDBTypeBoolean :: DuckDBType
- pattern DuckDBTypeTinyInt :: DuckDBType
- pattern DuckDBTypeSmallInt :: DuckDBType
- pattern DuckDBTypeInteger :: DuckDBType
- pattern DuckDBTypeBigInt :: DuckDBType
- pattern DuckDBTypeUTinyInt :: DuckDBType
- pattern DuckDBTypeUSmallInt :: DuckDBType
- pattern DuckDBTypeUInteger :: DuckDBType
- pattern DuckDBTypeUBigInt :: DuckDBType
- pattern DuckDBTypeFloat :: DuckDBType
- pattern DuckDBTypeDouble :: DuckDBType
- pattern DuckDBTypeTimestamp :: DuckDBType
- pattern DuckDBTypeDate :: DuckDBType
- pattern DuckDBTypeTime :: DuckDBType
- pattern DuckDBTypeInterval :: DuckDBType
- pattern DuckDBTypeHugeInt :: DuckDBType
- pattern DuckDBTypeUHugeInt :: DuckDBType
- pattern DuckDBTypeVarchar :: DuckDBType
- pattern DuckDBTypeBlob :: DuckDBType
- pattern DuckDBTypeDecimal :: DuckDBType
- pattern DuckDBTypeTimestampS :: DuckDBType
- pattern DuckDBTypeTimestampMs :: DuckDBType
- pattern DuckDBTypeTimestampNs :: DuckDBType
- pattern DuckDBTypeEnum :: DuckDBType
- pattern DuckDBTypeList :: DuckDBType
- pattern DuckDBTypeStruct :: DuckDBType
- pattern DuckDBTypeMap :: DuckDBType
- pattern DuckDBTypeArray :: DuckDBType
- pattern DuckDBTypeUUID :: DuckDBType
- pattern DuckDBTypeUnion :: DuckDBType
- pattern DuckDBTypeBit :: DuckDBType
- pattern DuckDBTypeTimeTz :: DuckDBType
- pattern DuckDBTypeTimestampTz :: DuckDBType
- pattern DuckDBTypeAny :: DuckDBType
- pattern DuckDBTypeBigNum :: DuckDBType
- pattern DuckDBTypeSQLNull :: DuckDBType
- pattern DuckDBTypeStringLiteral :: DuckDBType
- pattern DuckDBTypeIntegerLiteral :: DuckDBType
- pattern DuckDBTypeTimeNs :: DuckDBType
- newtype DuckDBPendingState = DuckDBPendingState {}
- pattern DuckDBPendingResultReady :: DuckDBPendingState
- pattern DuckDBPendingResultNotReady :: DuckDBPendingState
- pattern DuckDBPendingError :: DuckDBPendingState
- pattern DuckDBPendingNoTasksAvailable :: DuckDBPendingState
- newtype DuckDBResultType = DuckDBResultType {}
- pattern DuckDBResultTypeInvalid :: DuckDBResultType
- pattern DuckDBResultTypeChangedRows :: DuckDBResultType
- pattern DuckDBResultTypeNothing :: DuckDBResultType
- pattern DuckDBResultTypeQueryResult :: DuckDBResultType
- newtype DuckDBStatementType = DuckDBStatementType {}
- pattern DuckDBStatementTypeInvalid :: DuckDBStatementType
- pattern DuckDBStatementTypeSelect :: DuckDBStatementType
- pattern DuckDBStatementTypeInsert :: DuckDBStatementType
- pattern DuckDBStatementTypeUpdate :: DuckDBStatementType
- pattern DuckDBStatementTypeExplain :: DuckDBStatementType
- pattern DuckDBStatementTypeDelete :: DuckDBStatementType
- pattern DuckDBStatementTypePrepare :: DuckDBStatementType
- pattern DuckDBStatementTypeCreate :: DuckDBStatementType
- pattern DuckDBStatementTypeExecute :: DuckDBStatementType
- pattern DuckDBStatementTypeAlter :: DuckDBStatementType
- pattern DuckDBStatementTypeTransaction :: DuckDBStatementType
- pattern DuckDBStatementTypeCopy :: DuckDBStatementType
- pattern DuckDBStatementTypeAnalyze :: DuckDBStatementType
- pattern DuckDBStatementTypeVariableSet :: DuckDBStatementType
- pattern DuckDBStatementTypeCreateFunc :: DuckDBStatementType
- pattern DuckDBStatementTypeDrop :: DuckDBStatementType
- pattern DuckDBStatementTypeExport :: DuckDBStatementType
- pattern DuckDBStatementTypePragma :: DuckDBStatementType
- pattern DuckDBStatementTypeVacuum :: DuckDBStatementType
- pattern DuckDBStatementTypeCall :: DuckDBStatementType
- pattern DuckDBStatementTypeSet :: DuckDBStatementType
- pattern DuckDBStatementTypeLoad :: DuckDBStatementType
- pattern DuckDBStatementTypeRelation :: DuckDBStatementType
- pattern DuckDBStatementTypeExtension :: DuckDBStatementType
- pattern DuckDBStatementTypeLogicalPlan :: DuckDBStatementType
- pattern DuckDBStatementTypeAttach :: DuckDBStatementType
- pattern DuckDBStatementTypeDetach :: DuckDBStatementType
- pattern DuckDBStatementTypeMulti :: DuckDBStatementType
- newtype DuckDBErrorType = DuckDBErrorType {}
- pattern DuckDBErrorInvalid :: DuckDBErrorType
- pattern DuckDBErrorOutOfRange :: DuckDBErrorType
- pattern DuckDBErrorConversion :: DuckDBErrorType
- pattern DuckDBErrorUnknownType :: DuckDBErrorType
- pattern DuckDBErrorDecimal :: DuckDBErrorType
- pattern DuckDBErrorMismatchType :: DuckDBErrorType
- pattern DuckDBErrorDivideByZero :: DuckDBErrorType
- pattern DuckDBErrorObjectSize :: DuckDBErrorType
- pattern DuckDBErrorInvalidType :: DuckDBErrorType
- pattern DuckDBErrorSerialization :: DuckDBErrorType
- pattern DuckDBErrorTransaction :: DuckDBErrorType
- pattern DuckDBErrorNotImplemented :: DuckDBErrorType
- pattern DuckDBErrorExpression :: DuckDBErrorType
- pattern DuckDBErrorCatalog :: DuckDBErrorType
- pattern DuckDBErrorParser :: DuckDBErrorType
- pattern DuckDBErrorPlanner :: DuckDBErrorType
- pattern DuckDBErrorScheduler :: DuckDBErrorType
- pattern DuckDBErrorExecutor :: DuckDBErrorType
- pattern DuckDBErrorConstraint :: DuckDBErrorType
- pattern DuckDBErrorIndex :: DuckDBErrorType
- pattern DuckDBErrorStat :: DuckDBErrorType
- pattern DuckDBErrorConnection :: DuckDBErrorType
- pattern DuckDBErrorSyntax :: DuckDBErrorType
- pattern DuckDBErrorSettings :: DuckDBErrorType
- pattern DuckDBErrorBinder :: DuckDBErrorType
- pattern DuckDBErrorNetwork :: DuckDBErrorType
- pattern DuckDBErrorOptimizer :: DuckDBErrorType
- pattern DuckDBErrorNullPointer :: DuckDBErrorType
- pattern DuckDBErrorIO :: DuckDBErrorType
- pattern DuckDBErrorInterrupt :: DuckDBErrorType
- pattern DuckDBErrorFatal :: DuckDBErrorType
- pattern DuckDBErrorInternal :: DuckDBErrorType
- pattern DuckDBErrorInvalidInput :: DuckDBErrorType
- pattern DuckDBErrorOutOfMemory :: DuckDBErrorType
- pattern DuckDBErrorPermission :: DuckDBErrorType
- pattern DuckDBErrorParameterNotResolved :: DuckDBErrorType
- pattern DuckDBErrorParameterNotAllowed :: DuckDBErrorType
- pattern DuckDBErrorDependency :: DuckDBErrorType
- pattern DuckDBErrorHTTP :: DuckDBErrorType
- pattern DuckDBErrorMissingExtension :: DuckDBErrorType
- pattern DuckDBErrorAutoload :: DuckDBErrorType
- pattern DuckDBErrorSequence :: DuckDBErrorType
- pattern DuckDBInvalidConfiguration :: DuckDBErrorType
- pattern DuckDBErrorInvalidConfiguration :: DuckDBErrorType
- newtype DuckDBCastMode = DuckDBCastMode {}
- pattern DuckDBCastNormal :: DuckDBCastMode
- pattern DuckDBCastTry :: DuckDBCastMode
- type DuckDBIdx = Word64
- type DuckDBSel = Word32
- newtype DuckDBDate = DuckDBDate {}
- data DuckDBDateStruct = DuckDBDateStruct {}
- newtype DuckDBTime = DuckDBTime {}
- data DuckDBTimeStruct = DuckDBTimeStruct {}
- newtype DuckDBTimeNs = DuckDBTimeNs {}
- newtype DuckDBTimeTz = DuckDBTimeTz {}
- data DuckDBTimeTzStruct = DuckDBTimeTzStruct {}
- newtype DuckDBTimestamp = DuckDBTimestamp {}
- data DuckDBTimestampStruct = DuckDBTimestampStruct {}
- newtype DuckDBTimestampS = DuckDBTimestampS {}
- newtype DuckDBTimestampMs = DuckDBTimestampMs {}
- newtype DuckDBTimestampNs = DuckDBTimestampNs {}
- data DuckDBInterval = DuckDBInterval {}
- data DuckDBHugeInt = DuckDBHugeInt {}
- data DuckDBUHugeInt = DuckDBUHugeInt {}
- data DuckDBDecimal = DuckDBDecimal {}
- data DuckDBBlob = DuckDBBlob {
- duckDBBlobData :: !(Ptr ())
- duckDBBlobSize :: !DuckDBIdx
- data DuckDBString = DuckDBString {
- duckDBStringData :: !(Ptr CChar)
- duckDBStringSize :: !DuckDBIdx
- data DuckDBStringT
- data DuckDBBit = DuckDBBit {
- duckDBBitData :: !(Ptr Word8)
- duckDBBitSize :: !DuckDBIdx
- data DuckDBBignum = DuckDBBignum {}
- data DuckDBQueryProgress = DuckDBQueryProgress {}
- data DuckDBResult = DuckDBResult {}
- data DuckDBColumn
- type DuckDBDatabase = Ptr DuckDBDatabaseStruct
- type DuckDBConnection = Ptr DuckDBConnectionStruct
- type DuckDBConfig = Ptr DuckDBConfigStruct
- type DuckDBInstanceCache = Ptr DuckDBInstanceCacheStruct
- type DuckDBArrowOptions = Ptr DuckDBArrowOptionsStruct
- type DuckDBArrow = Ptr DuckDBArrowStruct
- type DuckDBArrowSchema = Ptr DuckDBArrowSchemaStruct
- type DuckDBArrowArray = Ptr DuckDBArrowArrayStruct
- newtype ArrowSchemaPtr = ArrowSchemaPtr {}
- newtype ArrowArrayPtr = ArrowArrayPtr {}
- newtype ArrowStreamPtr = ArrowStreamPtr {
- unArrowStreamPtr :: Ptr ()
- type DuckDBArrowConvertedSchema = Ptr DuckDBArrowConvertedSchemaStruct
- type DuckDBArrowStream = Ptr DuckDBArrowStreamStruct
- type DuckDBPreparedStatement = Ptr DuckDBPreparedStatementStruct
- type DuckDBPendingResult = Ptr DuckDBPendingResultStruct
- type DuckDBExtractedStatements = Ptr DuckDBExtractedStatementsStruct
- type DuckDBLogicalType = Ptr DuckDBLogicalTypeStruct
- type DuckDBCreateTypeInfo = Ptr DuckDBCreateTypeInfoStruct
- type DuckDBVector = Ptr DuckDBVectorStruct
- type DuckDBDataChunk = Ptr DuckDBDataChunkStruct
- type DuckDBSelectionVector = Ptr DuckDBSelectionVectorStruct
- type DuckDBFunctionInfo = Ptr DuckDBFunctionInfoStruct
- type DuckDBBindInfo = Ptr DuckDBBindInfoStruct
- type DuckDBInitInfo = Ptr DuckDBInitInfoStruct
- type DuckDBScalarFunction = Ptr DuckDBScalarFunctionStruct
- type DuckDBScalarFunctionSet = Ptr DuckDBScalarFunctionSetStruct
- type DuckDBAggregateFunction = Ptr DuckDBAggregateFunctionStruct
- type DuckDBAggregateFunctionSet = Ptr DuckDBAggregateFunctionSetStruct
- type DuckDBAggregateState = Ptr DuckDBAggregateStateStruct
- type DuckDBCastFunction = Ptr DuckDBCastFunctionStruct
- type DuckDBExpression = Ptr DuckDBExpressionStruct
- type DuckDBClientContext = Ptr DuckDBClientContextStruct
- type DuckDBTableFunction = Ptr DuckDBTableFunctionStruct
- type DuckDBValue = Ptr DuckDBValueStruct
- type DuckDBErrorData = Ptr DuckDBErrorDataStruct
- type DuckDBAppender = Ptr DuckDBAppenderStruct
- type DuckDBTableDescription = Ptr DuckDBTableDescriptionStruct
- type DuckDBProfilingInfo = Ptr DuckDBProfilingInfoStruct
- type DuckDBReplacementScanInfo = Ptr DuckDBReplacementScanInfoStruct
- type DuckDBTaskState = Ptr ()
- data ArrowArray = ArrowArray {
- arrowArrayLength :: Int64
- arrowArrayNullCount :: Int64
- arrowArrayOffset :: Int64
- arrowArrayBufferCount :: Int64
- arrowArrayChildCount :: Int64
- arrowArrayBuffers :: Ptr (Ptr ())
- arrowArrayChildren :: Ptr (Ptr ArrowArray)
- arrowArrayDictionary :: Ptr ArrowArray
- arrowArrayRelease :: FunPtr (Ptr ArrowArray -> IO ())
- arrowArrayPrivateData :: Ptr ()
- data ArrowSchema = ArrowSchema {
- arrowSchemaFormat :: CString
- arrowSchemaName :: CString
- arrowSchemaMetadata :: CString
- arrowSchemaFlags :: Int64
- arrowSchemaChildCount :: Int64
- arrowSchemaChildren :: Ptr (Ptr ArrowSchema)
- arrowSchemaDictionary :: Ptr ArrowSchema
- arrowSchemaRelease :: FunPtr (Ptr ArrowSchema -> IO ())
- arrowSchemaPrivateData :: Ptr ()
- data DuckDBDatabaseStruct
- data DuckDBConnectionStruct
- data DuckDBConfigStruct
- data DuckDBInstanceCacheStruct
- data DuckDBExtractedStatementsStruct
- data DuckDBFunctionInfoStruct
- data DuckDBBindInfoStruct
- data DuckDBScalarFunctionStruct
- data DuckDBScalarFunctionSetStruct
- data DuckDBAggregateFunctionStruct
- data DuckDBAggregateFunctionSetStruct
- data DuckDBVectorStruct
- data DuckDBDataChunkStruct
- data DuckDBSelectionVectorStruct
- data DuckDBArrowOptionsStruct
- data DuckDBArrowStruct
- data DuckDBArrowConvertedSchemaStruct
- data DuckDBArrowStreamStruct
- data DuckDBExpressionStruct
- data DuckDBClientContextStruct
- data DuckDBPreparedStatementStruct
- data DuckDBValueStruct
- data DuckDBPendingResultStruct
- data DuckDBLogicalTypeStruct
- data DuckDBCreateTypeInfoStruct
- data DuckDBErrorDataStruct
- data DuckDBInitInfoStruct
- data DuckDBCastFunctionStruct
- data DuckDBTableFunctionStruct
- data DuckDBAppenderStruct
- data DuckDBTableDescriptionStruct
- data DuckDBProfilingInfoStruct
- data DuckDBReplacementScanInfoStruct
- data DuckDBAggregateStateStruct
- type DuckDBScalarFunctionFun = FunPtr (DuckDBFunctionInfo -> DuckDBDataChunk -> DuckDBVector -> IO ())
- type DuckDBScalarFunctionBindFun = FunPtr (DuckDBBindInfo -> IO ())
- type DuckDBDeleteCallback = FunPtr (Ptr () -> IO ())
- type DuckDBCopyCallback = FunPtr (Ptr () -> IO (Ptr ()))
- type DuckDBCastFunctionFun = FunPtr (DuckDBFunctionInfo -> DuckDBIdx -> DuckDBVector -> DuckDBVector -> IO CBool)
- type DuckDBAggregateStateSizeFun = FunPtr (DuckDBFunctionInfo -> IO DuckDBIdx)
- type DuckDBAggregateInitFun = FunPtr (DuckDBFunctionInfo -> DuckDBAggregateState -> IO ())
- type DuckDBAggregateDestroyFun = FunPtr (Ptr DuckDBAggregateState -> DuckDBIdx -> IO ())
- type DuckDBAggregateUpdateFun = FunPtr (DuckDBFunctionInfo -> DuckDBDataChunk -> Ptr DuckDBAggregateState -> IO ())
- type DuckDBAggregateCombineFun = FunPtr (DuckDBFunctionInfo -> Ptr DuckDBAggregateState -> Ptr DuckDBAggregateState -> DuckDBIdx -> IO ())
- type DuckDBAggregateFinalizeFun = FunPtr (DuckDBFunctionInfo -> Ptr DuckDBAggregateState -> DuckDBVector -> DuckDBIdx -> DuckDBIdx -> IO ())
- type DuckDBTableFunctionBindFun = FunPtr (DuckDBBindInfo -> IO ())
- type DuckDBTableFunctionInitFun = FunPtr (DuckDBInitInfo -> IO ())
- type DuckDBTableFunctionFun = FunPtr (DuckDBFunctionInfo -> DuckDBDataChunk -> IO ())
- type DuckDBReplacementCallback = FunPtr (DuckDBReplacementScanInfo -> CString -> Ptr () -> IO ())
- c_duckdb_create_instance_cache :: IO DuckDBInstanceCache
- c_duckdb_get_or_create_from_cache :: DuckDBInstanceCache -> CString -> Ptr DuckDBDatabase -> DuckDBConfig -> Ptr CString -> IO DuckDBState
- c_duckdb_destroy_instance_cache :: Ptr DuckDBInstanceCache -> IO ()
- c_duckdb_open :: CString -> Ptr DuckDBDatabase -> IO DuckDBState
- c_duckdb_open_ext :: CString -> Ptr DuckDBDatabase -> DuckDBConfig -> Ptr CString -> IO DuckDBState
- c_duckdb_close :: Ptr DuckDBDatabase -> IO ()
- c_duckdb_connect :: DuckDBDatabase -> Ptr DuckDBConnection -> IO DuckDBState
- c_duckdb_interrupt :: DuckDBConnection -> IO ()
- c_duckdb_query_progress :: DuckDBConnection -> Ptr DuckDBQueryProgress -> IO ()
- c_duckdb_disconnect :: Ptr DuckDBConnection -> IO ()
- c_duckdb_connection_get_client_context :: DuckDBConnection -> Ptr DuckDBClientContext -> IO ()
- c_duckdb_connection_get_arrow_options :: DuckDBConnection -> Ptr DuckDBArrowOptions -> IO ()
- c_duckdb_client_context_get_connection_id :: DuckDBClientContext -> IO DuckDBIdx
- c_duckdb_destroy_client_context :: Ptr DuckDBClientContext -> IO ()
- c_duckdb_destroy_arrow_options :: Ptr DuckDBArrowOptions -> IO ()
- c_duckdb_library_version :: IO CString
- c_duckdb_get_table_names :: DuckDBConnection -> CString -> CBool -> IO DuckDBValue
- c_duckdb_create_config :: Ptr DuckDBConfig -> IO DuckDBState
- c_duckdb_config_count :: IO CSize
- c_duckdb_get_config_flag :: CSize -> Ptr CString -> Ptr CString -> IO DuckDBState
- c_duckdb_set_config :: DuckDBConfig -> CString -> CString -> IO DuckDBState
- c_duckdb_destroy_config :: Ptr DuckDBConfig -> IO ()
- c_duckdb_create_error_data :: DuckDBErrorType -> CString -> IO DuckDBErrorData
- c_duckdb_destroy_error_data :: Ptr DuckDBErrorData -> IO ()
- c_duckdb_error_data_error_type :: DuckDBErrorData -> IO DuckDBErrorType
- c_duckdb_error_data_message :: DuckDBErrorData -> IO CString
- c_duckdb_error_data_has_error :: DuckDBErrorData -> IO CBool
- c_duckdb_query :: DuckDBConnection -> CString -> Ptr DuckDBResult -> IO DuckDBState
- c_duckdb_destroy_result :: Ptr DuckDBResult -> IO ()
- c_duckdb_column_name :: Ptr DuckDBResult -> DuckDBIdx -> IO CString
- c_duckdb_column_type :: Ptr DuckDBResult -> DuckDBIdx -> IO DuckDBType
- c_duckdb_result_statement_type :: Ptr DuckDBResult -> IO DuckDBStatementType
- c_duckdb_column_logical_type :: Ptr DuckDBResult -> DuckDBIdx -> IO DuckDBLogicalType
- c_duckdb_result_get_arrow_options :: Ptr DuckDBResult -> IO DuckDBArrowOptions
- c_duckdb_column_count :: Ptr DuckDBResult -> IO DuckDBIdx
- c_duckdb_row_count :: Ptr DuckDBResult -> IO DuckDBIdx
- c_duckdb_rows_changed :: Ptr DuckDBResult -> IO DuckDBIdx
- c_duckdb_column_data :: Ptr DuckDBResult -> DuckDBIdx -> IO (Ptr ())
- c_duckdb_nullmask_data :: Ptr DuckDBResult -> DuckDBIdx -> IO (Ptr CBool)
- c_duckdb_result_error :: Ptr DuckDBResult -> IO CString
- c_duckdb_result_error_type :: Ptr DuckDBResult -> IO DuckDBErrorType
- c_duckdb_result_get_chunk :: Ptr DuckDBResult -> DuckDBIdx -> IO DuckDBDataChunk
- c_duckdb_result_is_streaming :: Ptr DuckDBResult -> IO CBool
- c_duckdb_result_chunk_count :: Ptr DuckDBResult -> IO DuckDBIdx
- c_duckdb_result_return_type :: Ptr DuckDBResult -> IO DuckDBResultType
- c_duckdb_value_boolean :: Ptr DuckDBResult -> DuckDBIdx -> DuckDBIdx -> IO CBool
- c_duckdb_value_int8 :: Ptr DuckDBResult -> DuckDBIdx -> DuckDBIdx -> IO Int8
- c_duckdb_value_int16 :: Ptr DuckDBResult -> DuckDBIdx -> DuckDBIdx -> IO Int16
- c_duckdb_value_int32 :: Ptr DuckDBResult -> DuckDBIdx -> DuckDBIdx -> IO Int32
- c_duckdb_value_int64 :: Ptr DuckDBResult -> DuckDBIdx -> DuckDBIdx -> IO Int64
- c_duckdb_value_hugeint :: Ptr DuckDBResult -> DuckDBIdx -> DuckDBIdx -> Ptr DuckDBHugeInt -> IO ()
- c_duckdb_value_uhugeint :: Ptr DuckDBResult -> DuckDBIdx -> DuckDBIdx -> Ptr DuckDBUHugeInt -> IO ()
- c_duckdb_value_decimal :: Ptr DuckDBResult -> DuckDBIdx -> DuckDBIdx -> Ptr DuckDBDecimal -> IO ()
- c_duckdb_value_uint8 :: Ptr DuckDBResult -> DuckDBIdx -> DuckDBIdx -> IO Word8
- c_duckdb_value_uint16 :: Ptr DuckDBResult -> DuckDBIdx -> DuckDBIdx -> IO Word16
- c_duckdb_value_uint32 :: Ptr DuckDBResult -> DuckDBIdx -> DuckDBIdx -> IO Word32
- c_duckdb_value_uint64 :: Ptr DuckDBResult -> DuckDBIdx -> DuckDBIdx -> IO Word64
- c_duckdb_value_float :: Ptr DuckDBResult -> DuckDBIdx -> DuckDBIdx -> IO CFloat
- c_duckdb_value_double :: Ptr DuckDBResult -> DuckDBIdx -> DuckDBIdx -> IO CDouble
- c_duckdb_value_date :: Ptr DuckDBResult -> DuckDBIdx -> DuckDBIdx -> IO DuckDBDate
- c_duckdb_value_time :: Ptr DuckDBResult -> DuckDBIdx -> DuckDBIdx -> IO DuckDBTime
- c_duckdb_value_timestamp :: Ptr DuckDBResult -> DuckDBIdx -> DuckDBIdx -> IO DuckDBTimestamp
- c_duckdb_value_interval :: Ptr DuckDBResult -> DuckDBIdx -> DuckDBIdx -> Ptr DuckDBInterval -> IO ()
- c_duckdb_value_varchar :: Ptr DuckDBResult -> DuckDBIdx -> DuckDBIdx -> IO CString
- c_duckdb_value_string :: Ptr DuckDBResult -> DuckDBIdx -> DuckDBIdx -> Ptr DuckDBString -> IO ()
- c_duckdb_value_varchar_internal :: Ptr DuckDBResult -> DuckDBIdx -> DuckDBIdx -> IO CString
- c_duckdb_value_string_internal :: Ptr DuckDBResult -> DuckDBIdx -> DuckDBIdx -> Ptr DuckDBString -> IO ()
- c_duckdb_value_blob :: Ptr DuckDBResult -> DuckDBIdx -> DuckDBIdx -> Ptr DuckDBBlob -> IO ()
- c_duckdb_value_is_null :: Ptr DuckDBResult -> DuckDBIdx -> DuckDBIdx -> IO CBool
- c_duckdb_malloc :: CSize -> IO (Ptr ())
- c_duckdb_free :: Ptr () -> IO ()
- c_duckdb_vector_size :: IO DuckDBIdx
- c_duckdb_string_is_inlined :: Ptr DuckDBStringT -> IO CBool
- c_duckdb_string_t_length :: Ptr DuckDBStringT -> IO Word32
- c_duckdb_string_t_data :: Ptr DuckDBStringT -> IO CString
- c_duckdb_from_date :: DuckDBDate -> Ptr DuckDBDateStruct -> IO ()
- c_duckdb_to_date :: Ptr DuckDBDateStruct -> IO DuckDBDate
- c_duckdb_is_finite_date :: DuckDBDate -> IO CBool
- c_duckdb_from_time :: DuckDBTime -> Ptr DuckDBTimeStruct -> IO ()
- c_duckdb_create_time_tz :: Int64 -> Int32 -> IO DuckDBTimeTz
- c_duckdb_from_time_tz :: DuckDBTimeTz -> Ptr DuckDBTimeTzStruct -> IO ()
- c_duckdb_to_time :: Ptr DuckDBTimeStruct -> IO DuckDBTime
- c_duckdb_from_timestamp :: DuckDBTimestamp -> Ptr DuckDBTimestampStruct -> IO ()
- c_duckdb_to_timestamp :: Ptr DuckDBTimestampStruct -> IO DuckDBTimestamp
- c_duckdb_is_finite_timestamp :: DuckDBTimestamp -> IO CBool
- c_duckdb_is_finite_timestamp_s :: DuckDBTimestampS -> IO CBool
- c_duckdb_is_finite_timestamp_ms :: DuckDBTimestampMs -> IO CBool
- c_duckdb_is_finite_timestamp_ns :: DuckDBTimestampNs -> IO CBool
- c_duckdb_hugeint_to_double :: Ptr DuckDBHugeInt -> IO CDouble
- c_duckdb_double_to_hugeint :: CDouble -> Ptr DuckDBHugeInt -> IO ()
- c_duckdb_uhugeint_to_double :: Ptr DuckDBUHugeInt -> IO CDouble
- c_duckdb_double_to_uhugeint :: CDouble -> Ptr DuckDBUHugeInt -> IO ()
- c_duckdb_double_to_decimal :: CDouble -> Word8 -> Word8 -> Ptr DuckDBDecimal -> IO ()
- c_duckdb_decimal_to_double :: Ptr DuckDBDecimal -> IO CDouble
- c_duckdb_prepare :: DuckDBConnection -> CString -> Ptr DuckDBPreparedStatement -> IO DuckDBState
- c_duckdb_destroy_prepare :: Ptr DuckDBPreparedStatement -> IO ()
- c_duckdb_prepare_error :: DuckDBPreparedStatement -> IO CString
- c_duckdb_nparams :: DuckDBPreparedStatement -> IO DuckDBIdx
- c_duckdb_parameter_name :: DuckDBPreparedStatement -> DuckDBIdx -> IO CString
- c_duckdb_param_type :: DuckDBPreparedStatement -> DuckDBIdx -> IO DuckDBType
- c_duckdb_param_logical_type :: DuckDBPreparedStatement -> DuckDBIdx -> IO DuckDBLogicalType
- c_duckdb_clear_bindings :: DuckDBPreparedStatement -> IO DuckDBState
- c_duckdb_prepared_statement_type :: DuckDBPreparedStatement -> IO DuckDBStatementType
- c_duckdb_prepared_statement_column_count :: DuckDBPreparedStatement -> IO DuckDBIdx
- c_duckdb_prepared_statement_column_name :: DuckDBPreparedStatement -> DuckDBIdx -> IO CString
- c_duckdb_prepared_statement_column_logical_type :: DuckDBPreparedStatement -> DuckDBIdx -> IO DuckDBLogicalType
- c_duckdb_prepared_statement_column_type :: DuckDBPreparedStatement -> DuckDBIdx -> IO DuckDBType
- c_duckdb_bind_value :: DuckDBPreparedStatement -> DuckDBIdx -> DuckDBValue -> IO DuckDBState
- c_duckdb_bind_parameter_index :: DuckDBPreparedStatement -> Ptr DuckDBIdx -> CString -> IO DuckDBState
- c_duckdb_bind_boolean :: DuckDBPreparedStatement -> DuckDBIdx -> CBool -> IO DuckDBState
- c_duckdb_bind_int8 :: DuckDBPreparedStatement -> DuckDBIdx -> Int8 -> IO DuckDBState
- c_duckdb_bind_int16 :: DuckDBPreparedStatement -> DuckDBIdx -> Int16 -> IO DuckDBState
- c_duckdb_bind_int32 :: DuckDBPreparedStatement -> DuckDBIdx -> Int32 -> IO DuckDBState
- c_duckdb_bind_int64 :: DuckDBPreparedStatement -> DuckDBIdx -> Int64 -> IO DuckDBState
- c_duckdb_bind_hugeint :: DuckDBPreparedStatement -> DuckDBIdx -> Ptr DuckDBHugeInt -> IO DuckDBState
- c_duckdb_bind_uhugeint :: DuckDBPreparedStatement -> DuckDBIdx -> Ptr DuckDBUHugeInt -> IO DuckDBState
- c_duckdb_bind_decimal :: DuckDBPreparedStatement -> DuckDBIdx -> Ptr DuckDBDecimal -> IO DuckDBState
- c_duckdb_bind_uint8 :: DuckDBPreparedStatement -> DuckDBIdx -> Word8 -> IO DuckDBState
- c_duckdb_bind_uint16 :: DuckDBPreparedStatement -> DuckDBIdx -> Word16 -> IO DuckDBState
- c_duckdb_bind_uint32 :: DuckDBPreparedStatement -> DuckDBIdx -> Word32 -> IO DuckDBState
- c_duckdb_bind_uint64 :: DuckDBPreparedStatement -> DuckDBIdx -> Word64 -> IO DuckDBState
- c_duckdb_bind_float :: DuckDBPreparedStatement -> DuckDBIdx -> CFloat -> IO DuckDBState
- c_duckdb_bind_double :: DuckDBPreparedStatement -> DuckDBIdx -> CDouble -> IO DuckDBState
- c_duckdb_bind_date :: DuckDBPreparedStatement -> DuckDBIdx -> DuckDBDate -> IO DuckDBState
- c_duckdb_bind_time :: DuckDBPreparedStatement -> DuckDBIdx -> DuckDBTime -> IO DuckDBState
- c_duckdb_bind_timestamp :: DuckDBPreparedStatement -> DuckDBIdx -> DuckDBTimestamp -> IO DuckDBState
- c_duckdb_bind_timestamp_tz :: DuckDBPreparedStatement -> DuckDBIdx -> DuckDBTimestamp -> IO DuckDBState
- c_duckdb_bind_interval :: DuckDBPreparedStatement -> DuckDBIdx -> Ptr DuckDBInterval -> IO DuckDBState
- c_duckdb_bind_varchar :: DuckDBPreparedStatement -> DuckDBIdx -> CString -> IO DuckDBState
- c_duckdb_bind_varchar_length :: DuckDBPreparedStatement -> DuckDBIdx -> CString -> DuckDBIdx -> IO DuckDBState
- c_duckdb_bind_blob :: DuckDBPreparedStatement -> DuckDBIdx -> Ptr () -> DuckDBIdx -> IO DuckDBState
- c_duckdb_bind_null :: DuckDBPreparedStatement -> DuckDBIdx -> IO DuckDBState
- c_duckdb_execute_prepared :: DuckDBPreparedStatement -> Ptr DuckDBResult -> IO DuckDBState
- c_duckdb_execute_prepared_streaming :: DuckDBPreparedStatement -> Ptr DuckDBResult -> IO DuckDBState
- c_duckdb_extract_statements :: DuckDBConnection -> CString -> Ptr DuckDBExtractedStatements -> IO DuckDBIdx
- c_duckdb_prepare_extracted_statement :: DuckDBConnection -> DuckDBExtractedStatements -> DuckDBIdx -> Ptr DuckDBPreparedStatement -> IO DuckDBState
- c_duckdb_extract_statements_error :: DuckDBExtractedStatements -> IO CString
- c_duckdb_destroy_extracted :: Ptr DuckDBExtractedStatements -> IO ()
- c_duckdb_pending_prepared :: DuckDBPreparedStatement -> Ptr DuckDBPendingResult -> IO DuckDBState
- c_duckdb_pending_prepared_streaming :: DuckDBPreparedStatement -> Ptr DuckDBPendingResult -> IO DuckDBState
- c_duckdb_destroy_pending :: Ptr DuckDBPendingResult -> IO ()
- c_duckdb_pending_error :: DuckDBPendingResult -> IO CString
- c_duckdb_pending_execute_task :: DuckDBPendingResult -> IO DuckDBPendingState
- c_duckdb_pending_execute_check_state :: DuckDBPendingResult -> IO DuckDBPendingState
- c_duckdb_execute_pending :: DuckDBPendingResult -> Ptr DuckDBResult -> IO DuckDBState
- c_duckdb_pending_execution_is_finished :: DuckDBPendingState -> IO CBool
- c_duckdb_destroy_value :: Ptr DuckDBValue -> IO ()
- c_duckdb_create_varchar :: CString -> IO DuckDBValue
- c_duckdb_create_varchar_length :: CString -> DuckDBIdx -> IO DuckDBValue
- c_duckdb_create_bool :: CBool -> IO DuckDBValue
- c_duckdb_create_int8 :: Int8 -> IO DuckDBValue
- c_duckdb_create_uint8 :: Word8 -> IO DuckDBValue
- c_duckdb_create_int16 :: Int16 -> IO DuckDBValue
- c_duckdb_create_uint16 :: Word16 -> IO DuckDBValue
- c_duckdb_create_int32 :: Int32 -> IO DuckDBValue
- c_duckdb_create_uint32 :: Word32 -> IO DuckDBValue
- c_duckdb_create_uint64 :: Word64 -> IO DuckDBValue
- c_duckdb_create_int64 :: Int64 -> IO DuckDBValue
- c_duckdb_create_hugeint :: Ptr DuckDBHugeInt -> IO DuckDBValue
- c_duckdb_create_uhugeint :: Ptr DuckDBUHugeInt -> IO DuckDBValue
- c_duckdb_create_bignum :: Ptr DuckDBBignum -> IO DuckDBValue
- c_duckdb_create_decimal :: Ptr DuckDBDecimal -> IO DuckDBValue
- c_duckdb_create_float :: CFloat -> IO DuckDBValue
- c_duckdb_create_double :: CDouble -> IO DuckDBValue
- c_duckdb_create_date :: DuckDBDate -> IO DuckDBValue
- c_duckdb_create_time :: DuckDBTime -> IO DuckDBValue
- c_duckdb_create_time_ns :: DuckDBTimeNs -> IO DuckDBValue
- c_duckdb_create_time_tz_value :: DuckDBTimeTz -> IO DuckDBValue
- c_duckdb_create_timestamp :: DuckDBTimestamp -> IO DuckDBValue
- c_duckdb_create_timestamp_tz :: DuckDBTimestamp -> IO DuckDBValue
- c_duckdb_create_timestamp_s :: DuckDBTimestampS -> IO DuckDBValue
- c_duckdb_create_timestamp_ms :: DuckDBTimestampMs -> IO DuckDBValue
- c_duckdb_create_timestamp_ns :: DuckDBTimestampNs -> IO DuckDBValue
- c_duckdb_create_interval :: Ptr DuckDBInterval -> IO DuckDBValue
- c_duckdb_create_blob :: Ptr Word8 -> DuckDBIdx -> IO DuckDBValue
- c_duckdb_create_bit :: Ptr DuckDBBit -> IO DuckDBValue
- c_duckdb_create_uuid :: Ptr DuckDBUHugeInt -> IO DuckDBValue
- c_duckdb_get_bool :: DuckDBValue -> IO CBool
- c_duckdb_get_int8 :: DuckDBValue -> IO Int8
- c_duckdb_get_uint8 :: DuckDBValue -> IO Word8
- c_duckdb_get_int16 :: DuckDBValue -> IO Int16
- c_duckdb_get_uint16 :: DuckDBValue -> IO Word16
- c_duckdb_get_int32 :: DuckDBValue -> IO Int32
- c_duckdb_get_uint32 :: DuckDBValue -> IO Word32
- c_duckdb_get_int64 :: DuckDBValue -> IO Int64
- c_duckdb_get_uint64 :: DuckDBValue -> IO Word64
- c_duckdb_get_hugeint :: DuckDBValue -> Ptr DuckDBHugeInt -> IO ()
- c_duckdb_get_uhugeint :: DuckDBValue -> Ptr DuckDBUHugeInt -> IO ()
- c_duckdb_get_bignum :: DuckDBValue -> Ptr DuckDBBignum -> IO ()
- c_duckdb_get_decimal :: DuckDBValue -> Ptr DuckDBDecimal -> IO ()
- c_duckdb_get_float :: DuckDBValue -> IO CFloat
- c_duckdb_get_double :: DuckDBValue -> IO CDouble
- c_duckdb_get_date :: DuckDBValue -> IO DuckDBDate
- c_duckdb_get_time :: DuckDBValue -> IO DuckDBTime
- c_duckdb_get_time_ns :: DuckDBValue -> IO DuckDBTimeNs
- c_duckdb_get_time_tz :: DuckDBValue -> IO DuckDBTimeTz
- c_duckdb_get_timestamp :: DuckDBValue -> IO DuckDBTimestamp
- c_duckdb_get_timestamp_tz :: DuckDBValue -> IO DuckDBTimestamp
- c_duckdb_get_timestamp_s :: DuckDBValue -> IO DuckDBTimestampS
- c_duckdb_get_timestamp_ms :: DuckDBValue -> IO DuckDBTimestampMs
- c_duckdb_get_timestamp_ns :: DuckDBValue -> IO DuckDBTimestampNs
- c_duckdb_get_interval :: DuckDBValue -> Ptr DuckDBInterval -> IO ()
- c_duckdb_get_value_type :: DuckDBValue -> IO DuckDBLogicalType
- c_duckdb_get_blob :: DuckDBValue -> Ptr DuckDBBlob -> IO ()
- c_duckdb_get_bit :: DuckDBValue -> Ptr DuckDBBit -> IO ()
- c_duckdb_get_uuid :: DuckDBValue -> Ptr DuckDBUHugeInt -> IO ()
- c_duckdb_get_varchar :: DuckDBValue -> IO CString
- c_duckdb_create_struct_value :: DuckDBLogicalType -> Ptr DuckDBValue -> IO DuckDBValue
- c_duckdb_create_list_value :: DuckDBLogicalType -> Ptr DuckDBValue -> DuckDBIdx -> IO DuckDBValue
- c_duckdb_create_array_value :: DuckDBLogicalType -> Ptr DuckDBValue -> DuckDBIdx -> IO DuckDBValue
- c_duckdb_create_map_value :: DuckDBLogicalType -> Ptr DuckDBValue -> Ptr DuckDBValue -> DuckDBIdx -> IO DuckDBValue
- c_duckdb_create_union_value :: DuckDBLogicalType -> DuckDBIdx -> DuckDBValue -> IO DuckDBValue
- c_duckdb_get_map_size :: DuckDBValue -> IO DuckDBIdx
- c_duckdb_get_map_key :: DuckDBValue -> DuckDBIdx -> IO DuckDBValue
- c_duckdb_get_map_value :: DuckDBValue -> DuckDBIdx -> IO DuckDBValue
- c_duckdb_is_null_value :: DuckDBValue -> IO CBool
- c_duckdb_create_null_value :: IO DuckDBValue
- c_duckdb_get_list_size :: DuckDBValue -> IO DuckDBIdx
- c_duckdb_get_list_child :: DuckDBValue -> DuckDBIdx -> IO DuckDBValue
- c_duckdb_create_enum_value :: DuckDBLogicalType -> Word64 -> IO DuckDBValue
- c_duckdb_get_enum_value :: DuckDBValue -> IO Word64
- c_duckdb_get_struct_child :: DuckDBValue -> DuckDBIdx -> IO DuckDBValue
- c_duckdb_value_to_string :: DuckDBValue -> IO CString
- c_duckdb_create_logical_type :: DuckDBType -> IO DuckDBLogicalType
- c_duckdb_logical_type_get_alias :: DuckDBLogicalType -> IO CString
- c_duckdb_logical_type_set_alias :: DuckDBLogicalType -> CString -> IO ()
- c_duckdb_create_list_type :: DuckDBLogicalType -> IO DuckDBLogicalType
- c_duckdb_create_array_type :: DuckDBLogicalType -> DuckDBIdx -> IO DuckDBLogicalType
- c_duckdb_create_map_type :: DuckDBLogicalType -> DuckDBLogicalType -> IO DuckDBLogicalType
- c_duckdb_create_union_type :: Ptr DuckDBLogicalType -> Ptr CString -> DuckDBIdx -> IO DuckDBLogicalType
- c_duckdb_create_struct_type :: Ptr DuckDBLogicalType -> Ptr CString -> DuckDBIdx -> IO DuckDBLogicalType
- c_duckdb_create_enum_type :: Ptr CString -> DuckDBIdx -> IO DuckDBLogicalType
- c_duckdb_create_decimal_type :: Word8 -> Word8 -> IO DuckDBLogicalType
- c_duckdb_get_type_id :: DuckDBLogicalType -> IO DuckDBType
- c_duckdb_decimal_width :: DuckDBLogicalType -> IO Word8
- c_duckdb_decimal_scale :: DuckDBLogicalType -> IO Word8
- c_duckdb_decimal_internal_type :: DuckDBLogicalType -> IO DuckDBType
- c_duckdb_enum_internal_type :: DuckDBLogicalType -> IO DuckDBType
- c_duckdb_enum_dictionary_size :: DuckDBLogicalType -> IO Word32
- c_duckdb_enum_dictionary_value :: DuckDBLogicalType -> DuckDBIdx -> IO CString
- c_duckdb_list_type_child_type :: DuckDBLogicalType -> IO DuckDBLogicalType
- c_duckdb_array_type_child_type :: DuckDBLogicalType -> IO DuckDBLogicalType
- c_duckdb_array_type_array_size :: DuckDBLogicalType -> IO DuckDBIdx
- c_duckdb_map_type_key_type :: DuckDBLogicalType -> IO DuckDBLogicalType
- c_duckdb_map_type_value_type :: DuckDBLogicalType -> IO DuckDBLogicalType
- c_duckdb_struct_type_child_count :: DuckDBLogicalType -> IO DuckDBIdx
- c_duckdb_struct_type_child_name :: DuckDBLogicalType -> DuckDBIdx -> IO CString
- c_duckdb_struct_type_child_type :: DuckDBLogicalType -> DuckDBIdx -> IO DuckDBLogicalType
- c_duckdb_union_type_member_count :: DuckDBLogicalType -> IO DuckDBIdx
- c_duckdb_union_type_member_name :: DuckDBLogicalType -> DuckDBIdx -> IO CString
- c_duckdb_union_type_member_type :: DuckDBLogicalType -> DuckDBIdx -> IO DuckDBLogicalType
- c_duckdb_destroy_logical_type :: Ptr DuckDBLogicalType -> IO ()
- c_duckdb_register_logical_type :: DuckDBConnection -> DuckDBLogicalType -> DuckDBCreateTypeInfo -> IO DuckDBState
- c_duckdb_create_data_chunk :: Ptr DuckDBLogicalType -> DuckDBIdx -> IO DuckDBDataChunk
- c_duckdb_destroy_data_chunk :: Ptr DuckDBDataChunk -> IO ()
- c_duckdb_data_chunk_reset :: DuckDBDataChunk -> IO ()
- c_duckdb_data_chunk_get_column_count :: DuckDBDataChunk -> IO DuckDBIdx
- c_duckdb_data_chunk_get_vector :: DuckDBDataChunk -> DuckDBIdx -> IO DuckDBVector
- c_duckdb_data_chunk_get_size :: DuckDBDataChunk -> IO DuckDBIdx
- c_duckdb_data_chunk_set_size :: DuckDBDataChunk -> DuckDBIdx -> IO ()
- c_duckdb_create_vector :: DuckDBLogicalType -> DuckDBIdx -> IO DuckDBVector
- c_duckdb_destroy_vector :: Ptr DuckDBVector -> IO ()
- c_duckdb_vector_get_column_type :: DuckDBVector -> IO DuckDBLogicalType
- c_duckdb_vector_get_data :: DuckDBVector -> IO (Ptr ())
- c_duckdb_vector_get_validity :: DuckDBVector -> IO (Ptr Word64)
- c_duckdb_vector_ensure_validity_writable :: DuckDBVector -> IO ()
- c_duckdb_vector_assign_string_element :: DuckDBVector -> DuckDBIdx -> CString -> IO ()
- c_duckdb_vector_assign_string_element_len :: DuckDBVector -> DuckDBIdx -> CString -> DuckDBIdx -> IO ()
- c_duckdb_list_vector_get_child :: DuckDBVector -> IO DuckDBVector
- c_duckdb_list_vector_get_size :: DuckDBVector -> IO DuckDBIdx
- c_duckdb_list_vector_set_size :: DuckDBVector -> DuckDBIdx -> IO DuckDBState
- c_duckdb_list_vector_reserve :: DuckDBVector -> DuckDBIdx -> IO DuckDBState
- c_duckdb_struct_vector_get_child :: DuckDBVector -> DuckDBIdx -> IO DuckDBVector
- c_duckdb_array_vector_get_child :: DuckDBVector -> IO DuckDBVector
- c_duckdb_slice_vector :: DuckDBVector -> DuckDBSelectionVector -> DuckDBIdx -> IO ()
- c_duckdb_vector_copy_sel :: DuckDBVector -> DuckDBVector -> DuckDBSelectionVector -> DuckDBIdx -> DuckDBIdx -> DuckDBIdx -> IO ()
- c_duckdb_vector_reference_value :: DuckDBVector -> DuckDBValue -> IO ()
- c_duckdb_vector_reference_vector :: DuckDBVector -> DuckDBVector -> IO ()
- c_duckdb_validity_row_is_valid :: Ptr Word64 -> DuckDBIdx -> IO CBool
- c_duckdb_validity_set_row_validity :: Ptr Word64 -> DuckDBIdx -> CBool -> IO ()
- c_duckdb_validity_set_row_invalid :: Ptr Word64 -> DuckDBIdx -> IO ()
- c_duckdb_validity_set_row_valid :: Ptr Word64 -> DuckDBIdx -> IO ()
- c_duckdb_create_scalar_function :: IO DuckDBScalarFunction
- c_duckdb_destroy_scalar_function :: Ptr DuckDBScalarFunction -> IO ()
- c_duckdb_scalar_function_set_name :: DuckDBScalarFunction -> CString -> IO ()
- c_duckdb_scalar_function_set_varargs :: DuckDBScalarFunction -> DuckDBLogicalType -> IO ()
- c_duckdb_scalar_function_set_special_handling :: DuckDBScalarFunction -> IO ()
- c_duckdb_scalar_function_set_volatile :: DuckDBScalarFunction -> IO ()
- c_duckdb_scalar_function_add_parameter :: DuckDBScalarFunction -> DuckDBLogicalType -> IO ()
- c_duckdb_scalar_function_set_return_type :: DuckDBScalarFunction -> DuckDBLogicalType -> IO ()
- c_duckdb_scalar_function_set_extra_info :: DuckDBScalarFunction -> Ptr () -> DuckDBDeleteCallback -> IO ()
- c_duckdb_scalar_function_set_bind :: DuckDBScalarFunction -> DuckDBScalarFunctionBindFun -> IO ()
- c_duckdb_scalar_function_set_bind_data :: DuckDBBindInfo -> Ptr () -> DuckDBDeleteCallback -> IO ()
- c_duckdb_scalar_function_set_bind_data_copy :: DuckDBBindInfo -> DuckDBCopyCallback -> IO ()
- c_duckdb_scalar_function_bind_set_error :: DuckDBBindInfo -> CString -> IO ()
- c_duckdb_scalar_function_set_function :: DuckDBScalarFunction -> DuckDBScalarFunctionFun -> IO ()
- c_duckdb_register_scalar_function :: DuckDBConnection -> DuckDBScalarFunction -> IO DuckDBState
- c_duckdb_scalar_function_get_extra_info :: DuckDBFunctionInfo -> IO (Ptr ())
- c_duckdb_scalar_function_bind_get_extra_info :: DuckDBBindInfo -> IO (Ptr ())
- c_duckdb_scalar_function_get_bind_data :: DuckDBFunctionInfo -> IO (Ptr ())
- c_duckdb_scalar_function_get_client_context :: DuckDBBindInfo -> Ptr DuckDBClientContext -> IO ()
- c_duckdb_scalar_function_set_error :: DuckDBFunctionInfo -> CString -> IO ()
- c_duckdb_create_scalar_function_set :: CString -> IO DuckDBScalarFunctionSet
- c_duckdb_destroy_scalar_function_set :: Ptr DuckDBScalarFunctionSet -> IO ()
- c_duckdb_add_scalar_function_to_set :: DuckDBScalarFunctionSet -> DuckDBScalarFunction -> IO DuckDBState
- c_duckdb_register_scalar_function_set :: DuckDBConnection -> DuckDBScalarFunctionSet -> IO DuckDBState
- c_duckdb_scalar_function_bind_get_argument_count :: DuckDBBindInfo -> IO DuckDBIdx
- c_duckdb_scalar_function_bind_get_argument :: DuckDBBindInfo -> DuckDBIdx -> IO DuckDBExpression
- c_duckdb_create_table_function :: IO DuckDBTableFunction
- c_duckdb_destroy_table_function :: Ptr DuckDBTableFunction -> IO ()
- c_duckdb_table_function_set_name :: DuckDBTableFunction -> CString -> IO ()
- c_duckdb_table_function_add_parameter :: DuckDBTableFunction -> DuckDBLogicalType -> IO ()
- c_duckdb_table_function_add_named_parameter :: DuckDBTableFunction -> CString -> DuckDBLogicalType -> IO ()
- c_duckdb_table_function_set_extra_info :: DuckDBTableFunction -> Ptr () -> DuckDBDeleteCallback -> IO ()
- c_duckdb_table_function_set_bind :: DuckDBTableFunction -> DuckDBTableFunctionBindFun -> IO ()
- c_duckdb_table_function_set_init :: DuckDBTableFunction -> DuckDBTableFunctionInitFun -> IO ()
- c_duckdb_table_function_set_local_init :: DuckDBTableFunction -> DuckDBTableFunctionInitFun -> IO ()
- c_duckdb_table_function_set_function :: DuckDBTableFunction -> DuckDBTableFunctionFun -> IO ()
- c_duckdb_table_function_supports_projection_pushdown :: DuckDBTableFunction -> CBool -> IO ()
- c_duckdb_register_table_function :: DuckDBConnection -> DuckDBTableFunction -> IO DuckDBState
- c_duckdb_bind_get_extra_info :: DuckDBBindInfo -> IO (Ptr ())
- c_duckdb_table_function_get_client_context :: DuckDBBindInfo -> Ptr DuckDBClientContext -> IO ()
- c_duckdb_bind_add_result_column :: DuckDBBindInfo -> CString -> DuckDBLogicalType -> IO ()
- c_duckdb_bind_get_parameter_count :: DuckDBBindInfo -> IO DuckDBIdx
- c_duckdb_bind_get_parameter :: DuckDBBindInfo -> DuckDBIdx -> IO DuckDBValue
- c_duckdb_bind_get_named_parameter :: DuckDBBindInfo -> CString -> IO DuckDBValue
- c_duckdb_bind_set_bind_data :: DuckDBBindInfo -> Ptr () -> DuckDBDeleteCallback -> IO ()
- c_duckdb_bind_set_cardinality :: DuckDBBindInfo -> DuckDBIdx -> CBool -> IO ()
- c_duckdb_bind_set_error :: DuckDBBindInfo -> CString -> IO ()
- c_duckdb_init_get_extra_info :: DuckDBInitInfo -> IO (Ptr ())
- c_duckdb_init_get_bind_data :: DuckDBInitInfo -> IO (Ptr ())
- c_duckdb_init_set_init_data :: DuckDBInitInfo -> Ptr () -> DuckDBDeleteCallback -> IO ()
- c_duckdb_init_get_column_count :: DuckDBInitInfo -> IO DuckDBIdx
- c_duckdb_init_get_column_index :: DuckDBInitInfo -> DuckDBIdx -> IO DuckDBIdx
- c_duckdb_init_set_max_threads :: DuckDBInitInfo -> DuckDBIdx -> IO ()
- c_duckdb_init_set_error :: DuckDBInitInfo -> CString -> IO ()
- c_duckdb_function_get_extra_info :: DuckDBFunctionInfo -> IO (Ptr ())
- c_duckdb_function_get_bind_data :: DuckDBFunctionInfo -> IO (Ptr ())
- c_duckdb_function_get_init_data :: DuckDBFunctionInfo -> IO (Ptr ())
- c_duckdb_function_get_local_init_data :: DuckDBFunctionInfo -> IO (Ptr ())
- c_duckdb_function_set_error :: DuckDBFunctionInfo -> CString -> IO ()
- c_duckdb_create_selection_vector :: DuckDBIdx -> IO DuckDBSelectionVector
- c_duckdb_destroy_selection_vector :: DuckDBSelectionVector -> IO ()
- c_duckdb_selection_vector_get_data_ptr :: DuckDBSelectionVector -> IO (Ptr DuckDBSel)
- c_duckdb_create_aggregate_function :: IO DuckDBAggregateFunction
- c_duckdb_destroy_aggregate_function :: Ptr DuckDBAggregateFunction -> IO ()
- c_duckdb_aggregate_function_set_name :: DuckDBAggregateFunction -> CString -> IO ()
- c_duckdb_aggregate_function_add_parameter :: DuckDBAggregateFunction -> DuckDBLogicalType -> IO ()
- c_duckdb_aggregate_function_set_return_type :: DuckDBAggregateFunction -> DuckDBLogicalType -> IO ()
- c_duckdb_aggregate_function_set_functions :: DuckDBAggregateFunction -> DuckDBAggregateStateSizeFun -> DuckDBAggregateInitFun -> DuckDBAggregateUpdateFun -> DuckDBAggregateCombineFun -> DuckDBAggregateFinalizeFun -> IO ()
- c_duckdb_aggregate_function_set_destructor :: DuckDBAggregateFunction -> DuckDBAggregateDestroyFun -> IO ()
- c_duckdb_register_aggregate_function :: DuckDBConnection -> DuckDBAggregateFunction -> IO DuckDBState
- c_duckdb_aggregate_function_set_special_handling :: DuckDBAggregateFunction -> IO ()
- c_duckdb_aggregate_function_set_extra_info :: DuckDBAggregateFunction -> Ptr () -> DuckDBDeleteCallback -> IO ()
- c_duckdb_aggregate_function_get_extra_info :: DuckDBFunctionInfo -> IO (Ptr ())
- c_duckdb_aggregate_function_set_error :: DuckDBFunctionInfo -> CString -> IO ()
- c_duckdb_create_aggregate_function_set :: CString -> IO DuckDBAggregateFunctionSet
- c_duckdb_destroy_aggregate_function_set :: Ptr DuckDBAggregateFunctionSet -> IO ()
- c_duckdb_add_aggregate_function_to_set :: DuckDBAggregateFunctionSet -> DuckDBAggregateFunction -> IO DuckDBState
- c_duckdb_register_aggregate_function_set :: DuckDBConnection -> DuckDBAggregateFunctionSet -> IO DuckDBState
- c_duckdb_add_replacement_scan :: DuckDBDatabase -> DuckDBReplacementCallback -> Ptr () -> DuckDBDeleteCallback -> IO ()
- c_duckdb_replacement_scan_set_function_name :: DuckDBReplacementScanInfo -> CString -> IO ()
- c_duckdb_replacement_scan_add_parameter :: DuckDBReplacementScanInfo -> DuckDBValue -> IO ()
- c_duckdb_replacement_scan_set_error :: DuckDBReplacementScanInfo -> CString -> IO ()
- c_duckdb_get_profiling_info :: DuckDBConnection -> IO DuckDBProfilingInfo
- c_duckdb_profiling_info_get_value :: DuckDBProfilingInfo -> CString -> IO DuckDBValue
- c_duckdb_profiling_info_get_metrics :: DuckDBProfilingInfo -> IO DuckDBValue
- c_duckdb_profiling_info_get_child_count :: DuckDBProfilingInfo -> IO DuckDBIdx
- c_duckdb_profiling_info_get_child :: DuckDBProfilingInfo -> DuckDBIdx -> IO DuckDBProfilingInfo
- c_duckdb_appender_create :: DuckDBConnection -> CString -> CString -> Ptr DuckDBAppender -> IO DuckDBState
- c_duckdb_appender_create_ext :: DuckDBConnection -> CString -> CString -> CString -> Ptr DuckDBAppender -> IO DuckDBState
- c_duckdb_appender_create_query :: DuckDBConnection -> CString -> DuckDBIdx -> Ptr DuckDBLogicalType -> CString -> Ptr CString -> Ptr DuckDBAppender -> IO DuckDBState
- c_duckdb_appender_column_count :: DuckDBAppender -> IO DuckDBIdx
- c_duckdb_appender_column_type :: DuckDBAppender -> DuckDBIdx -> IO DuckDBLogicalType
- c_duckdb_appender_error :: DuckDBAppender -> IO CString
- c_duckdb_appender_error_data :: DuckDBAppender -> IO DuckDBErrorData
- c_duckdb_appender_flush :: DuckDBAppender -> IO DuckDBState
- c_duckdb_appender_close :: DuckDBAppender -> IO DuckDBState
- c_duckdb_appender_destroy :: Ptr DuckDBAppender -> IO DuckDBState
- c_duckdb_appender_add_column :: DuckDBAppender -> CString -> IO DuckDBState
- c_duckdb_appender_clear_columns :: DuckDBAppender -> IO DuckDBState
- c_duckdb_appender_begin_row :: DuckDBAppender -> IO DuckDBState
- c_duckdb_appender_end_row :: DuckDBAppender -> IO DuckDBState
- c_duckdb_append_default :: DuckDBAppender -> IO DuckDBState
- c_duckdb_append_default_to_chunk :: DuckDBAppender -> DuckDBDataChunk -> DuckDBIdx -> DuckDBIdx -> IO DuckDBState
- c_duckdb_append_bool :: DuckDBAppender -> CBool -> IO DuckDBState
- c_duckdb_append_int8 :: DuckDBAppender -> Int8 -> IO DuckDBState
- c_duckdb_append_int16 :: DuckDBAppender -> Int16 -> IO DuckDBState
- c_duckdb_append_int32 :: DuckDBAppender -> Int32 -> IO DuckDBState
- c_duckdb_append_int64 :: DuckDBAppender -> Int64 -> IO DuckDBState
- c_duckdb_append_hugeint :: DuckDBAppender -> Ptr DuckDBHugeInt -> IO DuckDBState
- c_duckdb_append_uint8 :: DuckDBAppender -> Word8 -> IO DuckDBState
- c_duckdb_append_uint16 :: DuckDBAppender -> Word16 -> IO DuckDBState
- c_duckdb_append_uint32 :: DuckDBAppender -> Word32 -> IO DuckDBState
- c_duckdb_append_uint64 :: DuckDBAppender -> Word64 -> IO DuckDBState
- c_duckdb_append_uhugeint :: DuckDBAppender -> Ptr DuckDBUHugeInt -> IO DuckDBState
- c_duckdb_append_float :: DuckDBAppender -> CFloat -> IO DuckDBState
- c_duckdb_append_double :: DuckDBAppender -> CDouble -> IO DuckDBState
- c_duckdb_append_date :: DuckDBAppender -> DuckDBDate -> IO DuckDBState
- c_duckdb_append_time :: DuckDBAppender -> DuckDBTime -> IO DuckDBState
- c_duckdb_append_timestamp :: DuckDBAppender -> DuckDBTimestamp -> IO DuckDBState
- c_duckdb_append_interval :: DuckDBAppender -> Ptr DuckDBInterval -> IO DuckDBState
- c_duckdb_append_varchar :: DuckDBAppender -> CString -> IO DuckDBState
- c_duckdb_append_varchar_length :: DuckDBAppender -> CString -> DuckDBIdx -> IO DuckDBState
- c_duckdb_append_blob :: DuckDBAppender -> Ptr () -> DuckDBIdx -> IO DuckDBState
- c_duckdb_append_null :: DuckDBAppender -> IO DuckDBState
- c_duckdb_append_value :: DuckDBAppender -> DuckDBValue -> IO DuckDBState
- c_duckdb_append_data_chunk :: DuckDBAppender -> DuckDBDataChunk -> IO DuckDBState
- c_duckdb_table_description_create :: DuckDBConnection -> CString -> CString -> Ptr DuckDBTableDescription -> IO DuckDBState
- c_duckdb_table_description_create_ext :: DuckDBConnection -> CString -> CString -> CString -> Ptr DuckDBTableDescription -> IO DuckDBState
- c_duckdb_table_description_destroy :: Ptr DuckDBTableDescription -> IO ()
- c_duckdb_table_description_error :: DuckDBTableDescription -> IO CString
- c_duckdb_column_has_default :: DuckDBTableDescription -> DuckDBIdx -> Ptr CBool -> IO DuckDBState
- c_duckdb_table_description_get_column_name :: DuckDBTableDescription -> DuckDBIdx -> IO CString
- c_duckdb_to_arrow_schema :: DuckDBArrowOptions -> Ptr DuckDBLogicalType -> Ptr CString -> DuckDBIdx -> Ptr ArrowSchema -> IO DuckDBErrorData
- c_duckdb_data_chunk_to_arrow :: DuckDBArrowOptions -> DuckDBDataChunk -> Ptr ArrowArray -> IO DuckDBErrorData
- c_duckdb_schema_from_arrow :: DuckDBConnection -> Ptr ArrowSchema -> Ptr DuckDBArrowConvertedSchema -> IO DuckDBErrorData
- c_duckdb_data_chunk_from_arrow :: DuckDBConnection -> Ptr ArrowArray -> DuckDBArrowConvertedSchema -> Ptr DuckDBDataChunk -> IO DuckDBErrorData
- c_duckdb_destroy_arrow_converted_schema :: Ptr DuckDBArrowConvertedSchema -> IO ()
- c_duckdb_query_arrow :: DuckDBConnection -> CString -> Ptr DuckDBArrow -> IO DuckDBState
- c_duckdb_query_arrow_schema :: DuckDBArrow -> Ptr DuckDBArrowSchema -> IO DuckDBState
- c_duckdb_prepared_arrow_schema :: DuckDBPreparedStatement -> Ptr DuckDBArrowSchema -> IO DuckDBState
- c_duckdb_result_arrow_array :: Ptr DuckDBResult -> DuckDBDataChunk -> Ptr DuckDBArrowArray -> IO ()
- c_duckdb_query_arrow_array :: DuckDBArrow -> Ptr DuckDBArrowArray -> IO DuckDBState
- c_duckdb_arrow_column_count :: DuckDBArrow -> IO DuckDBIdx
- c_duckdb_arrow_row_count :: DuckDBArrow -> IO DuckDBIdx
- c_duckdb_arrow_rows_changed :: DuckDBArrow -> IO DuckDBIdx
- c_duckdb_query_arrow_error :: DuckDBArrow -> IO CString
- c_duckdb_destroy_arrow :: Ptr DuckDBArrow -> IO ()
- c_duckdb_destroy_arrow_stream :: Ptr DuckDBArrowStream -> IO ()
- c_duckdb_execute_prepared_arrow :: DuckDBPreparedStatement -> Ptr DuckDBArrow -> IO DuckDBState
- c_duckdb_arrow_scan :: DuckDBConnection -> CString -> DuckDBArrowStream -> IO DuckDBState
- c_duckdb_arrow_array_scan :: DuckDBConnection -> CString -> DuckDBArrowSchema -> DuckDBArrowArray -> Ptr DuckDBArrowStream -> IO DuckDBState
- duckdbArrowSchemaInternal :: DuckDBArrowSchema -> IO (Maybe ArrowSchemaPtr)
- duckdbArrowSchemaClear :: DuckDBArrowSchema -> IO ()
- duckdbArrowArrayInternal :: DuckDBArrowArray -> IO (Maybe ArrowArrayPtr)
- duckdbArrowArrayClear :: DuckDBArrowArray -> IO ()
- duckdbArrowStreamInternal :: DuckDBArrowStream -> IO (Maybe ArrowStreamPtr)
- duckdbArrowStreamClear :: DuckDBArrowStream -> IO ()
- c_duckdb_execute_tasks :: DuckDBDatabase -> DuckDBIdx -> IO ()
- c_duckdb_create_task_state :: DuckDBDatabase -> IO DuckDBTaskState
- c_duckdb_execute_tasks_state :: DuckDBTaskState -> IO ()
- c_duckdb_execute_n_tasks_state :: DuckDBTaskState -> DuckDBIdx -> IO DuckDBIdx
- c_duckdb_finish_execution :: DuckDBTaskState -> IO ()
- c_duckdb_task_state_is_finished :: DuckDBTaskState -> IO CBool
- c_duckdb_destroy_task_state :: DuckDBTaskState -> IO ()
- c_duckdb_execution_is_finished :: DuckDBConnection -> IO CBool
- c_duckdb_stream_fetch_chunk :: Ptr DuckDBResult -> IO DuckDBDataChunk
- c_duckdb_fetch_chunk :: Ptr DuckDBResult -> IO DuckDBDataChunk
- c_duckdb_create_cast_function :: IO DuckDBCastFunction
- c_duckdb_cast_function_set_source_type :: DuckDBCastFunction -> DuckDBLogicalType -> IO ()
- c_duckdb_cast_function_set_target_type :: DuckDBCastFunction -> DuckDBLogicalType -> IO ()
- c_duckdb_cast_function_set_implicit_cast_cost :: DuckDBCastFunction -> Int64 -> IO ()
- c_duckdb_cast_function_set_function :: DuckDBCastFunction -> DuckDBCastFunctionFun -> IO ()
- c_duckdb_cast_function_set_extra_info :: DuckDBCastFunction -> Ptr () -> DuckDBDeleteCallback -> IO ()
- c_duckdb_cast_function_get_extra_info :: DuckDBFunctionInfo -> IO (Ptr ())
- c_duckdb_cast_function_get_cast_mode :: DuckDBFunctionInfo -> IO DuckDBCastMode
- c_duckdb_cast_function_set_error :: DuckDBFunctionInfo -> CString -> IO ()
- c_duckdb_cast_function_set_row_error :: DuckDBFunctionInfo -> CString -> DuckDBIdx -> DuckDBVector -> IO ()
- c_duckdb_register_cast_function :: DuckDBConnection -> DuckDBCastFunction -> IO DuckDBState
- c_duckdb_destroy_cast_function :: Ptr DuckDBCastFunction -> IO ()
- c_duckdb_destroy_expression :: Ptr DuckDBExpression -> IO ()
- c_duckdb_expression_return_type :: DuckDBExpression -> IO DuckDBLogicalType
- c_duckdb_expression_is_foldable :: DuckDBExpression -> IO CBool
- c_duckdb_expression_fold :: DuckDBClientContext -> DuckDBExpression -> Ptr DuckDBValue -> IO DuckDBErrorData
Enumerations
newtype DuckDBState Source #
Result state returned by most DuckDB C API calls.
Constructors
DuckDBState | |
Fields |
Instances
pattern DuckDBSuccess :: DuckDBState Source #
Pattern synonyms for duckdb_state
constants.
pattern DuckDBError :: DuckDBState Source #
Pattern synonyms for duckdb_state
constants.
newtype DuckDBType Source #
DuckDB primitive physical type identifiers (mirrors duckdb_type
).
Constructors
DuckDBType | |
Fields
|
Instances
pattern DuckDBTypeInvalid :: DuckDBType Source #
Pattern synonyms for DuckDB's physical value type tags.
pattern DuckDBTypeBoolean :: DuckDBType Source #
Pattern synonyms for DuckDB's physical value type tags.
pattern DuckDBTypeTinyInt :: DuckDBType Source #
Pattern synonyms for DuckDB's physical value type tags.
pattern DuckDBTypeSmallInt :: DuckDBType Source #
Pattern synonyms for DuckDB's physical value type tags.
pattern DuckDBTypeInteger :: DuckDBType Source #
Pattern synonyms for DuckDB's physical value type tags.
pattern DuckDBTypeBigInt :: DuckDBType Source #
Pattern synonyms for DuckDB's physical value type tags.
pattern DuckDBTypeUTinyInt :: DuckDBType Source #
Pattern synonyms for DuckDB's physical value type tags.
pattern DuckDBTypeUSmallInt :: DuckDBType Source #
Pattern synonyms for DuckDB's physical value type tags.
pattern DuckDBTypeUInteger :: DuckDBType Source #
Pattern synonyms for DuckDB's physical value type tags.
pattern DuckDBTypeUBigInt :: DuckDBType Source #
Pattern synonyms for DuckDB's physical value type tags.
pattern DuckDBTypeFloat :: DuckDBType Source #
Pattern synonyms for DuckDB's physical value type tags.
pattern DuckDBTypeDouble :: DuckDBType Source #
Pattern synonyms for DuckDB's physical value type tags.
pattern DuckDBTypeTimestamp :: DuckDBType Source #
Pattern synonyms for DuckDB's physical value type tags.
pattern DuckDBTypeDate :: DuckDBType Source #
Pattern synonyms for DuckDB's physical value type tags.
pattern DuckDBTypeTime :: DuckDBType Source #
Pattern synonyms for DuckDB's physical value type tags.
pattern DuckDBTypeInterval :: DuckDBType Source #
Pattern synonyms for DuckDB's physical value type tags.
pattern DuckDBTypeHugeInt :: DuckDBType Source #
Pattern synonyms for DuckDB's physical value type tags.
pattern DuckDBTypeUHugeInt :: DuckDBType Source #
Pattern synonyms for DuckDB's physical value type tags.
pattern DuckDBTypeVarchar :: DuckDBType Source #
Pattern synonyms for DuckDB's physical value type tags.
pattern DuckDBTypeBlob :: DuckDBType Source #
Pattern synonyms for DuckDB's physical value type tags.
pattern DuckDBTypeDecimal :: DuckDBType Source #
Pattern synonyms for DuckDB's physical value type tags.
pattern DuckDBTypeTimestampS :: DuckDBType Source #
Pattern synonyms for DuckDB's physical value type tags.
pattern DuckDBTypeTimestampMs :: DuckDBType Source #
Pattern synonyms for DuckDB's physical value type tags.
pattern DuckDBTypeTimestampNs :: DuckDBType Source #
Pattern synonyms for DuckDB's physical value type tags.
pattern DuckDBTypeEnum :: DuckDBType Source #
Pattern synonyms for DuckDB's physical value type tags.
pattern DuckDBTypeList :: DuckDBType Source #
Pattern synonyms for DuckDB's physical value type tags.
pattern DuckDBTypeStruct :: DuckDBType Source #
Pattern synonyms for DuckDB's physical value type tags.
pattern DuckDBTypeMap :: DuckDBType Source #
Pattern synonyms for DuckDB's physical value type tags.
pattern DuckDBTypeArray :: DuckDBType Source #
Pattern synonyms for DuckDB's physical value type tags.
pattern DuckDBTypeUUID :: DuckDBType Source #
Pattern synonyms for DuckDB's physical value type tags.
pattern DuckDBTypeUnion :: DuckDBType Source #
Pattern synonyms for DuckDB's physical value type tags.
pattern DuckDBTypeBit :: DuckDBType Source #
Pattern synonyms for DuckDB's physical value type tags.
pattern DuckDBTypeTimeTz :: DuckDBType Source #
Pattern synonyms for DuckDB's physical value type tags.
pattern DuckDBTypeTimestampTz :: DuckDBType Source #
Pattern synonyms for DuckDB's physical value type tags.
pattern DuckDBTypeAny :: DuckDBType Source #
Pattern synonyms for DuckDB's physical value type tags.
pattern DuckDBTypeBigNum :: DuckDBType Source #
Pattern synonyms for DuckDB's physical value type tags.
pattern DuckDBTypeSQLNull :: DuckDBType Source #
Pattern synonyms for DuckDB's physical value type tags.
pattern DuckDBTypeStringLiteral :: DuckDBType Source #
Pattern synonyms for DuckDB's physical value type tags.
pattern DuckDBTypeIntegerLiteral :: DuckDBType Source #
Pattern synonyms for DuckDB's physical value type tags.
pattern DuckDBTypeTimeNs :: DuckDBType Source #
Pattern synonyms for DuckDB's physical value type tags.
newtype DuckDBPendingState Source #
Pending result state returned from duckdb_pending_*
APIs.
Constructors
DuckDBPendingState | |
Fields |
Instances
pattern DuckDBPendingResultReady :: DuckDBPendingState Source #
Pattern synonyms for duckdb_pending_state
constants.
pattern DuckDBPendingResultNotReady :: DuckDBPendingState Source #
Pattern synonyms for duckdb_pending_state
constants.
pattern DuckDBPendingError :: DuckDBPendingState Source #
Pattern synonyms for duckdb_pending_state
constants.
pattern DuckDBPendingNoTasksAvailable :: DuckDBPendingState Source #
Pattern synonyms for duckdb_pending_state
constants.
newtype DuckDBResultType Source #
Result payload type returned by DuckDB queries (duckdb_result_type
).
Constructors
DuckDBResultType | |
Fields |
Instances
pattern DuckDBResultTypeInvalid :: DuckDBResultType Source #
Pattern synonyms for duckdb_result_type
constants.
pattern DuckDBResultTypeChangedRows :: DuckDBResultType Source #
Pattern synonyms for duckdb_result_type
constants.
pattern DuckDBResultTypeNothing :: DuckDBResultType Source #
Pattern synonyms for duckdb_result_type
constants.
pattern DuckDBResultTypeQueryResult :: DuckDBResultType Source #
Pattern synonyms for duckdb_result_type
constants.
newtype DuckDBStatementType Source #
Classifies the SQL statement executed (duckdb_statement_type
).
Constructors
DuckDBStatementType | |
Fields |
Instances
pattern DuckDBStatementTypeInvalid :: DuckDBStatementType Source #
Pattern synonyms for duckdb_statement_type
constants.
pattern DuckDBStatementTypeSelect :: DuckDBStatementType Source #
Pattern synonyms for duckdb_statement_type
constants.
pattern DuckDBStatementTypeInsert :: DuckDBStatementType Source #
Pattern synonyms for duckdb_statement_type
constants.
pattern DuckDBStatementTypeUpdate :: DuckDBStatementType Source #
Pattern synonyms for duckdb_statement_type
constants.
pattern DuckDBStatementTypeExplain :: DuckDBStatementType Source #
Pattern synonyms for duckdb_statement_type
constants.
pattern DuckDBStatementTypeDelete :: DuckDBStatementType Source #
Pattern synonyms for duckdb_statement_type
constants.
pattern DuckDBStatementTypePrepare :: DuckDBStatementType Source #
Pattern synonyms for duckdb_statement_type
constants.
pattern DuckDBStatementTypeCreate :: DuckDBStatementType Source #
Pattern synonyms for duckdb_statement_type
constants.
pattern DuckDBStatementTypeExecute :: DuckDBStatementType Source #
Pattern synonyms for duckdb_statement_type
constants.
pattern DuckDBStatementTypeAlter :: DuckDBStatementType Source #
Pattern synonyms for duckdb_statement_type
constants.
pattern DuckDBStatementTypeTransaction :: DuckDBStatementType Source #
Pattern synonyms for duckdb_statement_type
constants.
pattern DuckDBStatementTypeCopy :: DuckDBStatementType Source #
Pattern synonyms for duckdb_statement_type
constants.
pattern DuckDBStatementTypeAnalyze :: DuckDBStatementType Source #
Pattern synonyms for duckdb_statement_type
constants.
pattern DuckDBStatementTypeVariableSet :: DuckDBStatementType Source #
Pattern synonyms for duckdb_statement_type
constants.
pattern DuckDBStatementTypeCreateFunc :: DuckDBStatementType Source #
Pattern synonyms for duckdb_statement_type
constants.
pattern DuckDBStatementTypeDrop :: DuckDBStatementType Source #
Pattern synonyms for duckdb_statement_type
constants.
pattern DuckDBStatementTypeExport :: DuckDBStatementType Source #
Pattern synonyms for duckdb_statement_type
constants.
pattern DuckDBStatementTypePragma :: DuckDBStatementType Source #
Pattern synonyms for duckdb_statement_type
constants.
pattern DuckDBStatementTypeVacuum :: DuckDBStatementType Source #
Pattern synonyms for duckdb_statement_type
constants.
pattern DuckDBStatementTypeCall :: DuckDBStatementType Source #
Pattern synonyms for duckdb_statement_type
constants.
pattern DuckDBStatementTypeSet :: DuckDBStatementType Source #
Pattern synonyms for duckdb_statement_type
constants.
pattern DuckDBStatementTypeLoad :: DuckDBStatementType Source #
Pattern synonyms for duckdb_statement_type
constants.
pattern DuckDBStatementTypeRelation :: DuckDBStatementType Source #
Pattern synonyms for duckdb_statement_type
constants.
pattern DuckDBStatementTypeExtension :: DuckDBStatementType Source #
Pattern synonyms for duckdb_statement_type
constants.
pattern DuckDBStatementTypeLogicalPlan :: DuckDBStatementType Source #
Pattern synonyms for duckdb_statement_type
constants.
pattern DuckDBStatementTypeAttach :: DuckDBStatementType Source #
Pattern synonyms for duckdb_statement_type
constants.
pattern DuckDBStatementTypeDetach :: DuckDBStatementType Source #
Pattern synonyms for duckdb_statement_type
constants.
pattern DuckDBStatementTypeMulti :: DuckDBStatementType Source #
Pattern synonyms for duckdb_statement_type
constants.
newtype DuckDBErrorType Source #
DuckDB error classification codes.
Constructors
DuckDBErrorType | |
Fields |
Instances
pattern DuckDBErrorInvalid :: DuckDBErrorType Source #
Pattern synonyms mirroring duckdb_error_type
values.
pattern DuckDBErrorOutOfRange :: DuckDBErrorType Source #
Pattern synonyms mirroring duckdb_error_type
values.
pattern DuckDBErrorConversion :: DuckDBErrorType Source #
Pattern synonyms mirroring duckdb_error_type
values.
pattern DuckDBErrorUnknownType :: DuckDBErrorType Source #
Pattern synonyms mirroring duckdb_error_type
values.
pattern DuckDBErrorDecimal :: DuckDBErrorType Source #
Pattern synonyms mirroring duckdb_error_type
values.
pattern DuckDBErrorMismatchType :: DuckDBErrorType Source #
Pattern synonyms mirroring duckdb_error_type
values.
pattern DuckDBErrorDivideByZero :: DuckDBErrorType Source #
Pattern synonyms mirroring duckdb_error_type
values.
pattern DuckDBErrorObjectSize :: DuckDBErrorType Source #
Pattern synonyms mirroring duckdb_error_type
values.
pattern DuckDBErrorInvalidType :: DuckDBErrorType Source #
Pattern synonyms mirroring duckdb_error_type
values.
pattern DuckDBErrorSerialization :: DuckDBErrorType Source #
Pattern synonyms mirroring duckdb_error_type
values.
pattern DuckDBErrorTransaction :: DuckDBErrorType Source #
Pattern synonyms mirroring duckdb_error_type
values.
pattern DuckDBErrorNotImplemented :: DuckDBErrorType Source #
Pattern synonyms mirroring duckdb_error_type
values.
pattern DuckDBErrorExpression :: DuckDBErrorType Source #
Pattern synonyms mirroring duckdb_error_type
values.
pattern DuckDBErrorCatalog :: DuckDBErrorType Source #
Pattern synonyms mirroring duckdb_error_type
values.
pattern DuckDBErrorParser :: DuckDBErrorType Source #
Pattern synonyms mirroring duckdb_error_type
values.
pattern DuckDBErrorPlanner :: DuckDBErrorType Source #
Pattern synonyms mirroring duckdb_error_type
values.
pattern DuckDBErrorScheduler :: DuckDBErrorType Source #
Pattern synonyms mirroring duckdb_error_type
values.
pattern DuckDBErrorExecutor :: DuckDBErrorType Source #
Pattern synonyms mirroring duckdb_error_type
values.
pattern DuckDBErrorConstraint :: DuckDBErrorType Source #
Pattern synonyms mirroring duckdb_error_type
values.
pattern DuckDBErrorIndex :: DuckDBErrorType Source #
Pattern synonyms mirroring duckdb_error_type
values.
pattern DuckDBErrorStat :: DuckDBErrorType Source #
Pattern synonyms mirroring duckdb_error_type
values.
pattern DuckDBErrorConnection :: DuckDBErrorType Source #
Pattern synonyms mirroring duckdb_error_type
values.
pattern DuckDBErrorSyntax :: DuckDBErrorType Source #
Pattern synonyms mirroring duckdb_error_type
values.
pattern DuckDBErrorSettings :: DuckDBErrorType Source #
Pattern synonyms mirroring duckdb_error_type
values.
pattern DuckDBErrorBinder :: DuckDBErrorType Source #
Pattern synonyms mirroring duckdb_error_type
values.
pattern DuckDBErrorNetwork :: DuckDBErrorType Source #
Pattern synonyms mirroring duckdb_error_type
values.
pattern DuckDBErrorOptimizer :: DuckDBErrorType Source #
Pattern synonyms mirroring duckdb_error_type
values.
pattern DuckDBErrorNullPointer :: DuckDBErrorType Source #
Pattern synonyms mirroring duckdb_error_type
values.
pattern DuckDBErrorIO :: DuckDBErrorType Source #
Pattern synonyms mirroring duckdb_error_type
values.
pattern DuckDBErrorInterrupt :: DuckDBErrorType Source #
Pattern synonyms mirroring duckdb_error_type
values.
pattern DuckDBErrorFatal :: DuckDBErrorType Source #
Pattern synonyms mirroring duckdb_error_type
values.
pattern DuckDBErrorInternal :: DuckDBErrorType Source #
Pattern synonyms mirroring duckdb_error_type
values.
pattern DuckDBErrorInvalidInput :: DuckDBErrorType Source #
Pattern synonyms mirroring duckdb_error_type
values.
pattern DuckDBErrorOutOfMemory :: DuckDBErrorType Source #
Pattern synonyms mirroring duckdb_error_type
values.
pattern DuckDBErrorPermission :: DuckDBErrorType Source #
Pattern synonyms mirroring duckdb_error_type
values.
pattern DuckDBErrorParameterNotResolved :: DuckDBErrorType Source #
Pattern synonyms mirroring duckdb_error_type
values.
pattern DuckDBErrorParameterNotAllowed :: DuckDBErrorType Source #
Pattern synonyms mirroring duckdb_error_type
values.
pattern DuckDBErrorDependency :: DuckDBErrorType Source #
Pattern synonyms mirroring duckdb_error_type
values.
pattern DuckDBErrorHTTP :: DuckDBErrorType Source #
Pattern synonyms mirroring duckdb_error_type
values.
pattern DuckDBErrorMissingExtension :: DuckDBErrorType Source #
Pattern synonyms mirroring duckdb_error_type
values.
pattern DuckDBErrorAutoload :: DuckDBErrorType Source #
Pattern synonyms mirroring duckdb_error_type
values.
pattern DuckDBErrorSequence :: DuckDBErrorType Source #
Pattern synonyms mirroring duckdb_error_type
values.
pattern DuckDBInvalidConfiguration :: DuckDBErrorType Source #
Pattern synonyms mirroring duckdb_error_type
values.
pattern DuckDBErrorInvalidConfiguration :: DuckDBErrorType Source #
Deprecated: Use DuckDBInvalidConfiguration (matches upstream duckdb.h)
Backwards-compatible alias for DuckDBInvalidConfiguration
.
newtype DuckDBCastMode Source #
Behaviour of DuckDB's casting functions (duckdb_cast_mode
).
Constructors
DuckDBCastMode | |
Fields |
Instances
pattern DuckDBCastNormal :: DuckDBCastMode Source #
Pattern synonyms for duckdb_cast_mode
values.
pattern DuckDBCastTry :: DuckDBCastMode Source #
Pattern synonyms for duckdb_cast_mode
values.
Scalar Types
newtype DuckDBDate Source #
Represents DuckDB's duckdb_date
.
Constructors
DuckDBDate | |
Fields |
Instances
data DuckDBDateStruct Source #
Decomposed representation of a duckdb_date
.
Constructors
DuckDBDateStruct | |
Fields |
Instances
Storable DuckDBDateStruct Source # | |
Defined in Database.DuckDB.FFI.Types Methods sizeOf :: DuckDBDateStruct -> Int # alignment :: DuckDBDateStruct -> Int # peekElemOff :: Ptr DuckDBDateStruct -> Int -> IO DuckDBDateStruct # pokeElemOff :: Ptr DuckDBDateStruct -> Int -> DuckDBDateStruct -> IO () # peekByteOff :: Ptr b -> Int -> IO DuckDBDateStruct # pokeByteOff :: Ptr b -> Int -> DuckDBDateStruct -> IO () # peek :: Ptr DuckDBDateStruct -> IO DuckDBDateStruct # poke :: Ptr DuckDBDateStruct -> DuckDBDateStruct -> IO () # | |
Show DuckDBDateStruct Source # | |
Defined in Database.DuckDB.FFI.Types Methods showsPrec :: Int -> DuckDBDateStruct -> ShowS # show :: DuckDBDateStruct -> String # showList :: [DuckDBDateStruct] -> ShowS # | |
Eq DuckDBDateStruct Source # | |
Defined in Database.DuckDB.FFI.Types Methods (==) :: DuckDBDateStruct -> DuckDBDateStruct -> Bool # (/=) :: DuckDBDateStruct -> DuckDBDateStruct -> Bool # |
newtype DuckDBTime Source #
Represents DuckDB's duckdb_time
.
Constructors
DuckDBTime | |
Fields |
Instances
data DuckDBTimeStruct Source #
Decomposed representation of a duckdb_time
.
Constructors
DuckDBTimeStruct | |
Fields |
Instances
Storable DuckDBTimeStruct Source # | |
Defined in Database.DuckDB.FFI.Types Methods sizeOf :: DuckDBTimeStruct -> Int # alignment :: DuckDBTimeStruct -> Int # peekElemOff :: Ptr DuckDBTimeStruct -> Int -> IO DuckDBTimeStruct # pokeElemOff :: Ptr DuckDBTimeStruct -> Int -> DuckDBTimeStruct -> IO () # peekByteOff :: Ptr b -> Int -> IO DuckDBTimeStruct # pokeByteOff :: Ptr b -> Int -> DuckDBTimeStruct -> IO () # peek :: Ptr DuckDBTimeStruct -> IO DuckDBTimeStruct # poke :: Ptr DuckDBTimeStruct -> DuckDBTimeStruct -> IO () # | |
Show DuckDBTimeStruct Source # | |
Defined in Database.DuckDB.FFI.Types Methods showsPrec :: Int -> DuckDBTimeStruct -> ShowS # show :: DuckDBTimeStruct -> String # showList :: [DuckDBTimeStruct] -> ShowS # | |
Eq DuckDBTimeStruct Source # | |
Defined in Database.DuckDB.FFI.Types Methods (==) :: DuckDBTimeStruct -> DuckDBTimeStruct -> Bool # (/=) :: DuckDBTimeStruct -> DuckDBTimeStruct -> Bool # |
newtype DuckDBTimeNs Source #
Represents DuckDB's duckdb_time_ns
.
Constructors
DuckDBTimeNs | |
Fields |
Instances
newtype DuckDBTimeTz Source #
Represents DuckDB's duckdb_time_tz
.
Constructors
DuckDBTimeTz | |
Fields |
Instances
data DuckDBTimeTzStruct Source #
Decomposed representation of a duckdb_time_tz
.
Constructors
DuckDBTimeTzStruct | |
Fields |
Instances
Storable DuckDBTimeTzStruct Source # | |
Defined in Database.DuckDB.FFI.Types Methods sizeOf :: DuckDBTimeTzStruct -> Int # alignment :: DuckDBTimeTzStruct -> Int # peekElemOff :: Ptr DuckDBTimeTzStruct -> Int -> IO DuckDBTimeTzStruct # pokeElemOff :: Ptr DuckDBTimeTzStruct -> Int -> DuckDBTimeTzStruct -> IO () # peekByteOff :: Ptr b -> Int -> IO DuckDBTimeTzStruct # pokeByteOff :: Ptr b -> Int -> DuckDBTimeTzStruct -> IO () # peek :: Ptr DuckDBTimeTzStruct -> IO DuckDBTimeTzStruct # poke :: Ptr DuckDBTimeTzStruct -> DuckDBTimeTzStruct -> IO () # | |
Show DuckDBTimeTzStruct Source # | |
Defined in Database.DuckDB.FFI.Types Methods showsPrec :: Int -> DuckDBTimeTzStruct -> ShowS # show :: DuckDBTimeTzStruct -> String # showList :: [DuckDBTimeTzStruct] -> ShowS # | |
Eq DuckDBTimeTzStruct Source # | |
Defined in Database.DuckDB.FFI.Types Methods (==) :: DuckDBTimeTzStruct -> DuckDBTimeTzStruct -> Bool # (/=) :: DuckDBTimeTzStruct -> DuckDBTimeTzStruct -> Bool # |
newtype DuckDBTimestamp Source #
Represents DuckDB's duckdb_timestamp
.
Constructors
DuckDBTimestamp | |
Fields |
Instances
data DuckDBTimestampStruct Source #
Decomposed representation of a duckdb_timestamp
.
Constructors
DuckDBTimestampStruct | |
Instances
newtype DuckDBTimestampS Source #
Represents DuckDB's duckdb_timestamp_s
.
Constructors
DuckDBTimestampS | |
Fields |
Instances
newtype DuckDBTimestampMs Source #
Represents DuckDB's duckdb_timestamp_ms
.
Constructors
DuckDBTimestampMs | |
Fields |
Instances
newtype DuckDBTimestampNs Source #
Represents DuckDB's duckdb_timestamp_ns
.
Constructors
DuckDBTimestampNs | |
Fields |
Instances
data DuckDBInterval Source #
Represents DuckDB's duckdb_interval
.
Constructors
DuckDBInterval | |
Fields |
Instances
Storable DuckDBInterval Source # | |
Defined in Database.DuckDB.FFI.Types Methods sizeOf :: DuckDBInterval -> Int # alignment :: DuckDBInterval -> Int # peekElemOff :: Ptr DuckDBInterval -> Int -> IO DuckDBInterval # pokeElemOff :: Ptr DuckDBInterval -> Int -> DuckDBInterval -> IO () # peekByteOff :: Ptr b -> Int -> IO DuckDBInterval # pokeByteOff :: Ptr b -> Int -> DuckDBInterval -> IO () # peek :: Ptr DuckDBInterval -> IO DuckDBInterval # poke :: Ptr DuckDBInterval -> DuckDBInterval -> IO () # | |
Show DuckDBInterval Source # | |
Defined in Database.DuckDB.FFI.Types Methods showsPrec :: Int -> DuckDBInterval -> ShowS # show :: DuckDBInterval -> String # showList :: [DuckDBInterval] -> ShowS # | |
Eq DuckDBInterval Source # | |
Defined in Database.DuckDB.FFI.Types Methods (==) :: DuckDBInterval -> DuckDBInterval -> Bool # (/=) :: DuckDBInterval -> DuckDBInterval -> Bool # |
data DuckDBHugeInt Source #
Represents DuckDB's duckdb_hugeint
.
Constructors
DuckDBHugeInt | |
Fields |
Instances
Storable DuckDBHugeInt Source # | |
Defined in Database.DuckDB.FFI.Types Methods sizeOf :: DuckDBHugeInt -> Int # alignment :: DuckDBHugeInt -> Int # peekElemOff :: Ptr DuckDBHugeInt -> Int -> IO DuckDBHugeInt # pokeElemOff :: Ptr DuckDBHugeInt -> Int -> DuckDBHugeInt -> IO () # peekByteOff :: Ptr b -> Int -> IO DuckDBHugeInt # pokeByteOff :: Ptr b -> Int -> DuckDBHugeInt -> IO () # peek :: Ptr DuckDBHugeInt -> IO DuckDBHugeInt # poke :: Ptr DuckDBHugeInt -> DuckDBHugeInt -> IO () # | |
Show DuckDBHugeInt Source # | |
Defined in Database.DuckDB.FFI.Types Methods showsPrec :: Int -> DuckDBHugeInt -> ShowS # show :: DuckDBHugeInt -> String # showList :: [DuckDBHugeInt] -> ShowS # | |
Eq DuckDBHugeInt Source # | |
Defined in Database.DuckDB.FFI.Types Methods (==) :: DuckDBHugeInt -> DuckDBHugeInt -> Bool # (/=) :: DuckDBHugeInt -> DuckDBHugeInt -> Bool # |
data DuckDBUHugeInt Source #
Represents DuckDB's duckdb_uhugeint
.
Constructors
DuckDBUHugeInt | |
Fields |
Instances
Storable DuckDBUHugeInt Source # | |
Defined in Database.DuckDB.FFI.Types Methods sizeOf :: DuckDBUHugeInt -> Int # alignment :: DuckDBUHugeInt -> Int # peekElemOff :: Ptr DuckDBUHugeInt -> Int -> IO DuckDBUHugeInt # pokeElemOff :: Ptr DuckDBUHugeInt -> Int -> DuckDBUHugeInt -> IO () # peekByteOff :: Ptr b -> Int -> IO DuckDBUHugeInt # pokeByteOff :: Ptr b -> Int -> DuckDBUHugeInt -> IO () # peek :: Ptr DuckDBUHugeInt -> IO DuckDBUHugeInt # poke :: Ptr DuckDBUHugeInt -> DuckDBUHugeInt -> IO () # | |
Show DuckDBUHugeInt Source # | |
Defined in Database.DuckDB.FFI.Types Methods showsPrec :: Int -> DuckDBUHugeInt -> ShowS # show :: DuckDBUHugeInt -> String # showList :: [DuckDBUHugeInt] -> ShowS # | |
Eq DuckDBUHugeInt Source # | |
Defined in Database.DuckDB.FFI.Types Methods (==) :: DuckDBUHugeInt -> DuckDBUHugeInt -> Bool # (/=) :: DuckDBUHugeInt -> DuckDBUHugeInt -> Bool # |
data DuckDBDecimal Source #
Represents DuckDB's duckdb_decimal
.
Constructors
DuckDBDecimal | |
Fields |
Instances
Storable DuckDBDecimal Source # | |
Defined in Database.DuckDB.FFI.Types Methods sizeOf :: DuckDBDecimal -> Int # alignment :: DuckDBDecimal -> Int # peekElemOff :: Ptr DuckDBDecimal -> Int -> IO DuckDBDecimal # pokeElemOff :: Ptr DuckDBDecimal -> Int -> DuckDBDecimal -> IO () # peekByteOff :: Ptr b -> Int -> IO DuckDBDecimal # pokeByteOff :: Ptr b -> Int -> DuckDBDecimal -> IO () # peek :: Ptr DuckDBDecimal -> IO DuckDBDecimal # poke :: Ptr DuckDBDecimal -> DuckDBDecimal -> IO () # | |
Show DuckDBDecimal Source # | |
Defined in Database.DuckDB.FFI.Types Methods showsPrec :: Int -> DuckDBDecimal -> ShowS # show :: DuckDBDecimal -> String # showList :: [DuckDBDecimal] -> ShowS # | |
Eq DuckDBDecimal Source # | |
Defined in Database.DuckDB.FFI.Types Methods (==) :: DuckDBDecimal -> DuckDBDecimal -> Bool # (/=) :: DuckDBDecimal -> DuckDBDecimal -> Bool # |
data DuckDBBlob Source #
Represents DuckDB's duckdb_blob
.
Constructors
DuckDBBlob | |
Fields
|
Instances
Storable DuckDBBlob Source # | |
Defined in Database.DuckDB.FFI.Types Methods sizeOf :: DuckDBBlob -> Int # alignment :: DuckDBBlob -> Int # peekElemOff :: Ptr DuckDBBlob -> Int -> IO DuckDBBlob # pokeElemOff :: Ptr DuckDBBlob -> Int -> DuckDBBlob -> IO () # peekByteOff :: Ptr b -> Int -> IO DuckDBBlob # pokeByteOff :: Ptr b -> Int -> DuckDBBlob -> IO () # peek :: Ptr DuckDBBlob -> IO DuckDBBlob # poke :: Ptr DuckDBBlob -> DuckDBBlob -> IO () # | |
Show DuckDBBlob Source # | |
Defined in Database.DuckDB.FFI.Types Methods showsPrec :: Int -> DuckDBBlob -> ShowS # show :: DuckDBBlob -> String # showList :: [DuckDBBlob] -> ShowS # | |
Eq DuckDBBlob Source # | |
Defined in Database.DuckDB.FFI.Types |
data DuckDBString Source #
Represents DuckDB's duckdb_string
.
Constructors
DuckDBString | |
Fields
|
Instances
Storable DuckDBString Source # | |
Defined in Database.DuckDB.FFI.Types Methods sizeOf :: DuckDBString -> Int # alignment :: DuckDBString -> Int # peekElemOff :: Ptr DuckDBString -> Int -> IO DuckDBString # pokeElemOff :: Ptr DuckDBString -> Int -> DuckDBString -> IO () # peekByteOff :: Ptr b -> Int -> IO DuckDBString # pokeByteOff :: Ptr b -> Int -> DuckDBString -> IO () # peek :: Ptr DuckDBString -> IO DuckDBString # poke :: Ptr DuckDBString -> DuckDBString -> IO () # | |
Show DuckDBString Source # | |
Defined in Database.DuckDB.FFI.Types Methods showsPrec :: Int -> DuckDBString -> ShowS # show :: DuckDBString -> String # showList :: [DuckDBString] -> ShowS # | |
Eq DuckDBString Source # | |
Defined in Database.DuckDB.FFI.Types |
data DuckDBStringT Source #
Represents DuckDB's duckdb_string_t
.
Represents DuckDB's duckdb_bit
.
Constructors
DuckDBBit | |
Fields
|
Instances
Storable DuckDBBit Source # | |
Defined in Database.DuckDB.FFI.Types | |
Show DuckDBBit Source # | |
Eq DuckDBBit Source # | |
data DuckDBBignum Source #
Represents DuckDB's duckdb_bignum
.
Constructors
DuckDBBignum | |
Fields
|
Instances
Storable DuckDBBignum Source # | |
Defined in Database.DuckDB.FFI.Types Methods sizeOf :: DuckDBBignum -> Int # alignment :: DuckDBBignum -> Int # peekElemOff :: Ptr DuckDBBignum -> Int -> IO DuckDBBignum # pokeElemOff :: Ptr DuckDBBignum -> Int -> DuckDBBignum -> IO () # peekByteOff :: Ptr b -> Int -> IO DuckDBBignum # pokeByteOff :: Ptr b -> Int -> DuckDBBignum -> IO () # peek :: Ptr DuckDBBignum -> IO DuckDBBignum # poke :: Ptr DuckDBBignum -> DuckDBBignum -> IO () # | |
Show DuckDBBignum Source # | |
Defined in Database.DuckDB.FFI.Types Methods showsPrec :: Int -> DuckDBBignum -> ShowS # show :: DuckDBBignum -> String # showList :: [DuckDBBignum] -> ShowS # | |
Eq DuckDBBignum Source # | |
Defined in Database.DuckDB.FFI.Types |
data DuckDBQueryProgress Source #
Represents DuckDB's duckdb_query_progress_type
.
Constructors
DuckDBQueryProgress | |
Instances
Storable DuckDBQueryProgress Source # | |
Defined in Database.DuckDB.FFI.Types Methods sizeOf :: DuckDBQueryProgress -> Int # alignment :: DuckDBQueryProgress -> Int # peekElemOff :: Ptr DuckDBQueryProgress -> Int -> IO DuckDBQueryProgress # pokeElemOff :: Ptr DuckDBQueryProgress -> Int -> DuckDBQueryProgress -> IO () # peekByteOff :: Ptr b -> Int -> IO DuckDBQueryProgress # pokeByteOff :: Ptr b -> Int -> DuckDBQueryProgress -> IO () # peek :: Ptr DuckDBQueryProgress -> IO DuckDBQueryProgress # poke :: Ptr DuckDBQueryProgress -> DuckDBQueryProgress -> IO () # | |
Show DuckDBQueryProgress Source # | |
Defined in Database.DuckDB.FFI.Types Methods showsPrec :: Int -> DuckDBQueryProgress -> ShowS # show :: DuckDBQueryProgress -> String # showList :: [DuckDBQueryProgress] -> ShowS # | |
Eq DuckDBQueryProgress Source # | |
Defined in Database.DuckDB.FFI.Types Methods (==) :: DuckDBQueryProgress -> DuckDBQueryProgress -> Bool # (/=) :: DuckDBQueryProgress -> DuckDBQueryProgress -> Bool # |
Result Structures
data DuckDBResult Source #
DuckDB result structure (opaque to callers, but required for FFI marshalling).
Constructors
DuckDBResult | |
Instances
Storable DuckDBResult Source # | |
Defined in Database.DuckDB.FFI.Types Methods sizeOf :: DuckDBResult -> Int # alignment :: DuckDBResult -> Int # peekElemOff :: Ptr DuckDBResult -> Int -> IO DuckDBResult # pokeElemOff :: Ptr DuckDBResult -> Int -> DuckDBResult -> IO () # peekByteOff :: Ptr b -> Int -> IO DuckDBResult # pokeByteOff :: Ptr b -> Int -> DuckDBResult -> IO () # peek :: Ptr DuckDBResult -> IO DuckDBResult # poke :: Ptr DuckDBResult -> DuckDBResult -> IO () # |
data DuckDBColumn Source #
Opaque DuckDB column handle.
Opaque Pointer Types
type DuckDBDatabase = Ptr DuckDBDatabaseStruct Source #
Handle to a DuckDB database instance.
type DuckDBConnection = Ptr DuckDBConnectionStruct Source #
Handle to a DuckDB connection.
type DuckDBConfig = Ptr DuckDBConfigStruct Source #
Handle to a DuckDB configuration object.
type DuckDBInstanceCache = Ptr DuckDBInstanceCacheStruct Source #
Handle to a DuckDB instance cache.
type DuckDBArrowOptions = Ptr DuckDBArrowOptionsStruct Source #
Handle to DuckDB Arrow options.
type DuckDBArrow = Ptr DuckDBArrowStruct Source #
Handle to an Arrow query result.
type DuckDBArrowSchema = Ptr DuckDBArrowSchemaStruct Source #
Handle to an Arrow schema.
type DuckDBArrowArray = Ptr DuckDBArrowArrayStruct Source #
Handle to an Arrow array.
newtype ArrowSchemaPtr Source #
Pointer wrapper for the deprecated Arrow schema handle exposed by DuckDB. The underlying memory is managed by DuckDB and must only be accessed through the deprecated Arrow helper functions.
Constructors
ArrowSchemaPtr | |
Fields |
Instances
Eq ArrowSchemaPtr Source # | |
Defined in Database.DuckDB.FFI.Types Methods (==) :: ArrowSchemaPtr -> ArrowSchemaPtr -> Bool # (/=) :: ArrowSchemaPtr -> ArrowSchemaPtr -> Bool # |
newtype ArrowArrayPtr Source #
Pointer wrapper for the deprecated Arrow array handle exposed by DuckDB.
DuckDB assumes exclusive ownership and coordinates buffer lifetimes via the
release callback stored in the referenced ArrowArray
struct.
Constructors
ArrowArrayPtr | |
Fields |
Instances
Eq ArrowArrayPtr Source # | |
Defined in Database.DuckDB.FFI.Types Methods (==) :: ArrowArrayPtr -> ArrowArrayPtr -> Bool # (/=) :: ArrowArrayPtr -> ArrowArrayPtr -> Bool # |
newtype ArrowStreamPtr Source #
Pointer wrapper for the deprecated Arrow stream handle returned by DuckDB.
DuckDB owns the referenced stream; call c_duckdb_destroy_arrow_stream
after
invoking duckdb_arrow_scan
.
Constructors
ArrowStreamPtr | |
Fields
|
Instances
Eq ArrowStreamPtr Source # | |
Defined in Database.DuckDB.FFI.Types Methods (==) :: ArrowStreamPtr -> ArrowStreamPtr -> Bool # (/=) :: ArrowStreamPtr -> ArrowStreamPtr -> Bool # |
type DuckDBArrowConvertedSchema = Ptr DuckDBArrowConvertedSchemaStruct Source #
Handle to a converted Arrow schema.
type DuckDBArrowStream = Ptr DuckDBArrowStreamStruct Source #
Handle to an Arrow stream.
type DuckDBPreparedStatement = Ptr DuckDBPreparedStatementStruct Source #
Handle to a prepared statement.
type DuckDBPendingResult = Ptr DuckDBPendingResultStruct Source #
Handle to a pending (incremental) query result.
type DuckDBExtractedStatements = Ptr DuckDBExtractedStatementsStruct Source #
Handle to extracted SQL statements.
type DuckDBLogicalType = Ptr DuckDBLogicalTypeStruct Source #
Handle to a DuckDB logical type value.
type DuckDBCreateTypeInfo = Ptr DuckDBCreateTypeInfoStruct Source #
Handle to logical type registration details.
type DuckDBVector = Ptr DuckDBVectorStruct Source #
Handle to a DuckDB vector.
type DuckDBDataChunk = Ptr DuckDBDataChunkStruct Source #
Handle to a DuckDB data chunk.
type DuckDBSelectionVector = Ptr DuckDBSelectionVectorStruct Source #
Handle to a DuckDB selection vector.
type DuckDBFunctionInfo = Ptr DuckDBFunctionInfoStruct Source #
Handle to function execution context.
type DuckDBBindInfo = Ptr DuckDBBindInfoStruct Source #
Handle to scalar function bind context.
type DuckDBInitInfo = Ptr DuckDBInitInfoStruct Source #
Handle to table function initialization state.
type DuckDBScalarFunction = Ptr DuckDBScalarFunctionStruct Source #
Handle to a scalar function definition.
type DuckDBScalarFunctionSet = Ptr DuckDBScalarFunctionSetStruct Source #
Handle to a set of scalar function overloads.
type DuckDBAggregateFunction = Ptr DuckDBAggregateFunctionStruct Source #
Handle to an aggregate function definition.
type DuckDBAggregateFunctionSet = Ptr DuckDBAggregateFunctionSetStruct Source #
Handle to an aggregate function set.
type DuckDBAggregateState = Ptr DuckDBAggregateStateStruct Source #
Opaque pointer to the aggregate-function state handed to user callbacks.
type DuckDBCastFunction = Ptr DuckDBCastFunctionStruct Source #
Handle to a cast function definition.
type DuckDBExpression = Ptr DuckDBExpressionStruct Source #
Handle to a DuckDB expression.
type DuckDBClientContext = Ptr DuckDBClientContextStruct Source #
Handle to a DuckDB client context.
type DuckDBTableFunction = Ptr DuckDBTableFunctionStruct Source #
Handle to a table function definition.
type DuckDBValue = Ptr DuckDBValueStruct Source #
Handle to a scalar DuckDB value.
type DuckDBErrorData = Ptr DuckDBErrorDataStruct Source #
Handle to DuckDB error data.
type DuckDBAppender = Ptr DuckDBAppenderStruct Source #
Handle to an appender.
type DuckDBTableDescription = Ptr DuckDBTableDescriptionStruct Source #
Handle to a table description.
type DuckDBProfilingInfo = Ptr DuckDBProfilingInfoStruct Source #
Handle to profiling information.
type DuckDBReplacementScanInfo = Ptr DuckDBReplacementScanInfoStruct Source #
Handle to replacement scan context.
type DuckDBTaskState = Ptr () Source #
Handle to a DuckDB task state.
data ArrowArray Source #
Partial Arrow array view mirroring the DuckDB C API layout.
Constructors
ArrowArray | |
Fields
|
Instances
Storable ArrowArray Source # | |
Defined in Database.DuckDB.FFI.Types Methods sizeOf :: ArrowArray -> Int # alignment :: ArrowArray -> Int # peekElemOff :: Ptr ArrowArray -> Int -> IO ArrowArray # pokeElemOff :: Ptr ArrowArray -> Int -> ArrowArray -> IO () # peekByteOff :: Ptr b -> Int -> IO ArrowArray # pokeByteOff :: Ptr b -> Int -> ArrowArray -> IO () # peek :: Ptr ArrowArray -> IO ArrowArray # poke :: Ptr ArrowArray -> ArrowArray -> IO () # |
data ArrowSchema Source #
Partial Arrow schema view used for tests that require inspecting DuckDB's Arrow wrappers without depending on the full Arrow C Data Interface definitions.
Constructors
ArrowSchema | |
Fields
|
Instances
Storable ArrowSchema Source # | |
Defined in Database.DuckDB.FFI.Types Methods sizeOf :: ArrowSchema -> Int # alignment :: ArrowSchema -> Int # peekElemOff :: Ptr ArrowSchema -> Int -> IO ArrowSchema # pokeElemOff :: Ptr ArrowSchema -> Int -> ArrowSchema -> IO () # peekByteOff :: Ptr b -> Int -> IO ArrowSchema # pokeByteOff :: Ptr b -> Int -> ArrowSchema -> IO () # peek :: Ptr ArrowSchema -> IO ArrowSchema # poke :: Ptr ArrowSchema -> ArrowSchema -> IO () # |
Opaque Struct Tags
data DuckDBDatabaseStruct Source #
Tag type backing duckdb_database
pointers.
data DuckDBConnectionStruct Source #
Tag type backing duckdb_connection
pointers.
data DuckDBConfigStruct Source #
Tag type backing duckdb_config
pointers.
data DuckDBInstanceCacheStruct Source #
Tag type backing duckdb_instance_cache
pointers.
data DuckDBExtractedStatementsStruct Source #
Tag type backing duckdb_extracted_statements
pointers.
data DuckDBFunctionInfoStruct Source #
Tag type backing duckdb_function_info
pointers.
data DuckDBBindInfoStruct Source #
Tag type backing duckdb_bind_info
pointers.
data DuckDBScalarFunctionStruct Source #
Tag type backing duckdb_scalar_function
pointers.
data DuckDBScalarFunctionSetStruct Source #
Tag type backing duckdb_scalar_function_set
pointers.
data DuckDBAggregateFunctionStruct Source #
Tag type backing duckdb_aggregate_function
pointers.
data DuckDBAggregateFunctionSetStruct Source #
Tag type backing duckdb_aggregate_function_set
pointers.
data DuckDBVectorStruct Source #
Tag type backing duckdb_vector
pointers.
data DuckDBDataChunkStruct Source #
Tag type backing duckdb_data_chunk
pointers.
data DuckDBSelectionVectorStruct Source #
Tag type backing duckdb_selection_vector
pointers.
data DuckDBArrowOptionsStruct Source #
Tag type backing duckdb_arrow_options
pointers.
data DuckDBArrowStruct Source #
Tag type backing duckdb_arrow
pointers.
Instances
Storable DuckDBArrowStruct Source # | |
Defined in Database.DuckDB.FFI.Types Methods sizeOf :: DuckDBArrowStruct -> Int # alignment :: DuckDBArrowStruct -> Int # peekElemOff :: Ptr DuckDBArrowStruct -> Int -> IO DuckDBArrowStruct # pokeElemOff :: Ptr DuckDBArrowStruct -> Int -> DuckDBArrowStruct -> IO () # peekByteOff :: Ptr b -> Int -> IO DuckDBArrowStruct # pokeByteOff :: Ptr b -> Int -> DuckDBArrowStruct -> IO () # peek :: Ptr DuckDBArrowStruct -> IO DuckDBArrowStruct # poke :: Ptr DuckDBArrowStruct -> DuckDBArrowStruct -> IO () # |
data DuckDBArrowConvertedSchemaStruct Source #
Tag type backing duckdb_arrow_converted_schema
pointers.
data DuckDBArrowStreamStruct Source #
Tag type backing duckdb_arrow_stream
pointers.
Instances
Storable DuckDBArrowStreamStruct Source # | |
Defined in Database.DuckDB.FFI.Types Methods sizeOf :: DuckDBArrowStreamStruct -> Int # alignment :: DuckDBArrowStreamStruct -> Int # peekElemOff :: Ptr DuckDBArrowStreamStruct -> Int -> IO DuckDBArrowStreamStruct # pokeElemOff :: Ptr DuckDBArrowStreamStruct -> Int -> DuckDBArrowStreamStruct -> IO () # peekByteOff :: Ptr b -> Int -> IO DuckDBArrowStreamStruct # pokeByteOff :: Ptr b -> Int -> DuckDBArrowStreamStruct -> IO () # peek :: Ptr DuckDBArrowStreamStruct -> IO DuckDBArrowStreamStruct # poke :: Ptr DuckDBArrowStreamStruct -> DuckDBArrowStreamStruct -> IO () # |
data DuckDBExpressionStruct Source #
Tag type backing duckdb_expression
pointers.
data DuckDBClientContextStruct Source #
Tag type backing duckdb_client_context
pointers.
data DuckDBPreparedStatementStruct Source #
Tag type backing duckdb_prepared_statement
pointers.
data DuckDBValueStruct Source #
Tag type backing duckdb_value
pointers.
data DuckDBPendingResultStruct Source #
Tag type backing duckdb_pending_result
pointers.
data DuckDBLogicalTypeStruct Source #
Tag type backing duckdb_logical_type
pointers.
data DuckDBCreateTypeInfoStruct Source #
Tag type backing duckdb_create_type_info
pointers.
data DuckDBErrorDataStruct Source #
Tag type backing duckdb_error_data
pointers.
data DuckDBInitInfoStruct Source #
Tag type backing duckdb_init_info
pointers.
data DuckDBCastFunctionStruct Source #
Tag type backing duckdb_cast_function
pointers.
data DuckDBTableFunctionStruct Source #
Tag type backing duckdb_table_function
pointers.
data DuckDBAppenderStruct Source #
Tag type backing duckdb_appender
pointers.
data DuckDBTableDescriptionStruct Source #
Tag type backing duckdb_table_description
pointers.
data DuckDBProfilingInfoStruct Source #
Tag type backing duckdb_profiling_info
pointers.
data DuckDBReplacementScanInfoStruct Source #
Tag type backing duckdb_replacement_scan_info
pointers.
data DuckDBAggregateStateStruct Source #
Handle to a DuckDB aggregate state.
Function Pointer Types
type DuckDBScalarFunctionFun = FunPtr (DuckDBFunctionInfo -> DuckDBDataChunk -> DuckDBVector -> IO ()) Source #
Function pointer used to represent scalar function execution callbacks.
type DuckDBScalarFunctionBindFun = FunPtr (DuckDBBindInfo -> IO ()) Source #
Function pointer used to represent scalar function bind callbacks.
type DuckDBDeleteCallback = FunPtr (Ptr () -> IO ()) Source #
Function pointer used to destroy user-provided data blobs.
type DuckDBCopyCallback = FunPtr (Ptr () -> IO (Ptr ())) Source #
Function pointer used to copy user-provided data blobs.
type DuckDBCastFunctionFun = FunPtr (DuckDBFunctionInfo -> DuckDBIdx -> DuckDBVector -> DuckDBVector -> IO CBool) Source #
Function pointer implementing cast functions.
type DuckDBAggregateStateSizeFun = FunPtr (DuckDBFunctionInfo -> IO DuckDBIdx) Source #
Function pointer returning aggregate state size.
type DuckDBAggregateInitFun = FunPtr (DuckDBFunctionInfo -> DuckDBAggregateState -> IO ()) Source #
Function pointer initializing aggregate state.
type DuckDBAggregateDestroyFun = FunPtr (Ptr DuckDBAggregateState -> DuckDBIdx -> IO ()) Source #
Function pointer destroying aggregate state batches.
type DuckDBAggregateUpdateFun = FunPtr (DuckDBFunctionInfo -> DuckDBDataChunk -> Ptr DuckDBAggregateState -> IO ()) Source #
Function pointer updating aggregate states.
type DuckDBAggregateCombineFun = FunPtr (DuckDBFunctionInfo -> Ptr DuckDBAggregateState -> Ptr DuckDBAggregateState -> DuckDBIdx -> IO ()) Source #
Function pointer combining aggregate states.
type DuckDBAggregateFinalizeFun = FunPtr (DuckDBFunctionInfo -> Ptr DuckDBAggregateState -> DuckDBVector -> DuckDBIdx -> DuckDBIdx -> IO ()) Source #
Function pointer finalising aggregate states.
type DuckDBTableFunctionBindFun = FunPtr (DuckDBBindInfo -> IO ()) Source #
Function pointer for table function bind callbacks.
type DuckDBTableFunctionInitFun = FunPtr (DuckDBInitInfo -> IO ()) Source #
Function pointer for table function init callbacks.
type DuckDBTableFunctionFun = FunPtr (DuckDBFunctionInfo -> DuckDBDataChunk -> IO ()) Source #
Function pointer for table function execution callbacks.
type DuckDBReplacementCallback = FunPtr (DuckDBReplacementScanInfo -> CString -> Ptr () -> IO ()) Source #
Function pointer for replacement scan callbacks.
c_duckdb_create_instance_cache :: IO DuckDBInstanceCache Source #
Creates a new database instance cache. The instance cache is necessary if a
client/program (re)opens multiple databases to the same file within the same
process. Must be destroyed with duckdb_destroy_instance_cache
.
Returns The database instance cache.
c_duckdb_get_or_create_from_cache :: DuckDBInstanceCache -> CString -> Ptr DuckDBDatabase -> DuckDBConfig -> Ptr CString -> IO DuckDBState Source #
Creates a new database instance in the instance cache, or retrieves an
existing database instance. Must be closed with duckdb_close
.
Parameters:
* instance_cache
: The instance cache in which to create the database, or
from which to take the database.
* path
: Path to the database file on disk. Both nullptr
and :memory:
open or retrieve an in-memory database.
* out_database
: The resulting cached database.
* config
: (Optional) configuration used to create the database.
* out_error
: If set and the function returns DuckDBError
, this contains
the error message. Note that the error message must be freed using
duckdb_free
.
Returns DuckDBSuccess
on success or DuckDBError
on failure.
c_duckdb_destroy_instance_cache :: Ptr DuckDBInstanceCache -> IO () Source #
Destroys an existing database instance cache and de-allocates its memory.
Parameters:
* instance_cache
: The instance cache to destroy.
c_duckdb_open :: CString -> Ptr DuckDBDatabase -> IO DuckDBState Source #
Creates a new database or opens an existing database file stored at the given
path. If no path is given a new in-memory database is created instead. The
database must be closed with duckdb_close
.
Parameters:
* path
: Path to the database file on disk. Both nullptr
and :memory:
open an in-memory database.
* out_database
: The result database object.
Returns DuckDBSuccess
on success or DuckDBError
on failure.
c_duckdb_open_ext :: CString -> Ptr DuckDBDatabase -> DuckDBConfig -> Ptr CString -> IO DuckDBState Source #
Extended version of duckdb_open. Creates a new database or opens an existing
database file stored at the given path. The database must be closed with
duckdb_close
.
Parameters:
* path
: Path to the database file on disk. Both nullptr
and :memory:
open an in-memory database.
* out_database
: The result database object.
* config
: (Optional) configuration used to start up the database.
* out_error
: If set and the function returns DuckDBError
, this contains
the error message. Note that the error message must be freed using
duckdb_free
.
Returns DuckDBSuccess
on success or DuckDBError
on failure.
c_duckdb_close :: Ptr DuckDBDatabase -> IO () Source #
Closes the specified database and de-allocates all memory allocated for that
database. This should be called after you are done with any database allocated
through duckdb_open
or duckdb_open_ext
. Note that failing to call
duckdb_close
(in case of e.g., a program crash) will not cause data
corruption. Still, it is recommended to always correctly close a database
object after you are done with it.
Parameters:
* database
: The database object to shut down.
c_duckdb_connect :: DuckDBDatabase -> Ptr DuckDBConnection -> IO DuckDBState Source #
Opens a connection to a database. Connections are required to query the
database, and store transactional state associated with the connection. The
instantiated connection should be closed using duckdb_disconnect
.
Parameters:
* database
: The database file to connect to.
* out_connection
: The result connection object.
Returns DuckDBSuccess
on success or DuckDBError
on failure.
c_duckdb_interrupt :: DuckDBConnection -> IO () Source #
Interrupt running query
Parameters:
* connection
: The connection to interrupt
c_duckdb_query_progress :: DuckDBConnection -> Ptr DuckDBQueryProgress -> IO () Source #
Get progress of the running query
Parameters:
* connection
: The working connection
Returns -1 if no progress or a percentage of the progress
These bindings call the wrapper symbol wrapped_duckdb_query_progress
but mirror the DuckDB C API semantics of duckdb_query_progress
.
c_duckdb_disconnect :: Ptr DuckDBConnection -> IO () Source #
Closes the specified connection and de-allocates all memory allocated for that connection.
Parameters:
* connection
: The connection to close.
c_duckdb_connection_get_client_context :: DuckDBConnection -> Ptr DuckDBClientContext -> IO () Source #
Retrieves the client context of the connection.
Parameters:
* connection
: The connection.
* out_context
: The client context of the connection. Must be destroyed with
duckdb_destroy_client_context
.
c_duckdb_connection_get_arrow_options :: DuckDBConnection -> Ptr DuckDBArrowOptions -> IO () Source #
Retrieves the arrow options of the connection.
Parameters:
* connection
: The connection.
c_duckdb_client_context_get_connection_id :: DuckDBClientContext -> IO DuckDBIdx Source #
Returns the connection id of the client context.
Parameters:
* context
: The client context.
Returns The connection id of the client context.
c_duckdb_destroy_client_context :: Ptr DuckDBClientContext -> IO () Source #
Destroys the client context and deallocates its memory.
Parameters:
* context
: The client context to destroy.
c_duckdb_destroy_arrow_options :: Ptr DuckDBArrowOptions -> IO () Source #
Destroys the arrow options and deallocates its memory.
Parameters:
* arrow_options
: The arrow options to destroy.
c_duckdb_library_version :: IO CString Source #
Returns the version of the linked DuckDB, with a version postfix for dev versions
Usually used for developing C extensions that must return this for a compatibility check.
c_duckdb_get_table_names :: DuckDBConnection -> CString -> CBool -> IO DuckDBValue Source #
Get the list of (fully qualified) table names of the query.
Parameters:
* connection
: The connection for which to get the table names.
* query
: The query for which to get the table names.
* qualified
: Returns fully qualified table names (catalog.schema.table), if
set to true, else only the (not escaped) table names.
Returns A duckdb_value of type VARCHAR[] containing the (fully qualified) table names of the query. Must be destroyed with duckdb_destroy_value.
c_duckdb_create_config :: Ptr DuckDBConfig -> IO DuckDBState Source #
Initializes an empty configuration object that can be used to provide start-up
options for the DuckDB instance through duckdb_open_ext
. The duckdb_config
must be destroyed using duckdb_destroy_config
This will always succeed unless there is a malloc failure.
Note that duckdb_destroy_config
should always be called on the resulting
config, even if the function returns DuckDBError
.
Parameters:
* out_config
: The result configuration object.
Returns DuckDBSuccess
on success or DuckDBError
on failure.
c_duckdb_config_count :: IO CSize Source #
This returns the total amount of configuration options available for usage
with duckdb_get_config_flag
.
This should not be called in a loop as it internally loops over all the options.
Returns The amount of config options available.
c_duckdb_get_config_flag :: CSize -> Ptr CString -> Ptr CString -> IO DuckDBState Source #
Obtains a human-readable name and description of a specific configuration
option. This can be used to e.g. display configuration options. This will
succeed unless index
is out of range (i.e., >= duckdb_config_count
).
The result name or description MUST NOT be freed.
Parameters:
* index
: The index of the configuration option (between 0 and
duckdb_config_count
)
* out_name
: A name of the configuration flag.
* out_description
: A description of the configuration flag.
Returns DuckDBSuccess
on success or DuckDBError
on failure.
c_duckdb_set_config :: DuckDBConfig -> CString -> CString -> IO DuckDBState Source #
Sets the specified option for the specified configuration. The configuration
option is indicated by name. To obtain a list of config options, see
duckdb_get_config_flag
.
In the source code, configuration options are defined in config.cpp
.
This can fail if either the name is invalid, or if the value provided for the option is invalid.
Parameters:
* config
: The configuration object to set the option on.
* name
: The name of the configuration flag to set.
* option
: The value to set the configuration flag to.
Returns DuckDBSuccess
on success or DuckDBError
on failure.
c_duckdb_destroy_config :: Ptr DuckDBConfig -> IO () Source #
Destroys the specified configuration object and de-allocates all memory allocated for the object.
Parameters:
* config
: The configuration object to destroy.
c_duckdb_create_error_data :: DuckDBErrorType -> CString -> IO DuckDBErrorData Source #
Creates duckdb_error_data. Must be destroyed with duckdb_destroy_error_data
.
Parameters:
* type
: The error type.
* message
: The error message.
Returns The error data.
c_duckdb_destroy_error_data :: Ptr DuckDBErrorData -> IO () Source #
Destroys the error data and deallocates its memory.
Parameters:
* error_data
: The error data to destroy.
c_duckdb_error_data_error_type :: DuckDBErrorData -> IO DuckDBErrorType Source #
Returns the duckdb_error_type of the error data.
Parameters:
* error_data
: The error data.
Returns The error type.
c_duckdb_error_data_message :: DuckDBErrorData -> IO CString Source #
Returns the error message of the error data. Must not be freed.
Parameters:
* error_data
: The error data.
Returns The error message.
c_duckdb_error_data_has_error :: DuckDBErrorData -> IO CBool Source #
Returns whether the error data contains an error or not.
Parameters:
* error_data
: The error data.
Returns True, if the error data contains an exception, else false.
c_duckdb_query :: DuckDBConnection -> CString -> Ptr DuckDBResult -> IO DuckDBState Source #
Executes a SQL query within a connection and stores the full (materialized)
result in the out_result pointer. If the query fails to execute, DuckDBError
is returned and the error message can be retrieved by calling
duckdb_result_error
.
Note that after running duckdb_query
, duckdb_destroy_result
must be called
on the result object even if the query fails, otherwise the error stored
within the result will not be freed correctly.
Parameters:
* connection
: The connection to perform the query in.
* query
: The SQL query to run.
* out_result
: The query result.
Returns DuckDBSuccess
on success or DuckDBError
on failure.
c_duckdb_destroy_result :: Ptr DuckDBResult -> IO () Source #
Closes the result and de-allocates all memory allocated for that result.
Parameters:
* result
: The result to destroy.
c_duckdb_column_name :: Ptr DuckDBResult -> DuckDBIdx -> IO CString Source #
Returns the column name of the specified column. The result should not need to be freed; the column names will automatically be destroyed when the result is destroyed.
Returns NULL
if the column is out of range.
Parameters:
* result
: The result object to fetch the column name from.
* col
: The column index.
Returns The column name of the specified column.
c_duckdb_column_type :: Ptr DuckDBResult -> DuckDBIdx -> IO DuckDBType Source #
Returns the column type of the specified column.
Returns DUCKDB_TYPE_INVALID
if the column is out of range.
Parameters:
* result
: The result object to fetch the column type from.
* col
: The column index.
Returns The column type of the specified column.
c_duckdb_result_statement_type :: Ptr DuckDBResult -> IO DuckDBStatementType Source #
Returns the statement type of the statement that was executed
Parameters:
* result
: The result object to fetch the statement type from.
Returns duckdb_statement_type value or DUCKDB_STATEMENT_TYPE_INVALID
These bindings call the wrapper symbol
wrapped_duckdb_result_statement_type
but mirror the DuckDB C API semantics of
duckdb_result_statement_type
.
c_duckdb_column_logical_type :: Ptr DuckDBResult -> DuckDBIdx -> IO DuckDBLogicalType Source #
Returns the logical column type of the specified column.
The return type of this call should be destroyed with
duckdb_destroy_logical_type
.
Returns NULL
if the column is out of range.
Parameters:
* result
: The result object to fetch the column type from.
* col
: The column index.
Returns The logical column type of the specified column.
c_duckdb_result_get_arrow_options :: Ptr DuckDBResult -> IO DuckDBArrowOptions Source #
Returns the arrow options associated with the given result. These options are definitions of how the arrow arrays/schema should be produced.
Parameters:
* result
: The result object to fetch arrow options from.
Returns The arrow options associated with the given result. This must be
destroyed with duckdb_destroy_arrow_options
.
These bindings call the wrapper symbol
wrapped_duckdb_result_get_arrow_options
but mirror the DuckDB C API semantics
of duckdb_result_get_arrow_options
.
c_duckdb_column_count :: Ptr DuckDBResult -> IO DuckDBIdx Source #
Returns the number of columns present in a the result object.
Parameters:
* result
: The result object.
Returns The number of columns present in the result object.
c_duckdb_row_count :: Ptr DuckDBResult -> IO DuckDBIdx Source #
Warning Deprecation notice. This method is scheduled for removal in a future
release.
Returns the number of rows present in the result object.
Parameters:
* result
: The result object.
Returns The number of rows present in the result object.
c_duckdb_rows_changed :: Ptr DuckDBResult -> IO DuckDBIdx Source #
Returns the number of rows changed by the query stored in the result. This is relevant only for INSERTUPDATEDELETE queries. For other queries the rows_changed will be 0.
Parameters:
* result
: The result object.
Returns The number of rows changed.
c_duckdb_column_data :: Ptr DuckDBResult -> DuckDBIdx -> IO (Ptr ()) Source #
Deprecated This method has been deprecated. Prefer using
duckdb_result_get_chunk
instead.
Returns the data of a specific column of a result in columnar format.
The function returns a dense array which contains the result data. The exact
type stored in the array depends on the corresponding duckdb_type (as provided
by duckdb_column_type
). For the exact type by which the data should be
accessed, see the comments in the types section or the DUCKDB_TYPE
enum.
For example, for a column of type DUCKDB_TYPE_INTEGER
, rows can be accessed
in the following manner: ``c int32_t *data = (int32_t *)
duckdb_column_data(&result, 0); printf("Data for row %d: %dn", row,
data[row]);
``
Parameters:
* result
: The result object to fetch the column data from.
* col
: The column index.
Returns The column data of the specified column.
c_duckdb_nullmask_data :: Ptr DuckDBResult -> DuckDBIdx -> IO (Ptr CBool) Source #
Deprecated This method has been deprecated. Prefer using
duckdb_result_get_chunk
instead.
Returns the nullmask of a specific column of a result in columnar format. The
nullmask indicates for every row whether or not the corresponding row is
NULL
. If a row is NULL
, the values present in the array provided by
duckdb_column_data
are undefined.
``c int32_t *data = (int32_t *) duckdb_column_data(&result, 0); bool
*nullmask = duckdb_nullmask_data(&result, 0); if (nullmask[row]) {
printf("Data for row %d: NULLn", row); } else { printf("Data for row %d:
%dn", row, data[row]); }
``
Parameters:
* result
: The result object to fetch the nullmask from.
* col
: The column index.
Returns The nullmask of the specified column.
c_duckdb_result_error :: Ptr DuckDBResult -> IO CString Source #
Returns the error message contained within the result. The error is only set
if duckdb_query
returns DuckDBError
.
The result of this function must not be freed. It will be cleaned up when
duckdb_destroy_result
is called.
Parameters:
* result
: The result object to fetch the error from.
Returns The error of the result.
c_duckdb_result_error_type :: Ptr DuckDBResult -> IO DuckDBErrorType Source #
Returns the result error type contained within the result. The error is only
set if duckdb_query
returns DuckDBError
.
Parameters:
* result
: The result object to fetch the error from.
Returns The error type of the result.
c_duckdb_result_get_chunk :: Ptr DuckDBResult -> DuckDBIdx -> IO DuckDBDataChunk Source #
Warning Deprecation notice. This method is scheduled for removal in a future
release.
Fetches a data chunk from the duckdb_result. This function should be called repeatedly until the result is exhausted.
The result must be destroyed with duckdb_destroy_data_chunk
.
This function supersedes all duckdb_value
functions, as well as the
duckdb_column_data
and duckdb_nullmask_data
functions. It results in
significantly better performance, and should be preferred in newer code-bases.
If this function is used, none of the other result functions can be used and vice versa (i.e., this function cannot be mixed with the legacy result functions).
Use duckdb_result_chunk_count
to figure out how many chunks there are in the
result.
Parameters:
* result
: The result object to fetch the data chunk from.
* chunk_index
: The chunk index to fetch from.
Returns The resulting data chunk. Returns NULL
if the chunk index is out of
bounds.
These bindings call the wrapper symbol
wrapped_duckdb_result_get_chunk
but mirror the DuckDB C API semantics of
duckdb_result_get_chunk
.
c_duckdb_result_is_streaming :: Ptr DuckDBResult -> IO CBool Source #
Warning Deprecation notice. This method is scheduled for removal in a future
release.
Checks if the type of the internal result is StreamQueryResult.
Parameters:
* result
: The result object to check.
Returns Whether or not the result object is of the type StreamQueryResult
These bindings call the wrapper symbol
wrapped_duckdb_result_is_streaming
but mirror the DuckDB C API semantics of
duckdb_result_is_streaming
.
c_duckdb_result_chunk_count :: Ptr DuckDBResult -> IO DuckDBIdx Source #
Warning Deprecation notice. This method is scheduled for removal in a future
release.
Returns the number of data chunks present in the result.
Parameters:
* result
: The result object
Returns Number of data chunks present in the result.
These bindings call the wrapper symbol
wrapped_duckdb_result_chunk_count
but mirror the DuckDB C API semantics of
duckdb_result_chunk_count
.
c_duckdb_result_return_type :: Ptr DuckDBResult -> IO DuckDBResultType Source #
Returns the return_type of the given result, or DUCKDB_RETURN_TYPE_INVALID on error
Parameters:
* result
: The result object
Returns The return_type
These bindings call the wrapper symbol
wrapped_duckdb_result_return_type
but mirror the DuckDB C API semantics of
duckdb_result_return_type
.
c_duckdb_value_boolean :: Ptr DuckDBResult -> DuckDBIdx -> DuckDBIdx -> IO CBool Source #
Warning Deprecation notice. This method is scheduled for removal in a future
release.
Returns The boolean value at the specified location, or false if the value cannot be converted.
c_duckdb_value_int8 :: Ptr DuckDBResult -> DuckDBIdx -> DuckDBIdx -> IO Int8 Source #
Warning Deprecation notice. This method is scheduled for removal in a future
release.
Returns The int8_t value at the specified location, or 0 if the value cannot be converted.
c_duckdb_value_int16 :: Ptr DuckDBResult -> DuckDBIdx -> DuckDBIdx -> IO Int16 Source #
Warning Deprecation notice. This method is scheduled for removal in a future
release.
Returns The int16_t value at the specified location, or 0 if the value cannot be converted.
c_duckdb_value_int32 :: Ptr DuckDBResult -> DuckDBIdx -> DuckDBIdx -> IO Int32 Source #
Warning Deprecation notice. This method is scheduled for removal in a future
release.
Returns The int32_t value at the specified location, or 0 if the value cannot be converted.
c_duckdb_value_int64 :: Ptr DuckDBResult -> DuckDBIdx -> DuckDBIdx -> IO Int64 Source #
Warning Deprecation notice. This method is scheduled for removal in a future
release.
Returns The int64_t value at the specified location, or 0 if the value cannot be converted.
c_duckdb_value_hugeint :: Ptr DuckDBResult -> DuckDBIdx -> DuckDBIdx -> Ptr DuckDBHugeInt -> IO () Source #
Warning Deprecation notice. This method is scheduled for removal in a future
release.
Returns The duckdb_hugeint value at the specified location, or 0 if the value cannot be converted.
These bindings call the wrapper symbol wrapped_duckdb_value_hugeint
but mirror the DuckDB C API semantics of duckdb_value_hugeint
.
c_duckdb_value_uhugeint :: Ptr DuckDBResult -> DuckDBIdx -> DuckDBIdx -> Ptr DuckDBUHugeInt -> IO () Source #
Warning Deprecation notice. This method is scheduled for removal in a future
release.
Returns The duckdb_uhugeint value at the specified location, or 0 if the value cannot be converted.
These bindings call the wrapper symbol wrapped_duckdb_value_uhugeint
but mirror the DuckDB C API semantics of duckdb_value_uhugeint
.
c_duckdb_value_decimal :: Ptr DuckDBResult -> DuckDBIdx -> DuckDBIdx -> Ptr DuckDBDecimal -> IO () Source #
Warning Deprecation notice. This method is scheduled for removal in a future
release.
Returns The duckdb_decimal value at the specified location, or 0 if the value cannot be converted.
These bindings call the wrapper symbol wrapped_duckdb_value_decimal
but mirror the DuckDB C API semantics of duckdb_value_decimal
.
c_duckdb_value_uint8 :: Ptr DuckDBResult -> DuckDBIdx -> DuckDBIdx -> IO Word8 Source #
Warning Deprecation notice. This method is scheduled for removal in a future
release.
Returns The uint8_t value at the specified location, or 0 if the value cannot be converted.
c_duckdb_value_uint16 :: Ptr DuckDBResult -> DuckDBIdx -> DuckDBIdx -> IO Word16 Source #
Warning Deprecation notice. This method is scheduled for removal in a future
release.
Returns The uint16_t value at the specified location, or 0 if the value cannot be converted.
c_duckdb_value_uint32 :: Ptr DuckDBResult -> DuckDBIdx -> DuckDBIdx -> IO Word32 Source #
Warning Deprecation notice. This method is scheduled for removal in a future
release.
Returns The uint32_t value at the specified location, or 0 if the value cannot be converted.
c_duckdb_value_uint64 :: Ptr DuckDBResult -> DuckDBIdx -> DuckDBIdx -> IO Word64 Source #
Warning Deprecation notice. This method is scheduled for removal in a future
release.
Returns The uint64_t value at the specified location, or 0 if the value cannot be converted.
c_duckdb_value_float :: Ptr DuckDBResult -> DuckDBIdx -> DuckDBIdx -> IO CFloat Source #
Warning Deprecation notice. This method is scheduled for removal in a future
release.
Returns The float value at the specified location, or 0 if the value cannot be converted.
c_duckdb_value_double :: Ptr DuckDBResult -> DuckDBIdx -> DuckDBIdx -> IO CDouble Source #
Warning Deprecation notice. This method is scheduled for removal in a future
release.
Returns The double value at the specified location, or 0 if the value cannot be converted.
c_duckdb_value_date :: Ptr DuckDBResult -> DuckDBIdx -> DuckDBIdx -> IO DuckDBDate Source #
Warning Deprecation notice. This method is scheduled for removal in a future
release.
Returns The duckdb_date value at the specified location, or 0 if the value cannot be converted.
c_duckdb_value_time :: Ptr DuckDBResult -> DuckDBIdx -> DuckDBIdx -> IO DuckDBTime Source #
Warning Deprecation notice. This method is scheduled for removal in a future
release.
Returns The duckdb_time value at the specified location, or 0 if the value cannot be converted.
c_duckdb_value_timestamp :: Ptr DuckDBResult -> DuckDBIdx -> DuckDBIdx -> IO DuckDBTimestamp Source #
Warning Deprecation notice. This method is scheduled for removal in a future
release.
Returns The duckdb_timestamp value at the specified location, or 0 if the value cannot be converted.
c_duckdb_value_interval :: Ptr DuckDBResult -> DuckDBIdx -> DuckDBIdx -> Ptr DuckDBInterval -> IO () Source #
Warning Deprecation notice. This method is scheduled for removal in a future
release.
Returns The duckdb_interval value at the specified location, or 0 if the value cannot be converted.
These bindings call the wrapper symbol wrapped_duckdb_value_interval
but mirror the DuckDB C API semantics of duckdb_value_interval
.
c_duckdb_value_varchar :: Ptr DuckDBResult -> DuckDBIdx -> DuckDBIdx -> IO CString Source #
Deprecated This method has been deprecated. Use duckdb_value_string instead.
This function does not work correctly if the string contains null bytes.
Returns The text value at the specified location as a null-terminated string,
or nullptr if the value cannot be converted. The result must be freed with
duckdb_free
.
c_duckdb_value_string :: Ptr DuckDBResult -> DuckDBIdx -> DuckDBIdx -> Ptr DuckDBString -> IO () Source #
Warning Deprecation notice. This method is scheduled for removal in a future
release.
No support for nested types, and for other complex types. The resulting field
"string.data" must be freed with duckdb_free.
Returns The string value at the specified location. Attempts to cast the result value to string.
These bindings call the wrapper symbol wrapped_duckdb_value_string
but mirror the DuckDB C API semantics of duckdb_value_string
.
c_duckdb_value_varchar_internal :: Ptr DuckDBResult -> DuckDBIdx -> DuckDBIdx -> IO CString Source #
Deprecated This method has been deprecated. Use duckdb_value_string_internal
instead. This function does not work correctly if the string contains null bytes.
Returns The char* value at the specified location. ONLY works on VARCHAR columns and does not auto-cast. If the column is NOT a VARCHAR column this function will return NULL. The result must NOT be freed.
c_duckdb_value_string_internal :: Ptr DuckDBResult -> DuckDBIdx -> DuckDBIdx -> Ptr DuckDBString -> IO () Source #
Deprecated This method has been deprecated. Use duckdb_value_string_internal
instead. This function does not work correctly if the string contains null bytes.
Returns The char* value at the specified location. ONLY works on VARCHAR columns and does not auto-cast. If the column is NOT a VARCHAR column this function will return NULL. The result must NOT be freed.
These bindings call the wrapper symbol
wrapped_duckdb_value_string_internal
but mirror the DuckDB C API semantics of
duckdb_value_string_internal
.
c_duckdb_value_blob :: Ptr DuckDBResult -> DuckDBIdx -> DuckDBIdx -> Ptr DuckDBBlob -> IO () Source #
Warning Deprecation notice. This method is scheduled for removal in a future
release.
Returns The duckdb_blob value at the specified location. Returns a blob with
blob.data set to nullptr if the value cannot be converted. The resulting field
"blob.data" must be freed with duckdb_free.
These bindings call the wrapper symbol wrapped_duckdb_value_blob
but
mirror the DuckDB C API semantics of duckdb_value_blob
.
c_duckdb_value_is_null :: Ptr DuckDBResult -> DuckDBIdx -> DuckDBIdx -> IO CBool Source #
Warning Deprecation notice. This method is scheduled for removal in a future
release.
Returns Returns true if the value at the specified index is NULL, and false otherwise.
c_duckdb_malloc :: CSize -> IO (Ptr ()) Source #
Allocate size
bytes of memory using the duckdb internal malloc function. Any
memory allocated in this manner should be freed using duckdb_free
.
Parameters:
* size
: The number of bytes to allocate.
Returns A pointer to the allocated memory region.
c_duckdb_free :: Ptr () -> IO () Source #
Free a value returned from duckdb_malloc
, duckdb_value_varchar
,
duckdb_value_blob
, or duckdb_value_string
.
Parameters:
* ptr
: The memory region to de-allocate.
c_duckdb_vector_size :: IO DuckDBIdx Source #
The internal vector size used by DuckDB. This is the amount of tuples that
will fit into a data chunk created by duckdb_create_data_chunk
.
Returns The vector size.
c_duckdb_string_is_inlined :: Ptr DuckDBStringT -> IO CBool Source #
Whether or not the duckdb_string_t value is inlined. This means that the data of the string does not have a separate allocation.
These bindings call the wrapper symbol
wrapped_duckdb_string_is_inlined
but mirror the DuckDB C API semantics of
duckdb_string_is_inlined
.
c_duckdb_string_t_length :: Ptr DuckDBStringT -> IO Word32 Source #
Get the string length of a string_t
Parameters:
* string
: The string to get the length of.
Returns The length.
These bindings call the wrapper symbol wrapped_duckdb_string_t_length
but mirror the DuckDB C API semantics of duckdb_string_t_length
.
c_duckdb_string_t_data :: Ptr DuckDBStringT -> IO CString Source #
Get a pointer to the string data of a string_t
Parameters:
* string
: The string to get the pointer to.
Returns The pointer.
c_duckdb_from_date :: DuckDBDate -> Ptr DuckDBDateStruct -> IO () Source #
Decompose a duckdb_date
object into year, month and date (stored as
duckdb_date_struct
).
Parameters:
* date
: The date object, as obtained from a DUCKDB_TYPE_DATE
column.
Returns The duckdb_date_struct
with the decomposed elements.
These bindings call the wrapper symbol wrapped_duckdb_from_date
but
mirror the DuckDB C API semantics of duckdb_from_date
.
c_duckdb_to_date :: Ptr DuckDBDateStruct -> IO DuckDBDate Source #
Re-compose a duckdb_date
from year, month and date (duckdb_date_struct
).
Parameters:
* date
: The year, month and date stored in a duckdb_date_struct
.
Returns The duckdb_date
element.
These bindings call the wrapper symbol wrapped_duckdb_to_date
but
mirror the DuckDB C API semantics of duckdb_to_date
.
c_duckdb_is_finite_date :: DuckDBDate -> IO CBool Source #
Test a duckdb_date
to see if it is a finite value.
Parameters:
* date
: The date object, as obtained from a DUCKDB_TYPE_DATE
column.
Returns True if the date is finite, false if it is ±infinity.
c_duckdb_from_time :: DuckDBTime -> Ptr DuckDBTimeStruct -> IO () Source #
Decompose a duckdb_time
object into hour, minute, second and microsecond
(stored as duckdb_time_struct
).
Parameters:
* time
: The time object, as obtained from a DUCKDB_TYPE_TIME
column.
Returns The duckdb_time_struct
with the decomposed elements.
These bindings call the wrapper symbol wrapped_duckdb_from_time
but
mirror the DuckDB C API semantics of duckdb_from_time
.
c_duckdb_create_time_tz :: Int64 -> Int32 -> IO DuckDBTimeTz Source #
Create a duckdb_time_tz
object from micros and a timezone offset.
Parameters:
* micros
: The microsecond component of the time.
* offset
: The timezone offset component of the time.
Returns The duckdb_time_tz
element.
c_duckdb_from_time_tz :: DuckDBTimeTz -> Ptr DuckDBTimeTzStruct -> IO () Source #
Decompose a TIME_TZ objects into micros and a timezone offset.
Use duckdb_from_time
to further decompose the micros into hour, minute,
second and microsecond.
Parameters:
* micros
: The time object, as obtained from a DUCKDB_TYPE_TIME_TZ
column.
These bindings call the wrapper symbol wrapped_duckdb_from_time_tz
but mirror the DuckDB C API semantics of duckdb_from_time_tz
.
c_duckdb_to_time :: Ptr DuckDBTimeStruct -> IO DuckDBTime Source #
Re-compose a duckdb_time
from hour, minute, second and microsecond
(duckdb_time_struct
).
Parameters:
* time
: The hour, minute, second and microsecond in a duckdb_time_struct
.
Returns The duckdb_time
element.
These bindings call the wrapper symbol wrapped_duckdb_to_time
but
mirror the DuckDB C API semantics of duckdb_to_time
.
c_duckdb_from_timestamp :: DuckDBTimestamp -> Ptr DuckDBTimestampStruct -> IO () Source #
Decompose a duckdb_timestamp
object into a duckdb_timestamp_struct
.
Parameters:
* ts
: The ts object, as obtained from a DUCKDB_TYPE_TIMESTAMP
column.
Returns The duckdb_timestamp_struct
with the decomposed elements.
These bindings call the wrapper symbol wrapped_duckdb_from_timestamp
but mirror the DuckDB C API semantics of duckdb_from_timestamp
.
c_duckdb_to_timestamp :: Ptr DuckDBTimestampStruct -> IO DuckDBTimestamp Source #
Re-compose a duckdb_timestamp
from a duckdb_timestamp_struct.
Parameters:
* ts
: The de-composed elements in a duckdb_timestamp_struct
.
Returns The duckdb_timestamp
element.
These bindings call the wrapper symbol wrapped_duckdb_to_timestamp
but mirror the DuckDB C API semantics of duckdb_to_timestamp
.
c_duckdb_is_finite_timestamp :: DuckDBTimestamp -> IO CBool Source #
Test a duckdb_timestamp
to see if it is a finite value.
Parameters:
* ts
: The duckdb_timestamp object, as obtained from a
DUCKDB_TYPE_TIMESTAMP
column.
Returns True if the timestamp is finite, false if it is ±infinity.
c_duckdb_is_finite_timestamp_s :: DuckDBTimestampS -> IO CBool Source #
Test a duckdb_timestamp_s
to see if it is a finite value.
Parameters:
* ts
: The duckdb_timestamp_s object, as obtained from a
DUCKDB_TYPE_TIMESTAMP_S
column.
Returns True if the timestamp is finite, false if it is ±infinity.
c_duckdb_is_finite_timestamp_ms :: DuckDBTimestampMs -> IO CBool Source #
Test a duckdb_timestamp_ms
to see if it is a finite value.
Parameters:
* ts
: The duckdb_timestamp_ms object, as obtained from a
DUCKDB_TYPE_TIMESTAMP_MS
column.
Returns True if the timestamp is finite, false if it is ±infinity.
c_duckdb_is_finite_timestamp_ns :: DuckDBTimestampNs -> IO CBool Source #
Test a duckdb_timestamp_ns
to see if it is a finite value.
Parameters:
* ts
: The duckdb_timestamp_ns object, as obtained from a
DUCKDB_TYPE_TIMESTAMP_NS
column.
Returns True if the timestamp is finite, false if it is ±infinity.
c_duckdb_hugeint_to_double :: Ptr DuckDBHugeInt -> IO CDouble Source #
Converts a duckdb_hugeint object (as obtained from a DUCKDB_TYPE_HUGEINT
column) into a double.
Parameters:
* val
: The hugeint value.
Returns The converted double
element.
These bindings call the wrapper symbol
wrapped_duckdb_hugeint_to_double
but mirror the DuckDB C API semantics of
duckdb_hugeint_to_double
.
c_duckdb_double_to_hugeint :: CDouble -> Ptr DuckDBHugeInt -> IO () Source #
Converts a double value to a duckdb_hugeint object.
If the conversion fails because the double value is too big the result will be 0.
Parameters:
* val
: The double value.
Returns The converted duckdb_hugeint
element.
These bindings call the wrapper symbol
wrapped_duckdb_double_to_hugeint
but mirror the DuckDB C API semantics of
duckdb_double_to_hugeint
.
c_duckdb_uhugeint_to_double :: Ptr DuckDBUHugeInt -> IO CDouble Source #
Converts a duckdb_uhugeint object (as obtained from a DUCKDB_TYPE_UHUGEINT
column) into a double.
Parameters:
* val
: The uhugeint value.
Returns The converted double
element.
These bindings call the wrapper symbol
wrapped_duckdb_uhugeint_to_double
but mirror the DuckDB C API semantics of
duckdb_uhugeint_to_double
.
c_duckdb_double_to_uhugeint :: CDouble -> Ptr DuckDBUHugeInt -> IO () Source #
Converts a double value to a duckdb_uhugeint object.
If the conversion fails because the double value is too big the result will be 0.
Parameters:
* val
: The double value.
Returns The converted duckdb_uhugeint
element.
These bindings call the wrapper symbol
wrapped_duckdb_double_to_uhugeint
but mirror the DuckDB C API semantics of
duckdb_double_to_uhugeint
.
c_duckdb_double_to_decimal :: CDouble -> Word8 -> Word8 -> Ptr DuckDBDecimal -> IO () Source #
Converts a double value to a duckdb_decimal object.
If the conversion fails because the double value is too big, or the width/scale are invalid the result will be 0.
Parameters:
* val
: The double value.
Returns The converted duckdb_decimal
element.
These bindings call the wrapper symbol
wrapped_duckdb_double_to_decimal
but mirror the DuckDB C API semantics of
duckdb_double_to_decimal
.
c_duckdb_decimal_to_double :: Ptr DuckDBDecimal -> IO CDouble Source #
Converts a duckdb_decimal object (as obtained from a DUCKDB_TYPE_DECIMAL
column) into a double.
Parameters:
* val
: The decimal value.
Returns The converted double
element.
These bindings call the wrapper symbol
wrapped_duckdb_decimal_to_double
but mirror the DuckDB C API semantics of
duckdb_decimal_to_double
.
c_duckdb_prepare :: DuckDBConnection -> CString -> Ptr DuckDBPreparedStatement -> IO DuckDBState Source #
Create a prepared statement object from a query.
Note that after calling duckdb_prepare
, the prepared statement should always
be destroyed using duckdb_destroy_prepare
, even if the prepare fails.
If the prepare fails, duckdb_prepare_error
can be called to obtain the
reason why the prepare failed.
Parameters:
* connection
: The connection object
* query
: The SQL query to prepare
* out_prepared_statement
: The resulting prepared statement object
Returns DuckDBSuccess
on success or DuckDBError
on failure.
c_duckdb_destroy_prepare :: Ptr DuckDBPreparedStatement -> IO () Source #
Closes the prepared statement and de-allocates all memory allocated for the statement.
Parameters:
* prepared_statement
: The prepared statement to destroy.
c_duckdb_prepare_error :: DuckDBPreparedStatement -> IO CString Source #
Returns the error message associated with the given prepared statement. If the
prepared statement has no error message, this returns nullptr
instead.
The error message should not be freed. It will be de-allocated when
duckdb_destroy_prepare
is called.
Parameters:
* prepared_statement
: The prepared statement to obtain the error from.
Returns The error message, or nullptr
if there is none.
c_duckdb_nparams :: DuckDBPreparedStatement -> IO DuckDBIdx Source #
Returns the number of parameters that can be provided to the given prepared statement.
Returns 0 if the query was not successfully prepared.
Parameters:
* prepared_statement
: The prepared statement to obtain the number of
parameters for.
c_duckdb_parameter_name :: DuckDBPreparedStatement -> DuckDBIdx -> IO CString Source #
Returns the name used to identify the parameter The returned string should be
freed using duckdb_free
.
Returns NULL if the index is out of range for the provided prepared statement.
Parameters:
* prepared_statement
: The prepared statement for which to get the parameter
name from.
c_duckdb_param_type :: DuckDBPreparedStatement -> DuckDBIdx -> IO DuckDBType Source #
Returns the parameter type for the parameter at the given index.
Returns DUCKDB_TYPE_INVALID
if the parameter index is out of range or the
statement was not successfully prepared.
Parameters:
* prepared_statement
: The prepared statement.
* param_idx
: The parameter index.
Returns The parameter type
c_duckdb_param_logical_type :: DuckDBPreparedStatement -> DuckDBIdx -> IO DuckDBLogicalType Source #
Returns the logical type for the parameter at the given index.
Returns nullptr
if the parameter index is out of range or the statement was
not successfully prepared.
The return type of this call should be destroyed with
duckdb_destroy_logical_type
.
Parameters:
* prepared_statement
: The prepared statement.
* param_idx
: The parameter index.
Returns The logical type of the parameter
c_duckdb_clear_bindings :: DuckDBPreparedStatement -> IO DuckDBState Source #
Clear the params bind to the prepared statement.
c_duckdb_prepared_statement_type :: DuckDBPreparedStatement -> IO DuckDBStatementType Source #
Returns the statement type of the statement to be executed
Parameters:
* statement
: The prepared statement.
Returns duckdb_statement_type value or DUCKDB_STATEMENT_TYPE_INVALID
c_duckdb_prepared_statement_column_count :: DuckDBPreparedStatement -> IO DuckDBIdx Source #
Returns the number of columns present in a the result of the prepared statement. If any of the column types are invalid, the result will be 1.
Parameters:
* prepared_statement
: The prepared statement.
Returns The number of columns present in the result of the prepared statement.
c_duckdb_prepared_statement_column_name :: DuckDBPreparedStatement -> DuckDBIdx -> IO CString Source #
Returns the name of the specified column of the result of the
prepared_statement. The returned string should be freed using duckdb_free
.
Returns nullptr
if the column is out of range.
Parameters:
* prepared_statement
: The prepared statement.
* col_idx
: The column index.
Returns The column name of the specified column.
c_duckdb_prepared_statement_column_logical_type :: DuckDBPreparedStatement -> DuckDBIdx -> IO DuckDBLogicalType Source #
Returns the column type of the specified column of the result of the prepared_statement.
Returns DUCKDB_TYPE_INVALID
if the column is out of range. The return type
of this call should be destroyed with duckdb_destroy_logical_type
.
Parameters:
* prepared_statement
: The prepared statement to fetch the column type from.
* col_idx
: The column index.
Returns The logical type of the specified column.
c_duckdb_prepared_statement_column_type :: DuckDBPreparedStatement -> DuckDBIdx -> IO DuckDBType Source #
Returns the column type of the specified column of the result of the prepared_statement.
Returns DUCKDB_TYPE_INVALID
if the column is out of range.
Parameters:
* prepared_statement
: The prepared statement to fetch the column type from.
* col_idx
: The column index.
Returns The type of the specified column.
c_duckdb_bind_value :: DuckDBPreparedStatement -> DuckDBIdx -> DuckDBValue -> IO DuckDBState Source #
Binds a value to the prepared statement at the specified index.
c_duckdb_bind_parameter_index :: DuckDBPreparedStatement -> Ptr DuckDBIdx -> CString -> IO DuckDBState Source #
Retrieve the index of the parameter for the prepared statement, identified by name
c_duckdb_bind_boolean :: DuckDBPreparedStatement -> DuckDBIdx -> CBool -> IO DuckDBState Source #
Binds a bool value to the prepared statement at the specified index.
c_duckdb_bind_int8 :: DuckDBPreparedStatement -> DuckDBIdx -> Int8 -> IO DuckDBState Source #
Binds an int8_t value to the prepared statement at the specified index.
c_duckdb_bind_int16 :: DuckDBPreparedStatement -> DuckDBIdx -> Int16 -> IO DuckDBState Source #
Binds an int16_t value to the prepared statement at the specified index.
c_duckdb_bind_int32 :: DuckDBPreparedStatement -> DuckDBIdx -> Int32 -> IO DuckDBState Source #
Binds an int32_t value to the prepared statement at the specified index.
c_duckdb_bind_int64 :: DuckDBPreparedStatement -> DuckDBIdx -> Int64 -> IO DuckDBState Source #
Binds an int64_t value to the prepared statement at the specified index.
c_duckdb_bind_hugeint :: DuckDBPreparedStatement -> DuckDBIdx -> Ptr DuckDBHugeInt -> IO DuckDBState Source #
Binds a duckdb_hugeint value to the prepared statement at the specified index.
These bindings call the wrapper symbol wrapped_duckdb_bind_hugeint
but mirror the DuckDB C API semantics of duckdb_bind_hugeint
.
c_duckdb_bind_uhugeint :: DuckDBPreparedStatement -> DuckDBIdx -> Ptr DuckDBUHugeInt -> IO DuckDBState Source #
Binds a duckdb_uhugeint value to the prepared statement at the specified index.
These bindings call the wrapper symbol wrapped_duckdb_bind_uhugeint
but mirror the DuckDB C API semantics of duckdb_bind_uhugeint
.
c_duckdb_bind_decimal :: DuckDBPreparedStatement -> DuckDBIdx -> Ptr DuckDBDecimal -> IO DuckDBState Source #
Binds a duckdb_decimal value to the prepared statement at the specified index.
These bindings call the wrapper symbol wrapped_duckdb_bind_decimal
but mirror the DuckDB C API semantics of duckdb_bind_decimal
.
c_duckdb_bind_uint8 :: DuckDBPreparedStatement -> DuckDBIdx -> Word8 -> IO DuckDBState Source #
Binds a uint8_t value to the prepared statement at the specified index.
c_duckdb_bind_uint16 :: DuckDBPreparedStatement -> DuckDBIdx -> Word16 -> IO DuckDBState Source #
Binds a uint16_t value to the prepared statement at the specified index.
c_duckdb_bind_uint32 :: DuckDBPreparedStatement -> DuckDBIdx -> Word32 -> IO DuckDBState Source #
Binds a uint32_t value to the prepared statement at the specified index.
c_duckdb_bind_uint64 :: DuckDBPreparedStatement -> DuckDBIdx -> Word64 -> IO DuckDBState Source #
Binds a uint64_t value to the prepared statement at the specified index.
c_duckdb_bind_float :: DuckDBPreparedStatement -> DuckDBIdx -> CFloat -> IO DuckDBState Source #
Binds a float value to the prepared statement at the specified index.
c_duckdb_bind_double :: DuckDBPreparedStatement -> DuckDBIdx -> CDouble -> IO DuckDBState Source #
Binds a double value to the prepared statement at the specified index.
c_duckdb_bind_date :: DuckDBPreparedStatement -> DuckDBIdx -> DuckDBDate -> IO DuckDBState Source #
Binds a duckdb_date value to the prepared statement at the specified index.
c_duckdb_bind_time :: DuckDBPreparedStatement -> DuckDBIdx -> DuckDBTime -> IO DuckDBState Source #
Binds a duckdb_time value to the prepared statement at the specified index.
c_duckdb_bind_timestamp :: DuckDBPreparedStatement -> DuckDBIdx -> DuckDBTimestamp -> IO DuckDBState Source #
Binds a duckdb_timestamp value to the prepared statement at the specified index.
c_duckdb_bind_timestamp_tz :: DuckDBPreparedStatement -> DuckDBIdx -> DuckDBTimestamp -> IO DuckDBState Source #
Binds a duckdb_timestamp value to the prepared statement at the specified index.
c_duckdb_bind_interval :: DuckDBPreparedStatement -> DuckDBIdx -> Ptr DuckDBInterval -> IO DuckDBState Source #
Binds a duckdb_interval value to the prepared statement at the specified index.
These bindings call the wrapper symbol wrapped_duckdb_bind_interval
but mirror the DuckDB C API semantics of duckdb_bind_interval
.
c_duckdb_bind_varchar :: DuckDBPreparedStatement -> DuckDBIdx -> CString -> IO DuckDBState Source #
Binds a null-terminated varchar value to the prepared statement at the specified index.
c_duckdb_bind_varchar_length :: DuckDBPreparedStatement -> DuckDBIdx -> CString -> DuckDBIdx -> IO DuckDBState Source #
Binds a varchar value to the prepared statement at the specified index.
c_duckdb_bind_blob :: DuckDBPreparedStatement -> DuckDBIdx -> Ptr () -> DuckDBIdx -> IO DuckDBState Source #
Binds a blob value to the prepared statement at the specified index.
c_duckdb_bind_null :: DuckDBPreparedStatement -> DuckDBIdx -> IO DuckDBState Source #
Binds a NULL value to the prepared statement at the specified index.
c_duckdb_execute_prepared :: DuckDBPreparedStatement -> Ptr DuckDBResult -> IO DuckDBState Source #
Executes the prepared statement with the given bound parameters, and returns a materialized query result.
This method can be called multiple times for each prepared statement, and the parameters can be modified between calls to this function.
Note that the result must be freed with duckdb_destroy_result
.
Parameters:
* prepared_statement
: The prepared statement to execute.
* out_result
: The query result.
Returns DuckDBSuccess
on success or DuckDBError
on failure.
c_duckdb_execute_prepared_streaming :: DuckDBPreparedStatement -> Ptr DuckDBResult -> IO DuckDBState Source #
Warning Deprecation notice. This method is scheduled for removal in a future
release.
Executes the prepared statement with the given bound parameters, and returns
an optionally-streaming query result. To determine if the resulting query was
in fact streamed, use duckdb_result_is_streaming
This method can be called multiple times for each prepared statement, and the parameters can be modified between calls to this function.
Note that the result must be freed with duckdb_destroy_result
.
Parameters:
* prepared_statement
: The prepared statement to execute.
* out_result
: The query result.
Returns DuckDBSuccess
on success or DuckDBError
on failure.
c_duckdb_extract_statements :: DuckDBConnection -> CString -> Ptr DuckDBExtractedStatements -> IO DuckDBIdx Source #
Extract all statements from a query. Note that after calling
duckdb_extract_statements
, the extracted statements should always be
destroyed using duckdb_destroy_extracted
, even if no statements were
extracted.
If the extract fails, duckdb_extract_statements_error
can be called to
obtain the reason why the extract failed.
Parameters:
* connection
: The connection object
* query
: The SQL query to extract
* out_extracted_statements
: The resulting extracted statements object
Returns The number of extracted statements or 0 on failure.
c_duckdb_prepare_extracted_statement :: DuckDBConnection -> DuckDBExtractedStatements -> DuckDBIdx -> Ptr DuckDBPreparedStatement -> IO DuckDBState Source #
Prepare an extracted statement. Note that after calling
duckdb_prepare_extracted_statement
, the prepared statement should always be
destroyed using duckdb_destroy_prepare
, even if the prepare fails.
If the prepare fails, duckdb_prepare_error
can be called to obtain the
reason why the prepare failed.
Parameters:
* connection
: The connection object
* extracted_statements
: The extracted statements object
* index
: The index of the extracted statement to prepare
* out_prepared_statement
: The resulting prepared statement object
Returns DuckDBSuccess
on success or DuckDBError
on failure.
c_duckdb_extract_statements_error :: DuckDBExtractedStatements -> IO CString Source #
Returns the error message contained within the extracted statements. The
result of this function must not be freed. It will be cleaned up when
duckdb_destroy_extracted
is called.
Parameters:
* extracted_statements
: The extracted statements to fetch the error from.
Returns The error of the extracted statements.
c_duckdb_destroy_extracted :: Ptr DuckDBExtractedStatements -> IO () Source #
De-allocates all memory allocated for the extracted statements.
Parameters:
* extracted_statements
: The extracted statements to destroy.
c_duckdb_pending_prepared :: DuckDBPreparedStatement -> Ptr DuckDBPendingResult -> IO DuckDBState Source #
Executes the prepared statement with the given bound parameters, and returns a pending result. The pending result represents an intermediate structure for a query that is not yet fully executed. The pending result can be used to incrementally execute a query, returning control to the client between tasks.
Note that after calling duckdb_pending_prepared
, the pending result should
always be destroyed using duckdb_destroy_pending
, even if this function
returns DuckDBError.
Parameters:
* prepared_statement
: The prepared statement to execute.
* out_result
: The pending query result.
Returns DuckDBSuccess
on success or DuckDBError
on failure.
c_duckdb_pending_prepared_streaming :: DuckDBPreparedStatement -> Ptr DuckDBPendingResult -> IO DuckDBState Source #
Warning Deprecation notice. This method is scheduled for removal in a future
release.
Executes the prepared statement with the given bound parameters, and returns a pending result. This pending result will create a streaming duckdb_result when executed. The pending result represents an intermediate structure for a query that is not yet fully executed.
Note that after calling duckdb_pending_prepared_streaming
, the pending
result should always be destroyed using duckdb_destroy_pending
, even if this
function returns DuckDBError.
Parameters:
* prepared_statement
: The prepared statement to execute.
* out_result
: The pending query result.
Returns DuckDBSuccess
on success or DuckDBError
on failure.
c_duckdb_destroy_pending :: Ptr DuckDBPendingResult -> IO () Source #
Closes the pending result and de-allocates all memory allocated for the result.
Parameters:
* pending_result
: The pending result to destroy.
c_duckdb_pending_error :: DuckDBPendingResult -> IO CString Source #
Returns the error message contained within the pending result.
The result of this function must not be freed. It will be cleaned up when
duckdb_destroy_pending
is called.
Parameters:
* pending_result
: The pending result to fetch the error from.
Returns The error of the pending result.
c_duckdb_pending_execute_task :: DuckDBPendingResult -> IO DuckDBPendingState Source #
Executes a single task within the query, returning whether or not the query is ready.
If this returns DUCKDB_PENDING_RESULT_READY, the duckdb_execute_pending function can be called to obtain the result. If this returns DUCKDB_PENDING_RESULT_NOT_READY, the duckdb_pending_execute_task function should be called again. If this returns DUCKDB_PENDING_ERROR, an error occurred during execution.
The error message can be obtained by calling duckdb_pending_error on the pending_result.
Parameters:
* pending_result
: The pending result to execute a task within.
Returns The state of the pending result after the execution.
c_duckdb_pending_execute_check_state :: DuckDBPendingResult -> IO DuckDBPendingState Source #
If this returns DUCKDB_PENDING_RESULT_READY, the duckdb_execute_pending function can be called to obtain the result. If this returns DUCKDB_PENDING_RESULT_NOT_READY, the duckdb_pending_execute_check_state function should be called again. If this returns DUCKDB_PENDING_ERROR, an error occurred during execution.
The error message can be obtained by calling duckdb_pending_error on the pending_result.
Parameters:
* pending_result
: The pending result.
Returns The state of the pending result.
c_duckdb_execute_pending :: DuckDBPendingResult -> Ptr DuckDBResult -> IO DuckDBState Source #
Fully execute a pending query result, returning the final query result.
If duckdb_pending_execute_task has been called until DUCKDB_PENDING_RESULT_READY was returned, this will return fast. Otherwise, all remaining tasks must be executed first.
Note that the result must be freed with duckdb_destroy_result
.
Parameters:
* pending_result
: The pending result to execute.
* out_result
: The result object.
Returns DuckDBSuccess
on success or DuckDBError
on failure.
c_duckdb_pending_execution_is_finished :: DuckDBPendingState -> IO CBool Source #
Returns whether a duckdb_pending_state is finished executing. For example if
pending_state
is DUCKDB_PENDING_RESULT_READY, this function will return
true.
Parameters:
* pending_state
: The pending state on which to decide whether to finish
execution.
Returns Boolean indicating pending execution should be considered finished.
c_duckdb_destroy_value :: Ptr DuckDBValue -> IO () Source #
Destroys the value and de-allocates all memory allocated for that type.
Parameters:
* value
: The value to destroy.
c_duckdb_create_varchar :: CString -> IO DuckDBValue Source #
Creates a value from a null-terminated string
Parameters:
* text
: The null-terminated string
Returns The value. This must be destroyed with duckdb_destroy_value
.
c_duckdb_create_varchar_length :: CString -> DuckDBIdx -> IO DuckDBValue Source #
Creates a value from a string
Parameters:
* text
: The text
* length
: The length of the text
Returns The value. This must be destroyed with duckdb_destroy_value
.
c_duckdb_create_bool :: CBool -> IO DuckDBValue Source #
Creates a value from a boolean
Parameters:
* input
: The boolean value
Returns The value. This must be destroyed with duckdb_destroy_value
.
c_duckdb_create_int8 :: Int8 -> IO DuckDBValue Source #
Creates a value from an int8_t (a tinyint)
Parameters:
* input
: The tinyint value
Returns The value. This must be destroyed with duckdb_destroy_value
.
c_duckdb_create_uint8 :: Word8 -> IO DuckDBValue Source #
Creates a value from a uint8_t (a utinyint)
Parameters:
* input
: The utinyint value
Returns The value. This must be destroyed with duckdb_destroy_value
.
c_duckdb_create_int16 :: Int16 -> IO DuckDBValue Source #
Creates a value from an int16_t (a smallint)
Parameters:
* input
: The smallint value
Returns The value. This must be destroyed with duckdb_destroy_value
.
c_duckdb_create_uint16 :: Word16 -> IO DuckDBValue Source #
Creates a value from a uint16_t (a usmallint)
Parameters:
* input
: The usmallint value
Returns The value. This must be destroyed with duckdb_destroy_value
.
c_duckdb_create_int32 :: Int32 -> IO DuckDBValue Source #
Creates a value from an int32_t (an integer)
Parameters:
* input
: The integer value
Returns The value. This must be destroyed with duckdb_destroy_value
.
c_duckdb_create_uint32 :: Word32 -> IO DuckDBValue Source #
Creates a value from a uint32_t (a uinteger)
Parameters:
* input
: The uinteger value
Returns The value. This must be destroyed with duckdb_destroy_value
.
c_duckdb_create_uint64 :: Word64 -> IO DuckDBValue Source #
Creates a value from a uint64_t (a ubigint)
Parameters:
* input
: The ubigint value
Returns The value. This must be destroyed with duckdb_destroy_value
.
c_duckdb_create_int64 :: Int64 -> IO DuckDBValue Source #
Creates a value from an int64
Returns The value. This must be destroyed with duckdb_destroy_value
.
c_duckdb_create_hugeint :: Ptr DuckDBHugeInt -> IO DuckDBValue Source #
Creates a value from a hugeint
Parameters:
* input
: The hugeint value
Returns The value. This must be destroyed with duckdb_destroy_value
.
These bindings call the wrapper symbol wrapped_duckdb_create_hugeint
but mirror the DuckDB C API semantics of duckdb_create_hugeint
.
c_duckdb_create_uhugeint :: Ptr DuckDBUHugeInt -> IO DuckDBValue Source #
Creates a value from a uhugeint
Parameters:
* input
: The uhugeint value
Returns The value. This must be destroyed with duckdb_destroy_value
.
These bindings call the wrapper symbol wrapped_duckdb_create_uhugeint
but mirror the DuckDB C API semantics of duckdb_create_uhugeint
.
c_duckdb_create_bignum :: Ptr DuckDBBignum -> IO DuckDBValue Source #
Creates a BIGNUM value from a duckdb_bignum
Parameters:
* input
: The duckdb_bignum value
Returns The value. This must be destroyed with duckdb_destroy_value
.
These bindings call the wrapper symbol wrapped_duckdb_create_bignum
but mirror the DuckDB C API semantics of duckdb_create_bignum
.
c_duckdb_create_decimal :: Ptr DuckDBDecimal -> IO DuckDBValue Source #
Creates a DECIMAL value from a duckdb_decimal
Parameters:
* input
: The duckdb_decimal value
Returns The value. This must be destroyed with duckdb_destroy_value
.
These bindings call the wrapper symbol wrapped_duckdb_create_decimal
but mirror the DuckDB C API semantics of duckdb_create_decimal
.
c_duckdb_create_float :: CFloat -> IO DuckDBValue Source #
Creates a value from a float
Parameters:
* input
: The float value
Returns The value. This must be destroyed with duckdb_destroy_value
.
c_duckdb_create_double :: CDouble -> IO DuckDBValue Source #
Creates a value from a double
Parameters:
* input
: The double value
Returns The value. This must be destroyed with duckdb_destroy_value
.
c_duckdb_create_date :: DuckDBDate -> IO DuckDBValue Source #
Creates a value from a date
Parameters:
* input
: The date value
Returns The value. This must be destroyed with duckdb_destroy_value
.
c_duckdb_create_time :: DuckDBTime -> IO DuckDBValue Source #
Creates a value from a time
Parameters:
* input
: The time value
Returns The value. This must be destroyed with duckdb_destroy_value
.
c_duckdb_create_time_ns :: DuckDBTimeNs -> IO DuckDBValue Source #
Creates a value from a time_ns
Parameters:
* input
: The time value
Returns The value. This must be destroyed with duckdb_destroy_value
.
c_duckdb_create_time_tz_value :: DuckDBTimeTz -> IO DuckDBValue Source #
Creates a value from a time_tz. Not to be confused with
duckdb_create_time_tz
, which creates a duckdb_time_tz_t.
Parameters:
* value
: The time_tz value
Returns The value. This must be destroyed with duckdb_destroy_value
.
c_duckdb_create_timestamp :: DuckDBTimestamp -> IO DuckDBValue Source #
Creates a TIMESTAMP value from a duckdb_timestamp
Parameters:
* input
: The duckdb_timestamp value
Returns The value. This must be destroyed with duckdb_destroy_value
.
c_duckdb_create_timestamp_tz :: DuckDBTimestamp -> IO DuckDBValue Source #
Creates a TIMESTAMP_TZ value from a duckdb_timestamp
Parameters:
* input
: The duckdb_timestamp value
Returns The value. This must be destroyed with duckdb_destroy_value
.
c_duckdb_create_timestamp_s :: DuckDBTimestampS -> IO DuckDBValue Source #
Creates a TIMESTAMP_S value from a duckdb_timestamp_s
Parameters:
* input
: The duckdb_timestamp_s value
Returns The value. This must be destroyed with duckdb_destroy_value
.
c_duckdb_create_timestamp_ms :: DuckDBTimestampMs -> IO DuckDBValue Source #
Creates a TIMESTAMP_MS value from a duckdb_timestamp_ms
Parameters:
* input
: The duckdb_timestamp_ms value
Returns The value. This must be destroyed with duckdb_destroy_value
.
c_duckdb_create_timestamp_ns :: DuckDBTimestampNs -> IO DuckDBValue Source #
Creates a TIMESTAMP_NS value from a duckdb_timestamp_ns
Parameters:
* input
: The duckdb_timestamp_ns value
Returns The value. This must be destroyed with duckdb_destroy_value
.
c_duckdb_create_interval :: Ptr DuckDBInterval -> IO DuckDBValue Source #
Creates a value from an interval
Parameters:
* input
: The interval value
Returns The value. This must be destroyed with duckdb_destroy_value
.
These bindings call the wrapper symbol wrapped_duckdb_create_interval
but mirror the DuckDB C API semantics of duckdb_create_interval
.
c_duckdb_create_blob :: Ptr Word8 -> DuckDBIdx -> IO DuckDBValue Source #
Creates a value from a blob
Parameters:
* data
: The blob data
* length
: The length of the blob data
Returns The value. This must be destroyed with duckdb_destroy_value
.
c_duckdb_create_bit :: Ptr DuckDBBit -> IO DuckDBValue Source #
Creates a BIT value from a duckdb_bit
Parameters:
* input
: The duckdb_bit value
Returns The value. This must be destroyed with duckdb_destroy_value
.
These bindings call the wrapper symbol wrapped_duckdb_create_bit
but
mirror the DuckDB C API semantics of duckdb_create_bit
.
c_duckdb_create_uuid :: Ptr DuckDBUHugeInt -> IO DuckDBValue Source #
Creates a UUID value from a uhugeint
Parameters:
* input
: The duckdb_uhugeint containing the UUID
Returns The value. This must be destroyed with duckdb_destroy_value
.
These bindings call the wrapper symbol wrapped_duckdb_create_uuid
but
mirror the DuckDB C API semantics of duckdb_create_uuid
.
c_duckdb_get_bool :: DuckDBValue -> IO CBool Source #
Returns the boolean value of the given value.
Parameters:
* val
: A duckdb_value containing a boolean
Returns A boolean, or false if the value cannot be converted
c_duckdb_get_int8 :: DuckDBValue -> IO Int8 Source #
Returns the int8_t value of the given value.
Parameters:
* val
: A duckdb_value containing a tinyint
Returns A int8_t, or MinValue if the value cannot be converted
c_duckdb_get_uint8 :: DuckDBValue -> IO Word8 Source #
Returns the uint8_t value of the given value.
Parameters:
* val
: A duckdb_value containing a utinyint
Returns A uint8_t, or MinValue if the value cannot be converted
c_duckdb_get_int16 :: DuckDBValue -> IO Int16 Source #
Returns the int16_t value of the given value.
Parameters:
* val
: A duckdb_value containing a smallint
Returns A int16_t, or MinValue if the value cannot be converted
c_duckdb_get_uint16 :: DuckDBValue -> IO Word16 Source #
Returns the uint16_t value of the given value.
Parameters:
* val
: A duckdb_value containing a usmallint
Returns A uint16_t, or MinValue if the value cannot be converted
c_duckdb_get_int32 :: DuckDBValue -> IO Int32 Source #
Returns the int32_t value of the given value.
Parameters:
* val
: A duckdb_value containing an integer
Returns A int32_t, or MinValue if the value cannot be converted
c_duckdb_get_uint32 :: DuckDBValue -> IO Word32 Source #
Returns the uint32_t value of the given value.
Parameters:
* val
: A duckdb_value containing a uinteger
Returns A uint32_t, or MinValue if the value cannot be converted
c_duckdb_get_int64 :: DuckDBValue -> IO Int64 Source #
Returns the int64_t value of the given value.
Parameters:
* val
: A duckdb_value containing a bigint
Returns A int64_t, or MinValue if the value cannot be converted
c_duckdb_get_uint64 :: DuckDBValue -> IO Word64 Source #
Returns the uint64_t value of the given value.
Parameters:
* val
: A duckdb_value containing a ubigint
Returns A uint64_t, or MinValue if the value cannot be converted
c_duckdb_get_hugeint :: DuckDBValue -> Ptr DuckDBHugeInt -> IO () Source #
Returns the hugeint value of the given value.
Parameters:
* val
: A duckdb_value containing a hugeint
Returns A duckdb_hugeint, or MinValue if the value cannot be converted
These bindings call the wrapper symbol wrapped_duckdb_get_hugeint
but
mirror the DuckDB C API semantics of duckdb_get_hugeint
.
c_duckdb_get_uhugeint :: DuckDBValue -> Ptr DuckDBUHugeInt -> IO () Source #
Returns the uhugeint value of the given value.
Parameters:
* val
: A duckdb_value containing a uhugeint
Returns A duckdb_uhugeint, or MinValue if the value cannot be converted
These bindings call the wrapper symbol wrapped_duckdb_get_uhugeint
but mirror the DuckDB C API semantics of duckdb_get_uhugeint
.
c_duckdb_get_bignum :: DuckDBValue -> Ptr DuckDBBignum -> IO () Source #
Returns the duckdb_bignum value of the given value. The data
field must be
destroyed with duckdb_free
.
Parameters:
* val
: A duckdb_value containing a BIGNUM
Returns A duckdb_bignum. The data
field must be destroyed with
duckdb_free
.
These bindings call the wrapper symbol wrapped_duckdb_get_bignum
but
mirror the DuckDB C API semantics of duckdb_get_bignum
.
c_duckdb_get_decimal :: DuckDBValue -> Ptr DuckDBDecimal -> IO () Source #
Returns the duckdb_decimal value of the given value.
Parameters:
* val
: A duckdb_value containing a DECIMAL
Returns A duckdb_decimal, or MinValue if the value cannot be converted
These bindings call the wrapper symbol wrapped_duckdb_get_decimal
but
mirror the DuckDB C API semantics of duckdb_get_decimal
.
c_duckdb_get_float :: DuckDBValue -> IO CFloat Source #
Returns the float value of the given value.
Parameters:
* val
: A duckdb_value containing a float
Returns A float, or NAN if the value cannot be converted
c_duckdb_get_double :: DuckDBValue -> IO CDouble Source #
Returns the double value of the given value.
Parameters:
* val
: A duckdb_value containing a double
Returns A double, or NAN if the value cannot be converted
c_duckdb_get_date :: DuckDBValue -> IO DuckDBDate Source #
Returns the date value of the given value.
Parameters:
* val
: A duckdb_value containing a date
Returns A duckdb_date, or MinValue if the value cannot be converted
c_duckdb_get_time :: DuckDBValue -> IO DuckDBTime Source #
Returns the time value of the given value.
Parameters:
* val
: A duckdb_value containing a time
Returns A duckdb_time, or MinValue if the value cannot be converted
c_duckdb_get_time_ns :: DuckDBValue -> IO DuckDBTimeNs Source #
Returns the time_ns value of the given value.
Parameters:
* val
: A duckdb_value containing a time_ns
Returns A duckdb_time_ns, or MinValue if the value cannot be converted
c_duckdb_get_time_tz :: DuckDBValue -> IO DuckDBTimeTz Source #
Returns the time_tz value of the given value.
Parameters:
* val
: A duckdb_value containing a time_tz
Returns A duckdb_time_tz, or MinValue if the value cannot be converted
c_duckdb_get_timestamp :: DuckDBValue -> IO DuckDBTimestamp Source #
Returns the TIMESTAMP value of the given value.
Parameters:
* val
: A duckdb_value containing a TIMESTAMP
Returns A duckdb_timestamp, or MinValue if the value cannot be converted
c_duckdb_get_timestamp_tz :: DuckDBValue -> IO DuckDBTimestamp Source #
Returns the TIMESTAMP_TZ value of the given value.
Parameters:
* val
: A duckdb_value containing a TIMESTAMP_TZ
Returns A duckdb_timestamp, or MinValue if the value cannot be converted
c_duckdb_get_timestamp_s :: DuckDBValue -> IO DuckDBTimestampS Source #
Returns the duckdb_timestamp_s value of the given value.
Parameters:
* val
: A duckdb_value containing a TIMESTAMP_S
Returns A duckdb_timestamp_s, or MinValue if the value cannot be converted
c_duckdb_get_timestamp_ms :: DuckDBValue -> IO DuckDBTimestampMs Source #
Returns the duckdb_timestamp_ms value of the given value.
Parameters:
* val
: A duckdb_value containing a TIMESTAMP_MS
Returns A duckdb_timestamp_ms, or MinValue if the value cannot be converted
c_duckdb_get_timestamp_ns :: DuckDBValue -> IO DuckDBTimestampNs Source #
Returns the duckdb_timestamp_ns value of the given value.
Parameters:
* val
: A duckdb_value containing a TIMESTAMP_NS
Returns A duckdb_timestamp_ns, or MinValue if the value cannot be converted
c_duckdb_get_interval :: DuckDBValue -> Ptr DuckDBInterval -> IO () Source #
Returns the interval value of the given value.
Parameters:
* val
: A duckdb_value containing a interval
Returns A duckdb_interval, or MinValue if the value cannot be converted
These bindings call the wrapper symbol wrapped_duckdb_get_interval
but mirror the DuckDB C API semantics of duckdb_get_interval
.
c_duckdb_get_value_type :: DuckDBValue -> IO DuckDBLogicalType Source #
Returns the type of the given value. The type is valid as long as the value is not destroyed. The type itself must not be destroyed.
Parameters:
* val
: A duckdb_value
Returns A duckdb_logical_type.
c_duckdb_get_blob :: DuckDBValue -> Ptr DuckDBBlob -> IO () Source #
Returns the blob value of the given value.
Parameters:
* val
: A duckdb_value containing a blob
Returns A duckdb_blob
These bindings call the wrapper symbol wrapped_duckdb_get_blob
but
mirror the DuckDB C API semantics of duckdb_get_blob
.
c_duckdb_get_bit :: DuckDBValue -> Ptr DuckDBBit -> IO () Source #
Returns the duckdb_bit value of the given value. The data
field must be
destroyed with duckdb_free
.
Parameters:
* val
: A duckdb_value containing a BIT
Returns A duckdb_bit
These bindings call the wrapper symbol wrapped_duckdb_get_bit
but
mirror the DuckDB C API semantics of duckdb_get_bit
.
c_duckdb_get_uuid :: DuckDBValue -> Ptr DuckDBUHugeInt -> IO () Source #
Returns a duckdb_uhugeint representing the UUID value of the given value.
Parameters:
* val
: A duckdb_value containing a UUID
Returns A duckdb_uhugeint representing the UUID value
These bindings call the wrapper symbol wrapped_duckdb_get_uuid
but
mirror the DuckDB C API semantics of duckdb_get_uuid
.
c_duckdb_get_varchar :: DuckDBValue -> IO CString Source #
Obtains a string representation of the given value. The result must be
destroyed with duckdb_free
.
Parameters:
* value
: The value
Returns The string value. This must be destroyed with duckdb_free
.
c_duckdb_create_struct_value :: DuckDBLogicalType -> Ptr DuckDBValue -> IO DuckDBValue Source #
Creates a struct value from a type and an array of values. Must be destroyed
with duckdb_destroy_value
.
Parameters:
* type
: The type of the struct
* values
: The values for the struct fields
Returns The struct value, or nullptr, if any child type is DUCKDB_TYPE_ANY
or DUCKDB_TYPE_INVALID
.
c_duckdb_create_list_value :: DuckDBLogicalType -> Ptr DuckDBValue -> DuckDBIdx -> IO DuckDBValue Source #
Creates a list value from a child (element) type and an array of values of
length value_count
. Must be destroyed with duckdb_destroy_value
.
Parameters:
* type
: The type of the list
* values
: The values for the list
* value_count
: The number of values in the list
Returns The list value, or nullptr, if the child type is DUCKDB_TYPE_ANY
or
DUCKDB_TYPE_INVALID
.
c_duckdb_create_array_value :: DuckDBLogicalType -> Ptr DuckDBValue -> DuckDBIdx -> IO DuckDBValue Source #
Creates an array value from a child (element) type and an array of values of
length value_count
. Must be destroyed with duckdb_destroy_value
.
Parameters:
* type
: The type of the array
* values
: The values for the array
* value_count
: The number of values in the array
Returns The array value, or nullptr, if the child type is DUCKDB_TYPE_ANY
or
DUCKDB_TYPE_INVALID
.
c_duckdb_create_map_value :: DuckDBLogicalType -> Ptr DuckDBValue -> Ptr DuckDBValue -> DuckDBIdx -> IO DuckDBValue Source #
Creates a map value from a map type and two arrays, one for the keys and one
for the values, each of length entry_count
. Must be destroyed with
duckdb_destroy_value
.
Parameters:
* map_type
: The map type
* keys
: The keys of the map
* values
: The values of the map
* entry_count
: The number of entrys (key-value pairs) in the map
Returns The map value, or nullptr, if the parameters are invalid.
c_duckdb_create_union_value :: DuckDBLogicalType -> DuckDBIdx -> DuckDBValue -> IO DuckDBValue Source #
Creates a union value from a union type, a tag index, and a value. Must be
destroyed with duckdb_destroy_value
.
Parameters:
* union_type
: The union type
* tag_index
: The index of the tag of the union
* value
: The value of the union for that tag
Returns The union value, or nullptr, if the parameters are invalid.
c_duckdb_get_map_size :: DuckDBValue -> IO DuckDBIdx Source #
Returns the number of elements in a MAP value.
Parameters:
* value
: The MAP value.
Returns The number of elements in the map.
c_duckdb_get_map_key :: DuckDBValue -> DuckDBIdx -> IO DuckDBValue Source #
Returns the MAP key at index as a duckdb_value.
Parameters:
* value
: The MAP value.
* index
: The index of the key.
Returns The key as a duckdb_value.
c_duckdb_get_map_value :: DuckDBValue -> DuckDBIdx -> IO DuckDBValue Source #
Returns the MAP value at index as a duckdb_value.
Parameters:
* value
: The MAP value.
* index
: The index of the value.
Returns The value as a duckdb_value.
c_duckdb_is_null_value :: DuckDBValue -> IO CBool Source #
Returns whether the value's type is SQLNULL or not.
Parameters:
* value
: The value to check.
Returns True, if the value's type is SQLNULL, otherwise false.
c_duckdb_create_null_value :: IO DuckDBValue Source #
Creates a value of type SQLNULL.
Returns The duckdb_value representing SQLNULL. This must be destroyed with
duckdb_destroy_value
.
c_duckdb_get_list_size :: DuckDBValue -> IO DuckDBIdx Source #
Returns the number of elements in a LIST value.
Parameters:
* value
: The LIST value.
Returns The number of elements in the list.
c_duckdb_get_list_child :: DuckDBValue -> DuckDBIdx -> IO DuckDBValue Source #
Returns the LIST child at index as a duckdb_value.
Parameters:
* value
: The LIST value.
* index
: The index of the child.
Returns The child as a duckdb_value.
c_duckdb_create_enum_value :: DuckDBLogicalType -> Word64 -> IO DuckDBValue Source #
Creates an enum value from a type and a value. Must be destroyed with
duckdb_destroy_value
.
Parameters:
* type
: The type of the enum
* value
: The value for the enum
Returns The enum value, or nullptr.
c_duckdb_get_enum_value :: DuckDBValue -> IO Word64 Source #
Returns the enum value of the given value.
Parameters:
* value
: A duckdb_value containing an enum
Returns A uint64_t, or MinValue if the value cannot be converted
c_duckdb_get_struct_child :: DuckDBValue -> DuckDBIdx -> IO DuckDBValue Source #
Returns the STRUCT child at index as a duckdb_value.
Parameters:
* value
: The STRUCT value.
* index
: The index of the child.
Returns The child as a duckdb_value.
c_duckdb_value_to_string :: DuckDBValue -> IO CString Source #
Returns the SQL string representation of the given value.
Parameters:
* value
: A duckdb_value.
Returns The SQL string representation as a null-terminated string. The result
must be freed with duckdb_free
.
c_duckdb_create_logical_type :: DuckDBType -> IO DuckDBLogicalType Source #
Creates a duckdb_logical_type
from a primitive type. The resulting logical
type must be destroyed with duckdb_destroy_logical_type
.
Returns an invalid logical type, if type is: DUCKDB_TYPE_INVALID
,
DUCKDB_TYPE_DECIMAL
, DUCKDB_TYPE_ENUM
, DUCKDB_TYPE_LIST
,
DUCKDB_TYPE_STRUCT
, DUCKDB_TYPE_MAP
, DUCKDB_TYPE_ARRAY
, or
DUCKDB_TYPE_UNION
.
Parameters:
* type
: The primitive type to create.
Returns The logical type.
c_duckdb_logical_type_get_alias :: DuckDBLogicalType -> IO CString Source #
Returns the alias of a duckdb_logical_type, if set, else nullptr
. The result
must be destroyed with duckdb_free
.
Parameters:
* type
: The logical type
Returns The alias or nullptr
c_duckdb_logical_type_set_alias :: DuckDBLogicalType -> CString -> IO () Source #
Sets the alias of a duckdb_logical_type.
Parameters:
* type
: The logical type
* alias
: The alias to set
c_duckdb_create_list_type :: DuckDBLogicalType -> IO DuckDBLogicalType Source #
Creates a LIST type from its child type. The return type must be destroyed
with duckdb_destroy_logical_type
.
Parameters:
* type
: The child type of the list
Returns The logical type.
c_duckdb_create_array_type :: DuckDBLogicalType -> DuckDBIdx -> IO DuckDBLogicalType Source #
Creates an ARRAY type from its child type. The return type must be destroyed
with duckdb_destroy_logical_type
.
Parameters:
* type
: The child type of the array.
* array_size
: The number of elements in the array.
Returns The logical type.
c_duckdb_create_map_type :: DuckDBLogicalType -> DuckDBLogicalType -> IO DuckDBLogicalType Source #
Creates a MAP type from its key type and value type. The return type must be
destroyed with duckdb_destroy_logical_type
.
Parameters:
* key_type
: The map's key type.
* value_type
: The map's value type.
Returns The logical type.
c_duckdb_create_union_type :: Ptr DuckDBLogicalType -> Ptr CString -> DuckDBIdx -> IO DuckDBLogicalType Source #
Creates a UNION type from the passed arrays. The return type must be destroyed
with duckdb_destroy_logical_type
.
Parameters:
* member_types
: The array of union member types.
* member_names
: The union member names.
* member_count
: The number of union members.
Returns The logical type.
c_duckdb_create_struct_type :: Ptr DuckDBLogicalType -> Ptr CString -> DuckDBIdx -> IO DuckDBLogicalType Source #
Creates a STRUCT type based on the member types and names. The resulting type
must be destroyed with duckdb_destroy_logical_type
.
Parameters:
* member_types
: The array of types of the struct members.
* member_names
: The array of names of the struct members.
* member_count
: The number of members of the struct.
Returns The logical type.
c_duckdb_create_enum_type :: Ptr CString -> DuckDBIdx -> IO DuckDBLogicalType Source #
Creates an ENUM type from the passed member name array. The resulting type
should be destroyed with duckdb_destroy_logical_type
.
Parameters:
* member_names
: The array of names that the enum should consist of.
* member_count
: The number of elements that were specified in the array.
Returns The logical type.
c_duckdb_create_decimal_type :: Word8 -> Word8 -> IO DuckDBLogicalType Source #
Creates a DECIMAL type with the specified width and scale. The resulting type
should be destroyed with duckdb_destroy_logical_type
.
Parameters:
* width
: The width of the decimal type
* scale
: The scale of the decimal type
Returns The logical type.
c_duckdb_get_type_id :: DuckDBLogicalType -> IO DuckDBType Source #
Retrieves the enum duckdb_type
of a duckdb_logical_type
.
Parameters:
* type
: The logical type.
Returns The duckdb_type
id.
c_duckdb_decimal_width :: DuckDBLogicalType -> IO Word8 Source #
Retrieves the width of a decimal type.
Parameters:
* type
: The logical type object
Returns The width of the decimal type
c_duckdb_decimal_scale :: DuckDBLogicalType -> IO Word8 Source #
Retrieves the scale of a decimal type.
Parameters:
* type
: The logical type object
Returns The scale of the decimal type
c_duckdb_decimal_internal_type :: DuckDBLogicalType -> IO DuckDBType Source #
Retrieves the internal storage type of a decimal type.
Parameters:
* type
: The logical type object
Returns The internal type of the decimal type
c_duckdb_enum_internal_type :: DuckDBLogicalType -> IO DuckDBType Source #
Retrieves the internal storage type of an enum type.
Parameters:
* type
: The logical type object
Returns The internal type of the enum type
c_duckdb_enum_dictionary_size :: DuckDBLogicalType -> IO Word32 Source #
Retrieves the dictionary size of the enum type.
Parameters:
* type
: The logical type object
Returns The dictionary size of the enum type
c_duckdb_enum_dictionary_value :: DuckDBLogicalType -> DuckDBIdx -> IO CString Source #
Retrieves the dictionary value at the specified position from the enum.
The result must be freed with duckdb_free
.
Parameters:
* type
: The logical type object
* index
: The index in the dictionary
Returns The string value of the enum type. Must be freed with duckdb_free
.
c_duckdb_list_type_child_type :: DuckDBLogicalType -> IO DuckDBLogicalType Source #
Retrieves the child type of the given LIST type. Also accepts MAP types. The
result must be freed with duckdb_destroy_logical_type
.
Parameters:
* type
: The logical type, either LIST or MAP.
Returns The child type of the LIST or MAP type.
c_duckdb_array_type_child_type :: DuckDBLogicalType -> IO DuckDBLogicalType Source #
Retrieves the child type of the given ARRAY type.
The result must be freed with duckdb_destroy_logical_type
.
Parameters:
* type
: The logical type. Must be ARRAY.
Returns The child type of the ARRAY type.
c_duckdb_array_type_array_size :: DuckDBLogicalType -> IO DuckDBIdx Source #
Retrieves the array size of the given array type.
Parameters:
* type
: The logical type object
Returns The fixed number of elements the values of this array type can store.
c_duckdb_map_type_key_type :: DuckDBLogicalType -> IO DuckDBLogicalType Source #
Retrieves the key type of the given map type.
The result must be freed with duckdb_destroy_logical_type
.
Parameters:
* type
: The logical type object
Returns The key type of the map type. Must be destroyed with
duckdb_destroy_logical_type
.
c_duckdb_map_type_value_type :: DuckDBLogicalType -> IO DuckDBLogicalType Source #
Retrieves the value type of the given map type.
The result must be freed with duckdb_destroy_logical_type
.
Parameters:
* type
: The logical type object
Returns The value type of the map type. Must be destroyed with
duckdb_destroy_logical_type
.
c_duckdb_struct_type_child_count :: DuckDBLogicalType -> IO DuckDBIdx Source #
Returns the number of children of a struct type.
Parameters:
* type
: The logical type object
Returns The number of children of a struct type.
c_duckdb_struct_type_child_name :: DuckDBLogicalType -> DuckDBIdx -> IO CString Source #
Retrieves the name of the struct child.
The result must be freed with duckdb_free
.
Parameters:
* type
: The logical type object
* index
: The child index
Returns The name of the struct type. Must be freed with duckdb_free
.
c_duckdb_struct_type_child_type :: DuckDBLogicalType -> DuckDBIdx -> IO DuckDBLogicalType Source #
Retrieves the child type of the given struct type at the specified index.
The result must be freed with duckdb_destroy_logical_type
.
Parameters:
* type
: The logical type object
* index
: The child index
Returns The child type of the struct type. Must be destroyed with
duckdb_destroy_logical_type
.
c_duckdb_union_type_member_count :: DuckDBLogicalType -> IO DuckDBIdx Source #
Returns the number of members that the union type has.
Parameters:
* type
: The logical type (union) object
Returns The number of members of a union type.
c_duckdb_union_type_member_name :: DuckDBLogicalType -> DuckDBIdx -> IO CString Source #
Retrieves the name of the union member.
The result must be freed with duckdb_free
.
Parameters:
* type
: The logical type object
* index
: The child index
Returns The name of the union member. Must be freed with duckdb_free
.
c_duckdb_union_type_member_type :: DuckDBLogicalType -> DuckDBIdx -> IO DuckDBLogicalType Source #
Retrieves the child type of the given union member at the specified index.
The result must be freed with duckdb_destroy_logical_type
.
Parameters:
* type
: The logical type object
* index
: The child index
Returns The child type of the union member. Must be destroyed with
duckdb_destroy_logical_type
.
c_duckdb_destroy_logical_type :: Ptr DuckDBLogicalType -> IO () Source #
Destroys the logical type and de-allocates all memory allocated for that type.
Parameters:
* type
: The logical type to destroy.
c_duckdb_register_logical_type :: DuckDBConnection -> DuckDBLogicalType -> DuckDBCreateTypeInfo -> IO DuckDBState Source #
Registers a custom type within the given connection. The type must have an alias
Parameters:
* con
: The connection to use
* type
: The custom type to register
Returns Whether or not the registration was successful.
c_duckdb_create_data_chunk :: Ptr DuckDBLogicalType -> DuckDBIdx -> IO DuckDBDataChunk Source #
Creates an empty data chunk with the specified column types. The result must
be destroyed with duckdb_destroy_data_chunk
.
Parameters:
* types
: An array of column types. Column types can not contain ANY and
INVALID types.
* column_count
: The number of columns.
Returns The data chunk.
c_duckdb_destroy_data_chunk :: Ptr DuckDBDataChunk -> IO () Source #
Destroys the data chunk and de-allocates all memory allocated for that chunk.
Parameters:
* chunk
: The data chunk to destroy.
c_duckdb_data_chunk_reset :: DuckDBDataChunk -> IO () Source #
Resets a data chunk, clearing the validity masks and setting the cardinality
of the data chunk to 0. After calling this method, you must call
duckdb_vector_get_validity
and duckdb_vector_get_data
to obtain current
data and validity pointers
Parameters:
* chunk
: The data chunk to reset.
c_duckdb_data_chunk_get_column_count :: DuckDBDataChunk -> IO DuckDBIdx Source #
Retrieves the number of columns in a data chunk.
Parameters:
* chunk
: The data chunk to get the data from
Returns The number of columns in the data chunk
c_duckdb_data_chunk_get_vector :: DuckDBDataChunk -> DuckDBIdx -> IO DuckDBVector Source #
Retrieves the vector at the specified column index in the data chunk.
The pointer to the vector is valid for as long as the chunk is alive. It does NOT need to be destroyed.
Parameters:
* chunk
: The data chunk to get the data from
Returns The vector
c_duckdb_data_chunk_get_size :: DuckDBDataChunk -> IO DuckDBIdx Source #
Retrieves the current number of tuples in a data chunk.
Parameters:
* chunk
: The data chunk to get the data from
Returns The number of tuples in the data chunk
c_duckdb_data_chunk_set_size :: DuckDBDataChunk -> DuckDBIdx -> IO () Source #
Sets the current number of tuples in a data chunk.
Parameters:
* chunk
: The data chunk to set the size in
* size
: The number of tuples in the data chunk
c_duckdb_create_vector :: DuckDBLogicalType -> DuckDBIdx -> IO DuckDBVector Source #
Creates a flat vector. Must be destroyed with duckdb_destroy_vector
.
Parameters:
* type
: The logical type of the vector.
* capacity
: The capacity of the vector.
Returns The vector.
c_duckdb_destroy_vector :: Ptr DuckDBVector -> IO () Source #
Destroys the vector and de-allocates its memory.
Parameters:
* vector
: A pointer to the vector.
c_duckdb_vector_get_column_type :: DuckDBVector -> IO DuckDBLogicalType Source #
Retrieves the column type of the specified vector.
The result must be destroyed with duckdb_destroy_logical_type
.
Parameters:
* vector
: The vector get the data from
Returns The type of the vector
c_duckdb_vector_get_data :: DuckDBVector -> IO (Ptr ()) Source #
Retrieves the data pointer of the vector.
The data pointer can be used to read or write values from the vector. How to read or write values depends on the type of the vector.
Parameters:
* vector
: The vector to get the data from
Returns The data pointer
c_duckdb_vector_get_validity :: DuckDBVector -> IO (Ptr Word64) Source #
Retrieves the validity mask pointer of the specified vector.
If all values are valid, this function MIGHT return NULL!
The validity mask is a bitset that signifies null-ness within the data chunk. It is a series of uint64_t values, where each uint64_t value contains validity for 64 tuples. The bit is set to 1 if the value is valid (i.e., not NULL) or 0 if the value is invalid (i.e., NULL).
Validity of a specific value can be obtained like this:
idx_t entry_idx = row_idx / 64; idx_t idx_in_entry = row_idx % 64; bool is_valid = validity_mask[entry_idx] & (1 << idx_in_entry);
Alternatively, the (slower) duckdb_validity_row_is_valid function can be used.
Parameters:
* vector
: The vector to get the data from
Returns The pointer to the validity mask, or NULL if no validity mask is present
c_duckdb_vector_ensure_validity_writable :: DuckDBVector -> IO () Source #
Ensures the validity mask is writable by allocating it.
After this function is called, duckdb_vector_get_validity
will ALWAYS return
non-NULL. This allows NULL values to be written to the vector, regardless of
whether a validity mask was present before.
Parameters:
* vector
: The vector to alter
c_duckdb_vector_assign_string_element :: DuckDBVector -> DuckDBIdx -> CString -> IO () Source #
Assigns a string element in the vector at the specified location.
Parameters:
* vector
: The vector to alter
* index
: The row position in the vector to assign the string to
* str
: The null-terminated string
c_duckdb_vector_assign_string_element_len :: DuckDBVector -> DuckDBIdx -> CString -> DuckDBIdx -> IO () Source #
Assigns a string element in the vector at the specified location. You may also use this function to assign BLOBs.
Parameters:
* vector
: The vector to alter
* index
: The row position in the vector to assign the string to
* str
: The string
* str_len
: The length of the string (in bytes)
c_duckdb_list_vector_get_child :: DuckDBVector -> IO DuckDBVector Source #
Retrieves the child vector of a list vector.
The resulting vector is valid as long as the parent vector is valid.
Parameters:
* vector
: The vector
Returns The child vector
c_duckdb_list_vector_get_size :: DuckDBVector -> IO DuckDBIdx Source #
Returns the size of the child vector of the list.
Parameters:
* vector
: The vector
Returns The size of the child list
c_duckdb_list_vector_set_size :: DuckDBVector -> DuckDBIdx -> IO DuckDBState Source #
Sets the total size of the underlying child-vector of a list vector.
Parameters:
* vector
: The list vector.
* size
: The size of the child list.
Returns The duckdb state. Returns DuckDBError if the vector is nullptr.
c_duckdb_list_vector_reserve :: DuckDBVector -> DuckDBIdx -> IO DuckDBState Source #
Sets the total capacity of the underlying child-vector of a list.
After calling this method, you must call duckdb_vector_get_validity
and
duckdb_vector_get_data
to obtain current data and validity pointers
Parameters:
* vector
: The list vector.
* required_capacity
: the total capacity to reserve.
Returns The duckdb state. Returns DuckDBError if the vector is nullptr.
c_duckdb_struct_vector_get_child :: DuckDBVector -> DuckDBIdx -> IO DuckDBVector Source #
Retrieves the child vector of a struct vector. The resulting vector is valid as long as the parent vector is valid.
Parameters:
* vector
: The vector
* index
: The child index
Returns The child vector
c_duckdb_array_vector_get_child :: DuckDBVector -> IO DuckDBVector Source #
Retrieves the child vector of an array vector. The resulting vector is valid as long as the parent vector is valid. The resulting vector has the size of the parent vector multiplied by the array size.
Parameters:
* vector
: The vector
Returns The child vector
c_duckdb_slice_vector :: DuckDBVector -> DuckDBSelectionVector -> DuckDBIdx -> IO () Source #
Slice a vector with a selection vector. The length of the selection vector must be less than or equal to the length of the vector. Turns the vector into a dictionary vector.
Parameters:
* vector
: The vector to slice.
* sel
: The selection vector.
* len
: The length of the selection vector.
c_duckdb_vector_copy_sel :: DuckDBVector -> DuckDBVector -> DuckDBSelectionVector -> DuckDBIdx -> DuckDBIdx -> DuckDBIdx -> IO () Source #
Copy the src vector to the dst with a selection vector that identifies which indices to copy.
Parameters:
* src
: The vector to copy from.
* dst
: The vector to copy to.
* sel
: The selection vector. The length of the selection vector should not
be more than the length of the src vector
* src_count
: The number of entries from selection vector to copy. Think of
this as the effective length of the selection vector starting from index 0
* src_offset
: The offset in the selection vector to copy from (important:
actual number of items copied = src_count - src_offset).
* dst_offset
: The offset in the dst vector to start copying to.
c_duckdb_vector_reference_value :: DuckDBVector -> DuckDBValue -> IO () Source #
Copies the value from value
to vector
.
Parameters:
* vector
: The receiving vector.
* value
: The value to copy into the vector.
c_duckdb_vector_reference_vector :: DuckDBVector -> DuckDBVector -> IO () Source #
Changes to_vector
to reference `from_vector. After, the vectors share
ownership of the data.
Parameters:
* to_vector
: The receiving vector.
* from_vector
: The vector to reference.
c_duckdb_validity_row_is_valid :: Ptr Word64 -> DuckDBIdx -> IO CBool Source #
Returns whether or not a row is valid (i.e., not NULL) in the given validity mask.
Parameters:
* validity
: The validity mask, as obtained through
duckdb_vector_get_validity
* row
: The row index
Returns true if the row is valid, false otherwise
c_duckdb_validity_set_row_validity :: Ptr Word64 -> DuckDBIdx -> CBool -> IO () Source #
In a validity mask, sets a specific row to either valid or invalid.
Note that duckdb_vector_ensure_validity_writable
should be called before
calling duckdb_vector_get_validity
, to ensure that there is a validity mask
to write to.
Parameters:
* validity
: The validity mask, as obtained through
duckdb_vector_get_validity
.
* row
: The row index
* valid
: Whether or not to set the row to valid, or invalid
c_duckdb_validity_set_row_invalid :: Ptr Word64 -> DuckDBIdx -> IO () Source #
In a validity mask, sets a specific row to invalid.
Equivalent to duckdb_validity_set_row_validity
with valid set to false.
Parameters:
* validity
: The validity mask
* row
: The row index
c_duckdb_validity_set_row_valid :: Ptr Word64 -> DuckDBIdx -> IO () Source #
In a validity mask, sets a specific row to valid.
Equivalent to duckdb_validity_set_row_validity
with valid set to true.
Parameters:
* validity
: The validity mask
* row
: The row index
c_duckdb_create_scalar_function :: IO DuckDBScalarFunction Source #
Creates a new empty scalar function.
The return value must be destroyed with duckdb_destroy_scalar_function
.
Returns The scalar function object.
c_duckdb_destroy_scalar_function :: Ptr DuckDBScalarFunction -> IO () Source #
Destroys the given scalar function object.
Parameters:
* scalar_function
: The scalar function to destroy
c_duckdb_scalar_function_set_name :: DuckDBScalarFunction -> CString -> IO () Source #
Sets the name of the given scalar function.
Parameters:
* scalar_function
: The scalar function
* name
: The name of the scalar function
c_duckdb_scalar_function_set_varargs :: DuckDBScalarFunction -> DuckDBLogicalType -> IO () Source #
Sets the parameters of the given scalar function to varargs. Does not require adding parameters with duckdb_scalar_function_add_parameter.
Parameters:
* scalar_function
: The scalar function.
* type
: The type of the arguments.
Returns The parameter type. Cannot contain INVALID.
c_duckdb_scalar_function_set_special_handling :: DuckDBScalarFunction -> IO () Source #
Sets the scalar function's null-handling behavior to special.
Parameters:
* scalar_function
: The scalar function.
c_duckdb_scalar_function_set_volatile :: DuckDBScalarFunction -> IO () Source #
Sets the Function Stability of the scalar function to VOLATILE, indicating the function should be re-run for every row. This limits optimization that can be performed for the function.
Parameters:
* scalar_function
: The scalar function.
c_duckdb_scalar_function_add_parameter :: DuckDBScalarFunction -> DuckDBLogicalType -> IO () Source #
Adds a parameter to the scalar function.
Parameters:
* scalar_function
: The scalar function.
* type
: The parameter type. Cannot contain INVALID.
c_duckdb_scalar_function_set_return_type :: DuckDBScalarFunction -> DuckDBLogicalType -> IO () Source #
Sets the return type of the scalar function.
Parameters:
* scalar_function
: The scalar function
* type
: Cannot contain INVALID or ANY.
c_duckdb_scalar_function_set_extra_info :: DuckDBScalarFunction -> Ptr () -> DuckDBDeleteCallback -> IO () Source #
Assigns extra information to the scalar function that can be fetched during binding, etc.
Parameters:
* scalar_function
: The scalar function
* extra_info
: The extra information
* destroy
: The callback that will be called to destroy the extra information
(if any)
c_duckdb_scalar_function_set_bind :: DuckDBScalarFunction -> DuckDBScalarFunctionBindFun -> IO () Source #
Sets the (optional) bind function of the scalar function.
Parameters:
* scalar_function
: The scalar function.
* bind
: The bind function.
c_duckdb_scalar_function_set_bind_data :: DuckDBBindInfo -> Ptr () -> DuckDBDeleteCallback -> IO () Source #
Sets the user-provided bind data in the bind object of the scalar function. The bind data object can be retrieved again during execution. In most case, you also need to set the copy-callback of your bind data via duckdb_scalar_function_set_bind_data_copy.
Parameters:
* info
: The bind info of the scalar function.
* bind_data
: The bind data object.
* destroy
: The callback to destroy the bind data (if any).
c_duckdb_scalar_function_set_bind_data_copy :: DuckDBBindInfo -> DuckDBCopyCallback -> IO () Source #
Sets the copy-callback for the user-provided bind data in the bind object of the scalar function.
Parameters:
* info
: The bind info of the scalar function.
* copy
: The callback to copy the bind data (if any).
c_duckdb_scalar_function_bind_set_error :: DuckDBBindInfo -> CString -> IO () Source #
Report that an error has occurred while calling bind on a scalar function.
Parameters:
* info
: The bind info object.
* error
: The error message.
c_duckdb_scalar_function_set_function :: DuckDBScalarFunction -> DuckDBScalarFunctionFun -> IO () Source #
Sets the main function of the scalar function.
Parameters:
* scalar_function
: The scalar function
* function
: The function
c_duckdb_register_scalar_function :: DuckDBConnection -> DuckDBScalarFunction -> IO DuckDBState Source #
Register the scalar function object within the given connection.
The function requires at least a name, a function and a return type.
If the function is incomplete or a function with this name already exists DuckDBError is returned.
Parameters:
* con
: The connection to register it in.
* scalar_function
: The function pointer
Returns Whether or not the registration was successful.
c_duckdb_scalar_function_get_extra_info :: DuckDBFunctionInfo -> IO (Ptr ()) Source #
Retrieves the extra info of the function as set in
duckdb_scalar_function_set_extra_info
.
Parameters:
* info
: The info object.
Returns The extra info.
c_duckdb_scalar_function_bind_get_extra_info :: DuckDBBindInfo -> IO (Ptr ()) Source #
Retrieves the extra info of the function as set in the bind info.
Parameters:
* info
: The info object.
Returns The extra info.
c_duckdb_scalar_function_get_bind_data :: DuckDBFunctionInfo -> IO (Ptr ()) Source #
Gets the scalar function's bind data set by
duckdb_scalar_function_set_bind_data
. Note that the bind data is read-only.
Parameters:
* info
: The function info.
Returns The bind data object.
c_duckdb_scalar_function_get_client_context :: DuckDBBindInfo -> Ptr DuckDBClientContext -> IO () Source #
Retrieves the client context of the bind info of a scalar function.
Parameters:
* info
: The bind info object of the scalar function.
* out_context
: The client context of the bind info. Must be destroyed with
duckdb_destroy_client_context
.
c_duckdb_scalar_function_set_error :: DuckDBFunctionInfo -> CString -> IO () Source #
Report that an error has occurred while executing the scalar function.
Parameters:
* info
: The info object.
* error
: The error message
c_duckdb_create_scalar_function_set :: CString -> IO DuckDBScalarFunctionSet Source #
Creates a new empty scalar function set.
The return value must be destroyed with duckdb_destroy_scalar_function_set
.
Returns The scalar function set object.
c_duckdb_destroy_scalar_function_set :: Ptr DuckDBScalarFunctionSet -> IO () Source #
Destroys the given scalar function set object.
c_duckdb_add_scalar_function_to_set :: DuckDBScalarFunctionSet -> DuckDBScalarFunction -> IO DuckDBState Source #
Adds the scalar function as a new overload to the scalar function set.
Returns DuckDBError if the function could not be added, for example if the overload already exists.
Parameters:
* set
: The scalar function set
* function
: The function to add
c_duckdb_register_scalar_function_set :: DuckDBConnection -> DuckDBScalarFunctionSet -> IO DuckDBState Source #
Register the scalar function set within the given connection.
The set requires at least a single valid overload.
If the set is incomplete or a function with this name already exists DuckDBError is returned.
Parameters:
* con
: The connection to register it in.
* set
: The function set to register
Returns Whether or not the registration was successful.
c_duckdb_scalar_function_bind_get_argument_count :: DuckDBBindInfo -> IO DuckDBIdx Source #
Returns the number of input arguments of the scalar function.
Parameters:
* info
: The bind info.
Returns The number of input arguments.
c_duckdb_scalar_function_bind_get_argument :: DuckDBBindInfo -> DuckDBIdx -> IO DuckDBExpression Source #
Returns the input argument at index of the scalar function.
Parameters:
* info
: The bind info.
* index
: The argument index.
Returns The input argument at index. Must be destroyed with
duckdb_destroy_expression
.
c_duckdb_create_table_function :: IO DuckDBTableFunction Source #
Creates a new empty table function.
The return value should be destroyed with duckdb_destroy_table_function
.
Returns The table function object.
c_duckdb_destroy_table_function :: Ptr DuckDBTableFunction -> IO () Source #
Destroys the given table function object.
Parameters:
* table_function
: The table function to destroy
c_duckdb_table_function_set_name :: DuckDBTableFunction -> CString -> IO () Source #
Sets the name of the given table function.
Parameters:
* table_function
: The table function
* name
: The name of the table function
c_duckdb_table_function_add_parameter :: DuckDBTableFunction -> DuckDBLogicalType -> IO () Source #
Adds a parameter to the table function.
Parameters:
* table_function
: The table function.
* type
: The parameter type. Cannot contain INVALID.
c_duckdb_table_function_add_named_parameter :: DuckDBTableFunction -> CString -> DuckDBLogicalType -> IO () Source #
Adds a named parameter to the table function.
Parameters:
* table_function
: The table function.
* name
: The parameter name.
* type
: The parameter type. Cannot contain INVALID.
c_duckdb_table_function_set_extra_info :: DuckDBTableFunction -> Ptr () -> DuckDBDeleteCallback -> IO () Source #
Assigns extra information to the table function that can be fetched during binding, etc.
Parameters:
* table_function
: The table function
* extra_info
: The extra information
* destroy
: The callback that will be called to destroy the extra information
(if any)
c_duckdb_table_function_set_bind :: DuckDBTableFunction -> DuckDBTableFunctionBindFun -> IO () Source #
Sets the bind function of the table function.
Parameters:
* table_function
: The table function
* bind
: The bind function
c_duckdb_table_function_set_init :: DuckDBTableFunction -> DuckDBTableFunctionInitFun -> IO () Source #
Sets the init function of the table function.
Parameters:
* table_function
: The table function
* init
: The init function
c_duckdb_table_function_set_local_init :: DuckDBTableFunction -> DuckDBTableFunctionInitFun -> IO () Source #
Sets the thread-local init function of the table function.
Parameters:
* table_function
: The table function
* init
: The init function
c_duckdb_table_function_set_function :: DuckDBTableFunction -> DuckDBTableFunctionFun -> IO () Source #
Sets the main function of the table function.
Parameters:
* table_function
: The table function
* function
: The function
c_duckdb_table_function_supports_projection_pushdown :: DuckDBTableFunction -> CBool -> IO () Source #
Sets whether or not the given table function supports projection pushdown.
If this is set to true, the system will provide a list of all required columns
in the init
stage through the duckdb_init_get_column_count
and
duckdb_init_get_column_index
functions. If this is set to false (the
default), the system will expect all columns to be projected.
Parameters:
* table_function
: The table function
* pushdown
: True if the table function supports projection pushdown, false
otherwise.
c_duckdb_register_table_function :: DuckDBConnection -> DuckDBTableFunction -> IO DuckDBState Source #
Register the table function object within the given connection.
The function requires at least a name, a bind function, an init function and a main function.
If the function is incomplete or a function with this name already exists DuckDBError is returned.
Parameters:
* con
: The connection to register it in.
* function
: The function pointer
Returns Whether or not the registration was successful.
c_duckdb_bind_get_extra_info :: DuckDBBindInfo -> IO (Ptr ()) Source #
Retrieves the extra info of the function as set in
duckdb_table_function_set_extra_info
.
Parameters:
* info
: The info object
Returns The extra info
c_duckdb_table_function_get_client_context :: DuckDBBindInfo -> Ptr DuckDBClientContext -> IO () Source #
Retrieves the client context of the bind info of a table function.
Parameters:
* info
: The bind info object of the table function.
* out_context
: The client context of the bind info. Must be destroyed with
duckdb_destroy_client_context
.
c_duckdb_bind_add_result_column :: DuckDBBindInfo -> CString -> DuckDBLogicalType -> IO () Source #
Adds a result column to the output of the table function.
Parameters:
* info
: The table function's bind info.
* name
: The column name.
* type
: The logical column type.
c_duckdb_bind_get_parameter_count :: DuckDBBindInfo -> IO DuckDBIdx Source #
Retrieves the number of regular (non-named) parameters to the function.
Parameters:
* info
: The info object
Returns The number of parameters
c_duckdb_bind_get_parameter :: DuckDBBindInfo -> DuckDBIdx -> IO DuckDBValue Source #
Retrieves the parameter at the given index.
The result must be destroyed with duckdb_destroy_value
.
Parameters:
* info
: The info object
* index
: The index of the parameter to get
Returns The value of the parameter. Must be destroyed with
duckdb_destroy_value
.
c_duckdb_bind_get_named_parameter :: DuckDBBindInfo -> CString -> IO DuckDBValue Source #
Retrieves a named parameter with the given name.
The result must be destroyed with duckdb_destroy_value
.
Parameters:
* info
: The info object
* name
: The name of the parameter
Returns The value of the parameter. Must be destroyed with
duckdb_destroy_value
.
c_duckdb_bind_set_bind_data :: DuckDBBindInfo -> Ptr () -> DuckDBDeleteCallback -> IO () Source #
Sets the user-provided bind data in the bind object of the table function. This object can be retrieved again during execution.
Parameters:
* info
: The bind info of the table function.
* bind_data
: The bind data object.
* destroy
: The callback to destroy the bind data (if any).
c_duckdb_bind_set_cardinality :: DuckDBBindInfo -> DuckDBIdx -> CBool -> IO () Source #
Sets the cardinality estimate for the table function, used for optimization.
Parameters:
* info
: The bind data object.
* is_exact
: Whether or not the cardinality estimate is exact, or an
approximation
c_duckdb_bind_set_error :: DuckDBBindInfo -> CString -> IO () Source #
Report that an error has occurred while calling bind on a table function.
Parameters:
* info
: The info object
* error
: The error message
c_duckdb_init_get_extra_info :: DuckDBInitInfo -> IO (Ptr ()) Source #
Retrieves the extra info of the function as set in
duckdb_table_function_set_extra_info
.
Parameters:
* info
: The info object
Returns The extra info
c_duckdb_init_get_bind_data :: DuckDBInitInfo -> IO (Ptr ()) Source #
Gets the bind data set by duckdb_bind_set_bind_data
during the bind.
Note that the bind data should be considered as read-only. For tracking state, use the init data instead.
Parameters:
* info
: The info object
Returns The bind data object
c_duckdb_init_set_init_data :: DuckDBInitInfo -> Ptr () -> DuckDBDeleteCallback -> IO () Source #
Sets the user-provided init data in the init object. This object can be retrieved again during execution.
Parameters:
* info
: The info object
* init_data
: The init data object.
* destroy
: The callback that will be called to destroy the init data (if
any)
c_duckdb_init_get_column_count :: DuckDBInitInfo -> IO DuckDBIdx Source #
Returns the number of projected columns.
This function must be used if projection pushdown is enabled to figure out which columns to emit.
Parameters:
* info
: The info object
Returns The number of projected columns.
c_duckdb_init_get_column_index :: DuckDBInitInfo -> DuckDBIdx -> IO DuckDBIdx Source #
Returns the column index of the projected column at the specified position.
This function must be used if projection pushdown is enabled to figure out which columns to emit.
Parameters:
* info
: The info object
* column_index
: The index at which to get the projected column index, from
0..duckdb_init_get_column_count(info)
Returns The column index of the projected column.
c_duckdb_init_set_max_threads :: DuckDBInitInfo -> DuckDBIdx -> IO () Source #
Sets how many threads can process this table function in parallel (default: 1)
Parameters:
* info
: The info object
* max_threads
: The maximum amount of threads that can process this table
function
c_duckdb_init_set_error :: DuckDBInitInfo -> CString -> IO () Source #
Report that an error has occurred while calling init.
Parameters:
* info
: The info object
* error
: The error message
c_duckdb_function_get_extra_info :: DuckDBFunctionInfo -> IO (Ptr ()) Source #
Retrieves the extra info of the function as set in
duckdb_table_function_set_extra_info
.
Parameters:
* info
: The info object
Returns The extra info
c_duckdb_function_get_bind_data :: DuckDBFunctionInfo -> IO (Ptr ()) Source #
Gets the table function's bind data set by duckdb_bind_set_bind_data
.
Note that the bind data is read-only. For tracking state, use the init data instead.
Parameters:
* info
: The function info object.
Returns The bind data object.
c_duckdb_function_get_init_data :: DuckDBFunctionInfo -> IO (Ptr ()) Source #
Gets the init data set by duckdb_init_set_init_data
during the init.
Parameters:
* info
: The info object
Returns The init data object
c_duckdb_function_get_local_init_data :: DuckDBFunctionInfo -> IO (Ptr ()) Source #
Gets the thread-local init data set by duckdb_init_set_init_data
during the
local_init.
Parameters:
* info
: The info object
Returns The init data object
c_duckdb_function_set_error :: DuckDBFunctionInfo -> CString -> IO () Source #
Report that an error has occurred while executing the function.
Parameters:
* info
: The info object
* error
: The error message
c_duckdb_create_selection_vector :: DuckDBIdx -> IO DuckDBSelectionVector Source #
Creates a new selection vector of size size
. Must be destroyed with
duckdb_destroy_selection_vector
.
Parameters:
* size
: The size of the selection vector.
Returns The selection vector.
c_duckdb_destroy_selection_vector :: DuckDBSelectionVector -> IO () Source #
Destroys the selection vector and de-allocates its memory.
Parameters:
* sel
: The selection vector.
c_duckdb_selection_vector_get_data_ptr :: DuckDBSelectionVector -> IO (Ptr DuckDBSel) Source #
Access the data pointer of a selection vector.
Parameters:
* sel
: The selection vector.
Returns The data pointer.
c_duckdb_create_aggregate_function :: IO DuckDBAggregateFunction Source #
Creates a new empty aggregate function.
The return value should be destroyed with duckdb_destroy_aggregate_function
.
Returns The aggregate function object.
c_duckdb_destroy_aggregate_function :: Ptr DuckDBAggregateFunction -> IO () Source #
Destroys the given aggregate function object.
c_duckdb_aggregate_function_set_name :: DuckDBAggregateFunction -> CString -> IO () Source #
Sets the name of the given aggregate function.
Parameters:
* aggregate_function
: The aggregate function
* name
: The name of the aggregate function
c_duckdb_aggregate_function_add_parameter :: DuckDBAggregateFunction -> DuckDBLogicalType -> IO () Source #
Adds a parameter to the aggregate function.
Parameters:
* aggregate_function
: The aggregate function.
* type
: The parameter type. Cannot contain INVALID.
c_duckdb_aggregate_function_set_return_type :: DuckDBAggregateFunction -> DuckDBLogicalType -> IO () Source #
Sets the return type of the aggregate function.
Parameters:
* aggregate_function
: The aggregate function.
* type
: The return type. Cannot contain INVALID or ANY.
c_duckdb_aggregate_function_set_functions :: DuckDBAggregateFunction -> DuckDBAggregateStateSizeFun -> DuckDBAggregateInitFun -> DuckDBAggregateUpdateFun -> DuckDBAggregateCombineFun -> DuckDBAggregateFinalizeFun -> IO () Source #
Sets the main functions of the aggregate function.
Parameters:
* aggregate_function
: The aggregate function
* state_size
: state size
* state_init
: state init function
* update
: update states
* combine
: combine states
* finalize
: finalize states
c_duckdb_aggregate_function_set_destructor :: DuckDBAggregateFunction -> DuckDBAggregateDestroyFun -> IO () Source #
Sets the state destructor callback of the aggregate function (optional)
Parameters:
* aggregate_function
: The aggregate function
* destroy
: state destroy callback
c_duckdb_register_aggregate_function :: DuckDBConnection -> DuckDBAggregateFunction -> IO DuckDBState Source #
Register the aggregate function object within the given connection.
The function requires at least a name, functions and a return type.
If the function is incomplete or a function with this name already exists DuckDBError is returned.
Parameters:
* con
: The connection to register it in.
Returns Whether or not the registration was successful.
c_duckdb_aggregate_function_set_special_handling :: DuckDBAggregateFunction -> IO () Source #
Sets the NULL handling of the aggregate function to SPECIAL_HANDLING.
Parameters:
* aggregate_function
: The aggregate function
c_duckdb_aggregate_function_set_extra_info :: DuckDBAggregateFunction -> Ptr () -> DuckDBDeleteCallback -> IO () Source #
Assigns extra information to the scalar function that can be fetched during binding, etc.
Parameters:
* aggregate_function
: The aggregate function
* extra_info
: The extra information
* destroy
: The callback that will be called to destroy the extra information
(if any)
c_duckdb_aggregate_function_get_extra_info :: DuckDBFunctionInfo -> IO (Ptr ()) Source #
Retrieves the extra info of the function as set in
duckdb_aggregate_function_set_extra_info
.
Parameters:
* info
: The info object
Returns The extra info
c_duckdb_aggregate_function_set_error :: DuckDBFunctionInfo -> CString -> IO () Source #
Report that an error has occurred while executing the aggregate function.
Parameters:
* info
: The info object
* error
: The error message
c_duckdb_create_aggregate_function_set :: CString -> IO DuckDBAggregateFunctionSet Source #
Creates a new empty aggregate function set.
The return value should be destroyed with
duckdb_destroy_aggregate_function_set
.
Returns The aggregate function set object.
c_duckdb_destroy_aggregate_function_set :: Ptr DuckDBAggregateFunctionSet -> IO () Source #
Destroys the given aggregate function set object.
c_duckdb_add_aggregate_function_to_set :: DuckDBAggregateFunctionSet -> DuckDBAggregateFunction -> IO DuckDBState Source #
Adds the aggregate function as a new overload to the aggregate function set.
Returns DuckDBError if the function could not be added, for example if the overload already exists.
Parameters:
* set
: The aggregate function set
* function
: The function to add
c_duckdb_register_aggregate_function_set :: DuckDBConnection -> DuckDBAggregateFunctionSet -> IO DuckDBState Source #
Register the aggregate function set within the given connection.
The set requires at least a single valid overload.
If the set is incomplete or a function with this name already exists DuckDBError is returned.
Parameters:
* con
: The connection to register it in.
* set
: The function set to register
Returns Whether or not the registration was successful.
c_duckdb_add_replacement_scan :: DuckDBDatabase -> DuckDBReplacementCallback -> Ptr () -> DuckDBDeleteCallback -> IO () Source #
Add a replacement scan definition to the specified database.
Parameters:
* db
: The database object to add the replacement scan to
* replacement
: The replacement scan callback
* extra_data
: Extra data that is passed back into the specified callback
* delete_callback
: The delete callback to call on the extra data, if any
c_duckdb_replacement_scan_set_function_name :: DuckDBReplacementScanInfo -> CString -> IO () Source #
Sets the replacement function name. If this function is called in the replacement callback, the replacement scan is performed. If it is not called, the replacement callback is not performed.
Parameters:
* info
: The info object
* function_name
: The function name to substitute.
c_duckdb_replacement_scan_add_parameter :: DuckDBReplacementScanInfo -> DuckDBValue -> IO () Source #
Adds a parameter to the replacement scan function.
Parameters:
* info
: The info object
* parameter
: The parameter to add.
c_duckdb_replacement_scan_set_error :: DuckDBReplacementScanInfo -> CString -> IO () Source #
Report that an error has occurred while executing the replacement scan.
Parameters:
* info
: The info object
* error
: The error message
c_duckdb_get_profiling_info :: DuckDBConnection -> IO DuckDBProfilingInfo Source #
Returns the root node of the profiling information. Returns nullptr, if profiling is not enabled.
Parameters:
* connection
: A connection object.
Returns A profiling information object.
c_duckdb_profiling_info_get_value :: DuckDBProfilingInfo -> CString -> IO DuckDBValue Source #
Returns the value of the metric of the current profiling info node. Returns nullptr, if the metric does not exist or is not enabled. Currently, the value holds a string, and you can retrieve the string by calling the corresponding function: char *duckdb_get_varchar(duckdb_value value).
Parameters:
* info
: A profiling information object.
* key
: The name of the requested metric.
Returns The value of the metric. Must be freed with duckdb_destroy_value
c_duckdb_profiling_info_get_metrics :: DuckDBProfilingInfo -> IO DuckDBValue Source #
Returns the key-value metric map of this profiling node as a MAP duckdb_value. The individual elements are accessible via the duckdb_value MAP functions.
Parameters:
* info
: A profiling information object.
Returns The key-value metric map as a MAP duckdb_value.
c_duckdb_profiling_info_get_child_count :: DuckDBProfilingInfo -> IO DuckDBIdx Source #
Returns the number of children in the current profiling info node.
Parameters:
* info
: A profiling information object.
Returns The number of children in the current node.
c_duckdb_profiling_info_get_child :: DuckDBProfilingInfo -> DuckDBIdx -> IO DuckDBProfilingInfo Source #
Returns the child node at the specified index.
Parameters:
* info
: A profiling information object.
* index
: The index of the child node.
Returns The child node at the specified index.
c_duckdb_appender_create :: DuckDBConnection -> CString -> CString -> Ptr DuckDBAppender -> IO DuckDBState Source #
Creates an appender object.
Note that the object must be destroyed with duckdb_appender_destroy
.
Parameters:
* connection
: The connection context to create the appender in.
* schema
: The schema of the table to append to, or nullptr
for the default
schema.
* table
: The table name to append to.
* out_appender
: The resulting appender object.
Returns DuckDBSuccess
on success or DuckDBError
on failure.
c_duckdb_appender_create_ext :: DuckDBConnection -> CString -> CString -> CString -> Ptr DuckDBAppender -> IO DuckDBState Source #
Creates an appender object.
Note that the object must be destroyed with duckdb_appender_destroy
.
Parameters:
* connection
: The connection context to create the appender in.
* catalog
: The catalog of the table to append to, or nullptr
for the
default catalog.
* schema
: The schema of the table to append to, or nullptr
for the default
schema.
* table
: The table name to append to.
* out_appender
: The resulting appender object.
Returns DuckDBSuccess
on success or DuckDBError
on failure.
c_duckdb_appender_create_query :: DuckDBConnection -> CString -> DuckDBIdx -> Ptr DuckDBLogicalType -> CString -> Ptr CString -> Ptr DuckDBAppender -> IO DuckDBState Source #
Creates an appender object that executes the given query with any data appended to it.
Note that the object must be destroyed with duckdb_appender_destroy
.
Parameters:
* connection
: The connection context to create the appender in.
* query
: The query to execute, can be an INSERT, DELETE, UPDATE or MERGE
INTO statement.
* column_count
: The number of columns to append.
* types
: The types of the columns to append.
* table_name
: (optionally) the table name used to refer to the appended
data, defaults to "appended_data".
* column_names
: (optionally) the list of column names, defaults to "col1",
"col2", ...
* out_appender
: The resulting appender object.
Returns DuckDBSuccess
on success or DuckDBError
on failure.
c_duckdb_appender_column_count :: DuckDBAppender -> IO DuckDBIdx Source #
Returns the number of columns that belong to the appender. If there is no active column list, then this equals the table's physical columns.
Parameters:
* appender
: The appender to get the column count from.
Returns The number of columns in the data chunks.
c_duckdb_appender_column_type :: DuckDBAppender -> DuckDBIdx -> IO DuckDBLogicalType Source #
Returns the type of the column at the specified index. This is either a type in the active column list, or the same type as a column in the receiving table.
Note: The resulting type must be destroyed with duckdb_destroy_logical_type
.
Parameters:
* appender
: The appender to get the column type from.
* col_idx
: The index of the column to get the type of.
Returns The duckdb_logical_type
of the column.
c_duckdb_appender_error :: DuckDBAppender -> IO CString Source #
Warning Deprecation notice. This method is scheduled for removal in a future
release. Use duckdb_appender_error_data instead.
Returns the error message associated with the appender. If the appender has no
error message, this returns nullptr
instead.
The error message should not be freed. It will be de-allocated when
duckdb_appender_destroy
is called.
Parameters:
* appender
: The appender to get the error from.
Returns The error message, or nullptr
if there is none.
c_duckdb_appender_error_data :: DuckDBAppender -> IO DuckDBErrorData Source #
Returns the error data associated with the appender. Must be destroyed with duckdb_destroy_error_data.
Parameters:
* appender
: The appender to get the error data from.
Returns The error data.
c_duckdb_appender_flush :: DuckDBAppender -> IO DuckDBState Source #
Flush the appender to the table, forcing the cache of the appender to be cleared. If flushing the data triggers a constraint violation or any other error, then all data is invalidated, and this function returns DuckDBError. It is not possible to append more values. Call duckdb_appender_error_data to obtain the error data followed by duckdb_appender_destroy to destroy the invalidated appender.
Parameters:
* appender
: The appender to flush.
Returns DuckDBSuccess
on success or DuckDBError
on failure.
c_duckdb_appender_close :: DuckDBAppender -> IO DuckDBState Source #
Closes the appender by flushing all intermediate states and closing it for further appends. If flushing the data triggers a constraint violation or any other error, then all data is invalidated, and this function returns DuckDBError. Call duckdb_appender_error_data to obtain the error data followed by duckdb_appender_destroy to destroy the invalidated appender.
Parameters:
* appender
: The appender to flush and close.
Returns DuckDBSuccess
on success or DuckDBError
on failure.
c_duckdb_appender_destroy :: Ptr DuckDBAppender -> IO DuckDBState Source #
Closes the appender by flushing all intermediate states to the table and destroying it. By destroying it, this function de-allocates all memory associated with the appender. If flushing the data triggers a constraint violation, then all data is invalidated, and this function returns DuckDBError. Due to the destruction of the appender, it is no longer possible to obtain the specific error message with duckdb_appender_error. Therefore, call duckdb_appender_close before destroying the appender, if you need insights into the specific error.
Parameters:
* appender
: The appender to flush, close and destroy.
Returns DuckDBSuccess
on success or DuckDBError
on failure.
c_duckdb_appender_add_column :: DuckDBAppender -> CString -> IO DuckDBState Source #
Appends a column to the active column list of the appender. Immediately flushes all previous data.
The active column list specifies all columns that are expected when flushing the data. Any non-active columns are filled with their default values, or NULL.
Parameters:
* appender
: The appender to add the column to.
Returns DuckDBSuccess
on success or DuckDBError
on failure.
c_duckdb_appender_clear_columns :: DuckDBAppender -> IO DuckDBState Source #
Removes all columns from the active column list of the appender, resetting the appender to treat all columns as active. Immediately flushes all previous data.
Parameters:
* appender
: The appender to clear the columns from.
Returns DuckDBSuccess
on success or DuckDBError
on failure.
c_duckdb_appender_begin_row :: DuckDBAppender -> IO DuckDBState Source #
A nop function, provided for backwards compatibility reasons. Does nothing.
Only duckdb_appender_end_row
is required.
c_duckdb_appender_end_row :: DuckDBAppender -> IO DuckDBState Source #
Finish the current row of appends. After end_row is called, the next row can be appended.
Parameters:
* appender
: The appender.
Returns DuckDBSuccess
on success or DuckDBError
on failure.
c_duckdb_append_default :: DuckDBAppender -> IO DuckDBState Source #
Append a DEFAULT value (NULL if DEFAULT not available for column) to the appender.
c_duckdb_append_default_to_chunk :: DuckDBAppender -> DuckDBDataChunk -> DuckDBIdx -> DuckDBIdx -> IO DuckDBState Source #
Append a DEFAULT value, at the specified row and column, (NULL if DEFAULT not
available for column) to the chunk created from the specified appender. The
default value of the column must be a constant value. Non-deterministic
expressions like nextval(seq
) or random() are not supported.
Parameters:
* appender
: The appender to get the default value from.
* chunk
: The data chunk to append the default value to.
* col
: The chunk column index to append the default value to.
* row
: The chunk row index to append the default value to.
Returns DuckDBSuccess
on success or DuckDBError
on failure.
c_duckdb_append_bool :: DuckDBAppender -> CBool -> IO DuckDBState Source #
Append a bool value to the appender.
c_duckdb_append_int8 :: DuckDBAppender -> Int8 -> IO DuckDBState Source #
Append an int8_t value to the appender.
c_duckdb_append_int16 :: DuckDBAppender -> Int16 -> IO DuckDBState Source #
Append an int16_t value to the appender.
c_duckdb_append_int32 :: DuckDBAppender -> Int32 -> IO DuckDBState Source #
Append an int32_t value to the appender.
c_duckdb_append_int64 :: DuckDBAppender -> Int64 -> IO DuckDBState Source #
Append an int64_t value to the appender.
c_duckdb_append_hugeint :: DuckDBAppender -> Ptr DuckDBHugeInt -> IO DuckDBState Source #
Append a duckdb_hugeint value to the appender.
These bindings call the wrapper symbol wrapped_duckdb_append_hugeint
but mirror the DuckDB C API semantics of duckdb_append_hugeint
.
c_duckdb_append_uint8 :: DuckDBAppender -> Word8 -> IO DuckDBState Source #
Append a uint8_t value to the appender.
c_duckdb_append_uint16 :: DuckDBAppender -> Word16 -> IO DuckDBState Source #
Append a uint16_t value to the appender.
c_duckdb_append_uint32 :: DuckDBAppender -> Word32 -> IO DuckDBState Source #
Append a uint32_t value to the appender.
c_duckdb_append_uint64 :: DuckDBAppender -> Word64 -> IO DuckDBState Source #
Append a uint64_t value to the appender.
c_duckdb_append_uhugeint :: DuckDBAppender -> Ptr DuckDBUHugeInt -> IO DuckDBState Source #
Append a duckdb_uhugeint value to the appender.
These bindings call the wrapper symbol wrapped_duckdb_append_uhugeint
but mirror the DuckDB C API semantics of duckdb_append_uhugeint
.
c_duckdb_append_float :: DuckDBAppender -> CFloat -> IO DuckDBState Source #
Append a float value to the appender.
c_duckdb_append_double :: DuckDBAppender -> CDouble -> IO DuckDBState Source #
Append a double value to the appender.
c_duckdb_append_date :: DuckDBAppender -> DuckDBDate -> IO DuckDBState Source #
Append a duckdb_date value to the appender.
c_duckdb_append_time :: DuckDBAppender -> DuckDBTime -> IO DuckDBState Source #
Append a duckdb_time value to the appender.
c_duckdb_append_timestamp :: DuckDBAppender -> DuckDBTimestamp -> IO DuckDBState Source #
Append a duckdb_timestamp value to the appender.
c_duckdb_append_interval :: DuckDBAppender -> Ptr DuckDBInterval -> IO DuckDBState Source #
Append a duckdb_interval value to the appender.
These bindings call the wrapper symbol wrapped_duckdb_append_interval
but mirror the DuckDB C API semantics of duckdb_append_interval
.
c_duckdb_append_varchar :: DuckDBAppender -> CString -> IO DuckDBState Source #
Append a varchar value to the appender.
c_duckdb_append_varchar_length :: DuckDBAppender -> CString -> DuckDBIdx -> IO DuckDBState Source #
Append a varchar value to the appender.
c_duckdb_append_blob :: DuckDBAppender -> Ptr () -> DuckDBIdx -> IO DuckDBState Source #
Append a blob value to the appender.
c_duckdb_append_null :: DuckDBAppender -> IO DuckDBState Source #
Append a NULL value to the appender (of any type).
c_duckdb_append_value :: DuckDBAppender -> DuckDBValue -> IO DuckDBState Source #
Append a duckdb_value to the appender.
c_duckdb_append_data_chunk :: DuckDBAppender -> DuckDBDataChunk -> IO DuckDBState Source #
Appends a pre-filled data chunk to the specified appender. Attempts casting, if the data chunk types do not match the active appender types.
Parameters:
* appender
: The appender to append to.
* chunk
: The data chunk to append.
Returns DuckDBSuccess
on success or DuckDBError
on failure.
c_duckdb_table_description_create :: DuckDBConnection -> CString -> CString -> Ptr DuckDBTableDescription -> IO DuckDBState Source #
Creates a table description object. Note that
duckdb_table_description_destroy
should always be called on the resulting
table_description, even if the function returns DuckDBError
.
Parameters:
* connection
: The connection context.
* schema
: The schema of the table, or nullptr
for the default schema.
* table
: The table name.
* out
: The resulting table description object.
Returns DuckDBSuccess
on success or DuckDBError
on failure.
c_duckdb_table_description_create_ext :: DuckDBConnection -> CString -> CString -> CString -> Ptr DuckDBTableDescription -> IO DuckDBState Source #
Creates a table description object. Note that
duckdb_table_description_destroy
must be called on the resulting
table_description, even if the function returns DuckDBError
.
Parameters:
* connection
: The connection context.
* catalog
: The catalog (database) name of the table, or nullptr
for the
default catalog.
* schema
: The schema of the table, or nullptr
for the default schema.
* table
: The table name.
* out
: The resulting table description object.
Returns DuckDBSuccess
on success or DuckDBError
on failure.
c_duckdb_table_description_destroy :: Ptr DuckDBTableDescription -> IO () Source #
Destroy the TableDescription object.
Parameters:
* table_description
: The table_description to destroy.
c_duckdb_table_description_error :: DuckDBTableDescription -> IO CString Source #
Returns the error message associated with the given table_description. If the
table_description has no error message, this returns nullptr
instead. The
error message should not be freed. It will be de-allocated when
duckdb_table_description_destroy
is called.
Parameters:
* table_description
: The table_description to get the error from.
Returns The error message, or nullptr
if there is none.
c_duckdb_column_has_default :: DuckDBTableDescription -> DuckDBIdx -> Ptr CBool -> IO DuckDBState Source #
Check if the column at index
index of the table has a DEFAULT expression.
Parameters:
* table_description
: The table_description to query.
* index
: The index of the column to query.
* out
: The out-parameter used to store the result.
Returns DuckDBSuccess
on success or DuckDBError
on failure.
c_duckdb_table_description_get_column_name :: DuckDBTableDescription -> DuckDBIdx -> IO CString Source #
Obtain the column name at index
. The out result must be destroyed with
duckdb_free
.
Parameters:
* table_description
: The table_description to query.
* index
: The index of the column to query.
Returns The column name.
c_duckdb_to_arrow_schema :: DuckDBArrowOptions -> Ptr DuckDBLogicalType -> Ptr CString -> DuckDBIdx -> Ptr ArrowSchema -> IO DuckDBErrorData Source #
Transforms a DuckDB Schema into an Arrow Schema
Parameters:
* arrow_options
: The Arrow settings used to produce arrow.
* types
: The DuckDB logical types for each column in the schema.
* names
: The names for each column in the schema.
* column_count
: The number of columns that exist in the schema.
* out_schema
: The resulting arrow schema. Must be destroyed with
out_schema->release(out_schema)
.
Returns The error data. Must be destroyed with duckdb_destroy_error_data
.
c_duckdb_data_chunk_to_arrow :: DuckDBArrowOptions -> DuckDBDataChunk -> Ptr ArrowArray -> IO DuckDBErrorData Source #
Transforms a DuckDB data chunk into an Arrow array.
Parameters:
* arrow_options
: The Arrow settings used to produce arrow.
* chunk
: The DuckDB data chunk to convert.
* out_arrow_array
: The output Arrow structure that will hold the converted
data. Must be released with out_arrow_array->release(out_arrow_array)
Returns The error data. Must be destroyed with duckdb_destroy_error_data
.
c_duckdb_schema_from_arrow :: DuckDBConnection -> Ptr ArrowSchema -> Ptr DuckDBArrowConvertedSchema -> IO DuckDBErrorData Source #
Transforms an Arrow Schema into a DuckDB Schema.
Parameters:
* connection
: The connection to get the transformation settings from.
* schema
: The input Arrow schema. Must be released with
schema->release(schema)
.
* out_types
: The Arrow converted schema with extra information about the
arrow types. Must be destroyed with duckdb_destroy_arrow_converted_schema
.
Returns The error data. Must be destroyed with duckdb_destroy_error_data
.
c_duckdb_data_chunk_from_arrow :: DuckDBConnection -> Ptr ArrowArray -> DuckDBArrowConvertedSchema -> Ptr DuckDBDataChunk -> IO DuckDBErrorData Source #
Transforms an Arrow array into a DuckDB data chunk. The data chunk will retain ownership of the underlying Arrow data.
Parameters:
* connection
: The connection to get the transformation settings from.
* arrow_array
: The input Arrow array. Data ownership is passed on to
DuckDB's DataChunk, the underlying object does not need to be released and
won't have ownership of the data.
* converted_schema
: The Arrow converted schema with extra information about
the arrow types.
* out_chunk
: The resulting DuckDB data chunk. Must be destroyed by
duckdb_destroy_data_chunk.
Returns The error data. Must be destroyed with duckdb_destroy_error_data
.
c_duckdb_destroy_arrow_converted_schema :: Ptr DuckDBArrowConvertedSchema -> IO () Source #
Destroys the arrow converted schema and de-allocates all memory allocated for that arrow converted schema.
Parameters:
* arrow_converted_schema
: The arrow converted schema to destroy.
c_duckdb_query_arrow :: DuckDBConnection -> CString -> Ptr DuckDBArrow -> IO DuckDBState Source #
Warning Deprecation notice. This method is scheduled for removal in a future
release.
Executes a SQL query within a connection and stores the full (materialized)
result in an arrow structure. If the query fails to execute, DuckDBError is
returned and the error message can be retrieved by calling
duckdb_query_arrow_error
.
Note that after running duckdb_query_arrow
, duckdb_destroy_arrow
must be
called on the result object even if the query fails, otherwise the error
stored within the result will not be freed correctly.
Parameters:
* connection
: The connection to perform the query in.
* query
: The SQL query to run.
* out_result
: The query result.
Returns DuckDBSuccess
on success or DuckDBError
on failure.
c_duckdb_query_arrow_schema :: DuckDBArrow -> Ptr DuckDBArrowSchema -> IO DuckDBState Source #
Warning Deprecation notice. This method is scheduled for removal in a future
release.
Fetch the internal arrow schema from the arrow result. Remember to call release on the respective ArrowSchema object.
Parameters:
* result
: The result to fetch the schema from.
* out_schema
: The output schema.
Returns DuckDBSuccess
on success or DuckDBError
on failure.
c_duckdb_prepared_arrow_schema :: DuckDBPreparedStatement -> Ptr DuckDBArrowSchema -> IO DuckDBState Source #
Warning Deprecation notice. This method is scheduled for removal in a future
release.
Fetch the internal arrow schema from the prepared statement. Remember to call release on the respective ArrowSchema object.
Parameters:
* prepared
: The prepared statement to fetch the schema from.
* out_schema
: The output schema.
Returns DuckDBSuccess
on success or DuckDBError
on failure.
c_duckdb_result_arrow_array :: Ptr DuckDBResult -> DuckDBDataChunk -> Ptr DuckDBArrowArray -> IO () Source #
Warning Deprecation notice. This method is scheduled for removal in a future
release.
Convert a data chunk into an arrow struct array. Remember to call release on the respective ArrowArray object.
Parameters:
* result
: The result object the data chunk have been fetched from.
* chunk
: The data chunk to convert.
* out_array
: The output array.
These bindings call the wrapper symbol
wrapped_duckdb_result_arrow_array
but mirror the DuckDB C API semantics of
duckdb_result_arrow_array
.
c_duckdb_query_arrow_array :: DuckDBArrow -> Ptr DuckDBArrowArray -> IO DuckDBState Source #
Warning Deprecation notice. This method is scheduled for removal in a future
release.
Fetch an internal arrow struct array from the arrow result. Remember to call release on the respective ArrowArray object.
This function can be called multiple time to get next chunks, which will free the previous out_array. So consume the out_array before calling this function again.
Parameters:
* result
: The result to fetch the array from.
* out_array
: The output array.
Returns DuckDBSuccess
on success or DuckDBError
on failure.
c_duckdb_arrow_column_count :: DuckDBArrow -> IO DuckDBIdx Source #
Warning Deprecation notice. This method is scheduled for removal in a future
release.
Returns the number of columns present in the arrow result object.
Parameters:
* result
: The result object.
Returns The number of columns present in the result object.
c_duckdb_arrow_row_count :: DuckDBArrow -> IO DuckDBIdx Source #
Warning Deprecation notice. This method is scheduled for removal in a future
release.
Returns the number of rows present in the arrow result object.
Parameters:
* result
: The result object.
Returns The number of rows present in the result object.
c_duckdb_arrow_rows_changed :: DuckDBArrow -> IO DuckDBIdx Source #
Warning Deprecation notice. This method is scheduled for removal in a future
release.
Returns the number of rows changed by the query stored in the arrow result. This is relevant only for INSERTUPDATEDELETE queries. For other queries the rows_changed will be 0.
Parameters:
* result
: The result object.
Returns The number of rows changed.
c_duckdb_query_arrow_error :: DuckDBArrow -> IO CString Source #
Warning Deprecation notice. This method is scheduled for removal in a future
release.
Returns the error message contained within the result. The error is only set
if duckdb_query_arrow
returns DuckDBError
.
The error message should not be freed. It will be de-allocated when
duckdb_destroy_arrow
is called.
Parameters:
* result
: The result object to fetch the error from.
Returns The error of the result.
c_duckdb_destroy_arrow :: Ptr DuckDBArrow -> IO () Source #
Warning Deprecation notice. This method is scheduled for removal in a future
release.
Closes the result and de-allocates all memory allocated for the arrow result.
Parameters:
* result
: The result to destroy.
c_duckdb_destroy_arrow_stream :: Ptr DuckDBArrowStream -> IO () Source #
Warning Deprecation notice. This method is scheduled for removal in a future
release.
Releases the arrow array stream and de-allocates its memory.
Parameters:
* stream_p
: The arrow array stream to destroy.
c_duckdb_execute_prepared_arrow :: DuckDBPreparedStatement -> Ptr DuckDBArrow -> IO DuckDBState Source #
Warning Deprecation notice. This method is scheduled for removal in a future
release.
Executes the prepared statement with the given bound parameters, and returns
an arrow query result. Note that after running
duckdb_execute_prepared_arrow
, duckdb_destroy_arrow
must be called on the
result object.
Parameters:
* prepared_statement
: The prepared statement to execute.
* out_result
: The query result.
Returns DuckDBSuccess
on success or DuckDBError
on failure.
c_duckdb_arrow_scan :: DuckDBConnection -> CString -> DuckDBArrowStream -> IO DuckDBState Source #
Warning Deprecation notice. This method is scheduled for removal in a future
release.
Scans the Arrow stream and creates a view with the given name.
Parameters:
* connection
: The connection on which to execute the scan.
* table_name
: Name of the temporary view to create.
* arrow
: Arrow stream wrapper.
Returns DuckDBSuccess
on success or DuckDBError
on failure.
c_duckdb_arrow_array_scan :: DuckDBConnection -> CString -> DuckDBArrowSchema -> DuckDBArrowArray -> Ptr DuckDBArrowStream -> IO DuckDBState Source #
Warning Deprecation notice. This method is scheduled for removal in a future
release.
Scans the Arrow array and creates a view with the given name. Note that after
running duckdb_arrow_array_scan
, duckdb_destroy_arrow_stream
must be
called on the out stream.
Parameters:
* connection
: The connection on which to execute the scan.
* table_name
: Name of the temporary view to create.
* arrow_schema
: Arrow schema wrapper.
* arrow_array
: Arrow array wrapper.
* out_stream
: Output array stream that wraps around the passed schema, for
releasing/deleting once done.
Returns DuckDBSuccess
on success or DuckDBError
on failure.
duckdbArrowSchemaInternal :: DuckDBArrowSchema -> IO (Maybe ArrowSchemaPtr) Source #
Read the internal_ptr
field of a deprecated Arrow schema wrapper.
Returns Nothing
when the wrapper is null or DuckDB has already cleared the
pointer.
duckdbArrowSchemaClear :: DuckDBArrowSchema -> IO () Source #
Clear the internal_ptr
field on a deprecated Arrow schema wrapper.
Useful after copying the schema to application-managed storage.
duckdbArrowArrayInternal :: DuckDBArrowArray -> IO (Maybe ArrowArrayPtr) Source #
Read the internal_ptr
field of a deprecated Arrow array wrapper.
Returns Nothing
when the wrapper is null or the internal pointer has been
cleared by DuckDB.
duckdbArrowArrayClear :: DuckDBArrowArray -> IO () Source #
Clear the internal_ptr
field on a deprecated Arrow array wrapper.
After this call DuckDB treats the wrapper as null.
duckdbArrowStreamInternal :: DuckDBArrowStream -> IO (Maybe ArrowStreamPtr) Source #
Read the internal_ptr
field of a deprecated Arrow stream wrapper.
Returns Nothing
when the wrapper is null or the stream has already been
released.
duckdbArrowStreamClear :: DuckDBArrowStream -> IO () Source #
Clear the internal_ptr
field on a deprecated Arrow stream wrapper.
Use this after consuming the stream via duckdb_arrow_scan
to avoid stale
pointers on the DuckDB side.
c_duckdb_execute_tasks :: DuckDBDatabase -> DuckDBIdx -> IO () Source #
Execute DuckDB tasks on this thread.
Will return after max_tasks
have been executed, or if there are no more
tasks present.
Parameters:
* database
: The database object to execute tasks for
* max_tasks
: The maximum amount of tasks to execute
c_duckdb_create_task_state :: DuckDBDatabase -> IO DuckDBTaskState Source #
Creates a task state that can be used with duckdb_execute_tasks_state to
execute tasks until duckdb_finish_execution
is called on the state.
duckdb_destroy_state
must be called on the result.
Parameters:
* database
: The database object to create the task state for
Returns The task state that can be used with duckdb_execute_tasks_state.
c_duckdb_execute_tasks_state :: DuckDBTaskState -> IO () Source #
Execute DuckDB tasks on this thread.
The thread will keep on executing tasks forever, until duckdb_finish_execution is called on the state. Multiple threads can share the same duckdb_task_state.
Parameters:
* state
: The task state of the executor
c_duckdb_execute_n_tasks_state :: DuckDBTaskState -> DuckDBIdx -> IO DuckDBIdx Source #
Execute DuckDB tasks on this thread.
The thread will keep on executing tasks until either duckdb_finish_execution is called on the state, max_tasks tasks have been executed or there are no more tasks to be executed.
Multiple threads can share the same duckdb_task_state.
Parameters:
* state
: The task state of the executor
* max_tasks
: The maximum amount of tasks to execute
Returns The amount of tasks that have actually been executed
c_duckdb_finish_execution :: DuckDBTaskState -> IO () Source #
Finish execution on a specific task.
Parameters:
* state
: The task state to finish execution
c_duckdb_task_state_is_finished :: DuckDBTaskState -> IO CBool Source #
Check if the provided duckdb_task_state has finished execution
Parameters:
* state
: The task state to inspect
Returns Whether or not duckdb_finish_execution has been called on the task state
c_duckdb_destroy_task_state :: DuckDBTaskState -> IO () Source #
Destroys the task state returned from duckdb_create_task_state.
Note that this should not be called while there is an active duckdb_execute_tasks_state running on the task state.
Parameters:
* state
: The task state to clean up
c_duckdb_execution_is_finished :: DuckDBConnection -> IO CBool Source #
Returns true if the execution of the current query is finished.
Parameters:
* con
: The connection on which to check
c_duckdb_stream_fetch_chunk :: Ptr DuckDBResult -> IO DuckDBDataChunk Source #
Warning Deprecation notice. This method is scheduled for removal in a future
release.
Fetches a data chunk from the (streaming) duckdb_result. This function should be called repeatedly until the result is exhausted.
The result must be destroyed with duckdb_destroy_data_chunk
.
This function can only be used on duckdb_results created with
duckdb_pending_prepared_streaming
If this function is used, none of the other result functions can be used and vice versa (i.e., this function cannot be mixed with the legacy result functions or the materialized result functions).
It is not known beforehand how many chunks will be returned by this result.
Parameters:
* result
: The result object to fetch the data chunk from.
Returns The resulting data chunk. Returns NULL
if the result has an error.
These bindings call the wrapper symbol
wrapped_duckdb_stream_fetch_chunk
but mirror the DuckDB C API semantics of
duckdb_stream_fetch_chunk
.
c_duckdb_fetch_chunk :: Ptr DuckDBResult -> IO DuckDBDataChunk Source #
Fetches a data chunk from a duckdb_result. This function should be called repeatedly until the result is exhausted.
The result must be destroyed with duckdb_destroy_data_chunk
.
It is not known beforehand how many chunks will be returned by this result.
Parameters:
* result
: The result object to fetch the data chunk from.
Returns The resulting data chunk. Returns NULL
if the result has an error.
These bindings call the wrapper symbol wrapped_duckdb_fetch_chunk
but
mirror the DuckDB C API semantics of duckdb_fetch_chunk
.
c_duckdb_create_cast_function :: IO DuckDBCastFunction Source #
Creates a new cast function object.
Returns The cast function object.
c_duckdb_cast_function_set_source_type :: DuckDBCastFunction -> DuckDBLogicalType -> IO () Source #
Sets the source type of the cast function.
Parameters:
* cast_function
: The cast function object.
* source_type
: The source type to set.
c_duckdb_cast_function_set_target_type :: DuckDBCastFunction -> DuckDBLogicalType -> IO () Source #
Sets the target type of the cast function.
Parameters:
* cast_function
: The cast function object.
* target_type
: The target type to set.
c_duckdb_cast_function_set_implicit_cast_cost :: DuckDBCastFunction -> Int64 -> IO () Source #
Sets the "cost" of implicitly casting the source type to the target type using this function.
Parameters:
* cast_function
: The cast function object.
* cost
: The cost to set.
c_duckdb_cast_function_set_function :: DuckDBCastFunction -> DuckDBCastFunctionFun -> IO () Source #
Sets the actual cast function to use.
Parameters:
* cast_function
: The cast function object.
* function
: The function to set.
c_duckdb_cast_function_set_extra_info :: DuckDBCastFunction -> Ptr () -> DuckDBDeleteCallback -> IO () Source #
Assigns extra information to the cast function that can be fetched during execution, etc.
Parameters:
* extra_info
: The extra information
* destroy
: The callback that will be called to destroy the extra information
(if any)
c_duckdb_cast_function_get_extra_info :: DuckDBFunctionInfo -> IO (Ptr ()) Source #
Retrieves the extra info of the function as set in
duckdb_cast_function_set_extra_info
.
Parameters:
* info
: The info object.
Returns The extra info.
c_duckdb_cast_function_get_cast_mode :: DuckDBFunctionInfo -> IO DuckDBCastMode Source #
Get the cast execution mode from the given function info.
Parameters:
* info
: The info object.
Returns The cast mode.
c_duckdb_cast_function_set_error :: DuckDBFunctionInfo -> CString -> IO () Source #
Report that an error has occurred while executing the cast function.
Parameters:
* info
: The info object.
* error
: The error message.
c_duckdb_cast_function_set_row_error :: DuckDBFunctionInfo -> CString -> DuckDBIdx -> DuckDBVector -> IO () Source #
Report that an error has occurred while executing the cast function, setting the corresponding output row to NULL.
Parameters:
* info
: The info object.
* error
: The error message.
* row
: The index of the row within the output vector to set to NULL.
* output
: The output vector.
c_duckdb_register_cast_function :: DuckDBConnection -> DuckDBCastFunction -> IO DuckDBState Source #
Registers a cast function within the given connection.
Parameters:
* con
: The connection to use.
* cast_function
: The cast function to register.
Returns Whether or not the registration was successful.
c_duckdb_destroy_cast_function :: Ptr DuckDBCastFunction -> IO () Source #
Destroys the cast function object.
Parameters:
* cast_function
: The cast function object.
c_duckdb_destroy_expression :: Ptr DuckDBExpression -> IO () Source #
Destroys the expression and de-allocates its memory.
Parameters:
* expr
: A pointer to the expression.
c_duckdb_expression_return_type :: DuckDBExpression -> IO DuckDBLogicalType Source #
Returns the return type of an expression.
Parameters:
* expr
: The expression.
Returns The return type. Must be destroyed with duckdb_destroy_logical_type
.
c_duckdb_expression_is_foldable :: DuckDBExpression -> IO CBool Source #
Returns whether the expression is foldable into a value or not.
Parameters:
* expr
: The expression.
Returns True, if the expression is foldable, else false.
c_duckdb_expression_fold :: DuckDBClientContext -> DuckDBExpression -> Ptr DuckDBValue -> IO DuckDBErrorData Source #
Folds an expression creating a folded value.
Parameters:
* context
: The client context.
* expr
: The expression. Must be foldable.
* out_value
: The folded value, if folding was successful. Must be destroyed
with duckdb_destroy_value
.
Returns The error data. Must be destroyed with duckdb_destroy_error_data
.