Documentation ¶
Overview ¶
Package duckdb implements a database/sql driver for the DuckDB database.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDataChunkCapacity ¶
func GetDataChunkCapacity() int
GetDataChunkCapacity returns the capacity of a data chunk.
func RegisterReplacementScan ¶
func RegisterReplacementScan(connector *Connector, cb ReplacementScanCallback)
Types ¶
type Appender ¶
type Appender struct {
// contains filtered or unexported fields
}
Appender holds the DuckDB appender. It allows efficient bulk loading into a DuckDB database.
func NewAppenderFromConn ¶
NewAppenderFromConn returns a new Appender from a DuckDB driver connection.
func (*Appender) AppendRow ¶
AppendRow loads a row of values into the appender. The values are provided as separate arguments.
type Arrow ¶
type Arrow struct {
// contains filtered or unexported fields
}
Arrow exposes DuckDB Apache Arrow interface. https://duckdb.org/docs/api/c/api#arrow-interface
func NewArrowFromConn ¶
NewArrowFromConn returns a new Arrow from a DuckDB driver connection.
func (*Arrow) QueryContext ¶
func (a *Arrow) QueryContext(ctx context.Context, query string, args ...any) (array.RecordReader, error)
QueryContext prepares statements, executes them, returns Apache Arrow array.RecordReader as a result of the last executed statement. Arguments are bound to the last statement.
type Composite ¶
type Composite[T any] struct { // contains filtered or unexported fields }
Use as the `Scanner` type for any composite types (maps, lists, structs)
type Connector ¶
type Connector struct {
// contains filtered or unexported fields
}
func NewConnector ¶
func NewConnector(dsn string, connInitFn func(execer driver.ExecerContext) error) (*Connector, error)
NewConnector opens a new Connector for a DuckDB database. The user must close the Connector, if it is not passed to the sql.OpenDB function. Otherwise, sql.DB closes the Connector when calling sql.DB.Close().
type DataChunk ¶
type DataChunk struct {
// contains filtered or unexported fields
}
DataChunk storage of a DuckDB table.
type ErrorType ¶
type ErrorType int
const ( ErrorTypeInvalid ErrorType = iota // invalid type ErrorTypeOutOfRange // value out of range error ErrorTypeConversion // conversion/casting error ErrorTypeUnknownType // unknown type error ErrorTypeDecimal // decimal related ErrorTypeMismatchType // type mismatch ErrorTypeDivideByZero // divide by 0 ErrorTypeObjectSize // object size exceeded ErrorTypeInvalidType // incompatible for operation ErrorTypeSerialization // serialization ErrorTypeTransaction // transaction management ErrorTypeNotImplemented // method not implemented ErrorTypeExpression // expression parsing ErrorTypeCatalog // catalog related ErrorTypeParser // parser related ErrorTypePlanner // planner related ErrorTypeScheduler // scheduler related ErrorTypeExecutor // executor related ErrorTypeConstraint // constraint related ErrorTypeIndex // index related ErrorTypeStat // stat related ErrorTypeConnection // connection related ErrorTypeSyntax // syntax related ErrorTypeSettings // settings related ErrorTypeBinder // binder related ErrorTypeNetwork // network related ErrorTypeOptimizer // optimizer related ErrorTypeNullPointer // nullptr exception ErrorTypeIO // IO exception ErrorTypeInterrupt // interrupt ErrorTypeFatal // Fatal exceptions are non-recoverable, and render the entire DB in an unusable state ErrorTypeInternal // Internal exceptions indicate something went wrong internally (i.e. bug in the code base) ErrorTypeInvalidInput // Input or arguments error ErrorTypeOutOfMemory // out of memory ErrorTypePermission // insufficient permissions ErrorTypeParameterNotResolved // parameter types could not be resolved ErrorTypeParameterNotAllowed // parameter types not allowed ErrorTypeDependency // dependency ErrorTypeHTTP ErrorTypeMissingExtension // Thrown when an extension is used but not loaded ErrorTypeAutoLoad // Thrown when an extension is used but not loaded ErrorTypeSequence )
type ReplacementScanCallback ¶
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
deps
|
|
alpine_amd64
Package alpine_amd64 is required to provide support for vendoring modules DO NOT REMOVE
|
Package alpine_amd64 is required to provide support for vendoring modules DO NOT REMOVE |
darwin_amd64
Package darwin_amd64 is required to provide support for vendoring modules DO NOT REMOVE
|
Package darwin_amd64 is required to provide support for vendoring modules DO NOT REMOVE |
darwin_arm64
Package darwin_arm64 is required to provide support for vendoring modules DO NOT REMOVE
|
Package darwin_arm64 is required to provide support for vendoring modules DO NOT REMOVE |
freebsd_amd64
Package freebsd_amd64 is required to provide support for vendoring modules DO NOT REMOVE
|
Package freebsd_amd64 is required to provide support for vendoring modules DO NOT REMOVE |
linux_amd64
Package linux_amd64 is required to provide support for vendoring modules DO NOT REMOVE
|
Package linux_amd64 is required to provide support for vendoring modules DO NOT REMOVE |
linux_arm64
Package linux_arm64 is required to provide support for vendoring modules DO NOT REMOVE
|
Package linux_arm64 is required to provide support for vendoring modules DO NOT REMOVE |