Results of 1 - 5 of about 5 for OpenDB (0.001 sec.)
- Connect 12832
- 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
...figure 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 connection, which is where boot queries belon...query, nil); err != nil { return err } } return nil }) if err != nil { log.Fatal(err) } defer connector.Close() db := sql.OpenDB(connector) defer db.Close() Pass nil as the callback when no initialization is needed. A Connector is also the entry point...() returns false connector, _ := duckdb.NewConnector("", nil) defer connector.Close() // if the connector is passed to sql.OpenDB Failing to close a persistent database can leave changes in the write-ahead log that are not synchronized to persistent st... - https://man.mtool.work/duckdb/2.0/clients/go/connecting.html
- Profile and Monitor 8677
- 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
...s] %s: %s", level, logType, logMsg) }, }) check(err) // Enable logging, then point it at the registered storage. db := sql.OpenDB(connector) _, err = db.Exec(`CALL enable_logging(level = 'info')`) check(err) _, err = db.Exec(`SET logging_storage = 'my_... - https://man.mtool.work/duckdb/2.0/clients/go/profiling.html
- Import Data 8346
- 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
...} defer c.Close() con, err := c.Connect(context.Background()) if err != nil { log.Fatal(err) } defer con.Close() db := sql.OpenDB(c) defer db.Close() if _, err := db.Exec(`CREATE TABLE users (name VARCHAR, age INTEGER)`); err != nil { log.Fatal(err) }... - https://man.mtool.work/duckdb/2.0/clients/go/data_import.html
- Write User Defined Functions 8034
- 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
...any bare table name as a Parquet file of that name. return "read_parquet", []any{tableName + ".parquet"}, nil }) db := sql.OpenDB(connector) // SELECT * FROM foo now reads from read_parquet('foo.parquet'). Returning an error from the callback surfaces... - https://man.mtool.work/duckdb/2.0/clients/go/functions.html
- Go Client 8034
- The latest stable release of the DuckDB Go client bundles DuckDB 2.0.0. Its own version tag encodes that DuckDB version; see Versioning below. The DuckDB Go client, duckdb-go , is a SQL driver that conforms to Go's built-in database/sql int
...d_only&threads=4") To run initialization steps, such as SET statements, before the first query, open the database with sql.OpenDB() and a Connector . See Connect for connectors, configuration, and the connection lifetime. Build Tags Some client feature... - https://man.mtool.work/duckdb/2.0/clients/go/overview.html
PREV
1
NEXT
DuckDB 2.0 Documentation / man.mtool.work