⌘K ctrl+k
Search Shortcut cmd + k | ctrl + k
DuckDB 2.0 ドキュメント 全文検索
per page, with , order by , clip by
Results of 1 - 5 of about 5 for NewConnector (0.001 sec.)
Connect 12391
Overview The Go client works through the standard database/sql types: a *sql.DB is a pool of connections to a DuckDB database. This page covers opening in-memory and file-backed databases, passing DuckDB configuration options, running initi ... n setup statements before any query, or to configure DuckDB in code rather than in the DSN, create a Connector with duckdb.NewConnector() and open the database with sql.OpenDB() . The connector's second argument is a callback that runs against each new conne ... ction, which is where boot queries belong: connector, err := duckdb.NewConnector("/path/to/foo.db?threads=4", func(execer driver.ExecerContext) error { bootQueries := []string{ "SET schema = 'main'", "SE ... ntext.Background(), "SELECT 42") defer rows.Close() // or drain the rows until Next() returns false connector, _ := duckdb.NewConnector("", nil) defer connector.Close() // if the connector is passed to sql.OpenDB Failing to close a persistent database can le ...
https://man.mtool.work/duckdb/2.0/clients/go/connecting.html
Import Data 10001
Overview The Go client offers two ways to load data into DuckDB in bulk: the high-performance Appender for inserting rows generated in Go, and reading directly from data files such as Parquet, CSV, and JSON. Both are described below. For in ... le with duckdb.NewAppenderFromConn() , passing the schema (empty for the default) and table name: connector, err := duckdb.NewConnector("test.db", nil) if err != nil { log.Fatal(err) } defer connector.Close() conn, err := connector.Connect(context.Background ... ck: package main import ( "context" "database/sql" "log" "github.com/duckdb/duckdb-go/v2" ) func main() { c, err := duckdb.NewConnector("", nil) if err != nil { log.Fatal(err) } defer c.Close() con, err := c.Connect(context.Background()) if err != nil { log. ...
https://man.mtool.work/duckdb/2.0/clients/go/data_import.html
Handle Results 8291
Overview DuckDB is columnar, and beyond reading a result set row by row through database/sql , the Go client can exchange whole results with Apache Arrow as a stream of record batches, and register an Arrow stream as a queryable view. Both ... der . Iterate it with Next() , reading one arrow.RecordBatch at a time, and release it when done: connector, err := duckdb.NewConnector("", nil) if err != nil { log.Fatal(err) } defer connector.Close() conn, err := connector.Connect(context.Background()) if ...
https://man.mtool.work/duckdb/2.0/clients/go/result_handling.html
Profile and Monitor 7960
Overview The Go client can observe query execution: it can retrieve per-operator profiling metrics after a query runs, and register a log storage that receives DuckDB's log messages. Both are described below. Profiling Profiling information ... uckdb.LoggerCallbacks whose DefaultLoggerCallback receives each entry's level, type, and message: connector, err := duckdb.NewConnector("", nil) check(err) defer connector.Close() err = duckdb.RegisterLogStorage(connector, "my_log_storage", duckdb.LoggerCall ...
https://man.mtool.work/duckdb/2.0/clients/go/profiling.html
Write User Defined Functions 7280
Overview The Go client can register user-defined functions written in Go: scalar functions that map input rows to a single output value, and table functions that produce a set of rows. It can also register a replacement scan that rewrites a ... k receives the unresolved table name and returns the replacement function name and its arguments: connector, err := duckdb.NewConnector("", nil) check(err) defer connector.Close() duckdb.RegisterReplacementScan(connector, func(tableName string) (string, []an ...
https://man.mtool.work/duckdb/2.0/clients/go/functions.html
PREV 1 NEXT
DuckDB 2.0 Documentation / man.mtool.work