⌘K ctrl+k
Search Shortcut cmd + k | ctrl + k
DuckDB 2.0 ドキュメント 全文検索
per page, with , order by , clip by
Results of 1 - 4 of about 4 for ExecContext (0.001 sec.)
Run Queries 12260
Overview Because the Go client implements database/sql , queries run through the standard methods: Exec and ExecContext send statements that do not return rows, such as INSERT or DDL, and report the number of affected rows. Query , QueryCon ... , transactions, and scanning results. For opening the database these run on, see Connect . Sending Statements Use Exec (or ExecContext ) for a statement that does not return rows, such as INSERT or UPDATE . It returns a sql.Result , from which RowsAffected( ... ) reports how many rows changed: _, err := db.ExecContext(ctx, `CREATE TABLE users (name VARCHAR, age INTEGER)`) if err != nil { log.Fatal(err) } res, err := db.ExecContext(ctx, `I ... INTO users VALUES (?, ?)`) if err != nil { log.Fatal(err) } defer stmt.Close() for _, u := range users { if _, err := stmt.ExecContext(ctx, u.name, u.age); err != nil { log.Fatal(err) } } Transactions db.BeginTx() starts a transaction and returns a *sql.Tx ...
https://man.mtool.work/duckdb/2.0/clients/go/querying.html
Profile and Monitor 9209
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 ... ext.Background()) check(err) defer conn.Close() // Do not print profiling output to stdout after each query. _, err = conn.ExecContext(context.Background(), `SET enable_profiling = 'no_output'`) check(err) // Run the query to profile. res, err := conn.Query ... r that query. info, err := duckdb.GetProfilingInfo(conn) check(err) // Optionally, turn profiling off again. _, err = conn.ExecContext(context.Background(), `PRAGMA disable_profiling`) check(err) GetProfilingInfo() returns a duckdb.ProfilingInfo , a tree th ...
https://man.mtool.work/duckdb/2.0/clients/go/profiling.html
Connect 7748
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 ... := []string{ "SET schema = 'main'", "SET search_path = 'main'", } for _, query := range bootQueries { if _, err := execer.ExecContext(context.Background(), query, nil); err != nil { return err } } return nil }) if err != nil { log.Fatal(err) } defer connec ...
https://man.mtool.work/duckdb/2.0/clients/go/connecting.html
Import Data 7748
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 ... er than query it in place, wrap the reader in a CREATE TABLE ... AS SELECT or COPY statement sent with Exec : _, err := db.ExecContext(ctx, `CREATE TABLE data AS SELECT * FROM read_parquet('data.parquet')`) Further Reading Appender — the engine-level Append ...
https://man.mtool.work/duckdb/2.0/clients/go/data_import.html
PREV 1 NEXT
DuckDB 2.0 Documentation / man.mtool.work