Results of 1 - 9 of about 9 for duckdbError (0.003 sec.)
- Appender 12241
- Appenders are the most efficient way of loading data into DuckDB from within the C interface, and are recommended for fast data loading. The appender is much faster than using prepared statements or individual INSERT INTO statements. Append
...memory. Note that duckdb_appender_destroy should always be called on the resulting appender, even if the function returns DuckDBError . Example duckdb_query(con, "CREATE TABLE people (id INTEGER, name VARCHAR)", NULL); duckdb_appender appender; if (duckdb_...appender_create(con, NULL, "people", &appender) == DuckDBError) { // handle error } // append the first row (1, Mark) duckdb_append_int32(appender, 1); duckdb_append_varchar(appender, "...able : The table name to append to. out_appender : The resulting appender object. Return Value DuckDBSuccess on success or DuckDBError on failure. duckdb_appender_create_ext Creates an appender object. Note that the object must be destroyed with duckdb_appe... - https://man.mtool.work/duckdb/2.0/clients/c/appender.html
- Configuration 10677
- Configuration options can be provided to change different settings of the database system. Note that many of these settings can be changed later on using PRAGMA statements as well. The configuration object should be created, filled with val
...Example duckdb_database db; duckdb_config config; // create the configuration object if (duckdb_create_config(&config) == DuckDBError) { // handle error } // set some configuration options duckdb_set_config(config, "access_mode", "READ_WRITE"); // or READ_...ig, "default_order", "DESC"); // open the database using the configuration if (duckdb_open_ext(NULL, &db, config, NULL) == DuckDBError) { // handle error } // cleanup the configuration object duckdb_destroy_config(&config); // run queries... // cleanup duck...loc failure. Note that duckdb_destroy_config should always be called on the resulting config, even if the function returns DuckDBError . Syntax duckdb_state duckdb_create_config ( duckdb_config * out_config ); Parameters out_config : The result configuratio... - https://man.mtool.work/duckdb/2.0/clients/c/config.html
- Startup & Shutdown 10209
- To use DuckDB, you must first initialize a duckdb_database handle using duckdb_open() . duckdb_open() takes as parameter the database file to read and write from. The special value NULL ( nullptr ) can be used to create an in-memory databas
...to avoid memory and file handle leaking. Example duckdb_database db; duckdb_connection con; if (duckdb_open(NULL, &db) == DuckDBError) { // handle error } if (duckdb_connect(db, &con) == DuckDBError) { // handle error } // run queries... // cleanup duckdb_...ached 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 . Return Value DuckDBSucces...s on success or DuckDBError on failure. duckdb_destroy_instance_cache Destroys an existing database instance cache and de-allocates its memory. Syntax... - https://man.mtool.work/duckdb/2.0/clients/c/connect.html
- Complete API 9472
- This page contains the reference for DuckDB's C API. The reference contains several deprecation notices. These concern methods whose long-term availability is not guaranteed as they may be removed in the future. That said, DuckDB's develope
...ached 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 . Return Value DuckDBSucces...s on success or DuckDBError on failure. duckdb_destroy_instance_cache Destroys an existing database instance cache and de-allocates its memory. Syntax...d :memory: open an in-memory database. out_database : The result database object. Return Value DuckDBSuccess on success or DuckDBError on failure. duckdb_open_ext Extended version of duckdb_open. Creates a new database or opens an existing database file sto... - https://man.mtool.work/duckdb/2.0/clients/c/api.html
- Query 9203
- The duckdb_query method allows SQL queries to be run in DuckDB from C. This method takes two parameters, a (null-terminated) SQL query string and a duckdb_result result pointer. The result pointer may be NULL if the application is not inter
...t result; // create a table state = duckdb_query(con, "CREATE TABLE integers (i INTEGER, j INTEGER);", NULL); if (state == DuckDBError) { // handle error } // insert three rows into the table state = duckdb_query(con, "INSERT INTO integers VALUES (3, 4), (5..., 6), (7, NULL);", NULL); if (state == DuckDBError) { // handle error } // query rows again state = duckdb_query(con, "SELECT * FROM integers", &result); if (state == DuckDB...ry 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 ,... - https://man.mtool.work/duckdb/2.0/clients/c/query.html
- Troubleshoot 8088
- Overview This page collects common issues encountered when using the DuckDB Go client, together with their workarounds. Because the client uses cgo to embed DuckDB, most build problems are cgo or linker problems. If you run into a problem t
...hat is not covered here, search the client's issue tracker on GitHub. Classifying DuckDB Errors The client returns a *duckdb.Error for errors reported by DuckDB. Use errors.As to handle these errors by category witho...ut parsing their messages: _, err := db.Exec(query) if err != nil { var duckdbError *duckdb.Error if errors.As(err, &duckdbError) { switch duckdbError.Type { case duckdb.ErrorTypeCatalog: // Handle a missin... - https://man.mtool.work/duckdb/2.0/clients/go/troubleshoot.html
- Prepared Statements 7711
- A prepared statement is a parameterized query. The query is prepared with question marks ( ? ) or dollar symbols ( $1 ) indicating the parameters of the query. Values can then be bound to these parameters, after which the prepared statement
...b_prepared_statement stmt; duckdb_result result; if (duckdb_prepare(con, "INSERT INTO integers VALUES ($1, $2)", &stmt) == DuckDBError) { // handle error } duckdb_bind_int32(stmt, 1, 42); // the parameter index starts counting at 1! duckdb_bind_int32(stmt,...n also query result sets using prepared statements if (duckdb_prepare(con, "SELECT * FROM integers WHERE i = ?", &stmt) == DuckDBError) { // handle error } duckdb_bind_int32(stmt, 1, 42); duckdb_execute_prepared(stmt, &result); // do something with result /...query to prepare out_prepared_statement : The resulting prepared statement object Return Value DuckDBSuccess on success or DuckDBError on failure. duckdb_destroy_prepare Closes the prepared statement and de-allocates all memory allocated for the statement.... - https://man.mtool.work/duckdb/2.0/clients/c/prepared.html
- Vectors 6704
- Vectors represent a horizontal slice of a column. They hold a number of values of a specific type, similar to an array. Vectors are the core data representation used in DuckDB. Vectors are typically stored within data chunks . The vector an
...x_t size ); Parameters vector : The list vector. size : The size of the child list. Return Value The duckdb state. Returns DuckDBError if the vector is nullptr. duckdb_list_vector_reserve Sets the total capacity of the underlying child-vector of a list. Aft...meters vector : The list vector. required_capacity : the total capacity to reserve. Return Value The duckdb state. Returns DuckDBError if the vector is nullptr. duckdb_struct_vector_get_child Retrieves the child vector of a struct vector. The resulting vect... - https://man.mtool.work/duckdb/2.0/clients/c/vector.html
- Table Functions 6506
- The table function API can be used to define a table function that can then be called from within DuckDB in the FROM clause of a query. API Reference Overview duckdb_table_function duckdb_create_table_function (); void duckdb_destroy_table_
...function, an init function and a main function. If the function is incomplete or a function with this name already exists DuckDBError is returned. Syntax duckdb_state duckdb_register_table_function ( duckdb_connection con , duckdb_table_function function )... - https://man.mtool.work/duckdb/2.0/clients/c/table_functions.html
PREV
1
NEXT
DuckDB 2.0 Documentation / man.mtool.work