Results of 1 - 9 of about 9 for stmt (0.003 sec.)
- Java JDBC Client – DuckDB 13211
- This page is for DuckDB 1.3, which is outdated. Switch to the current documentation . Search Shortcut cmd + k | ctrl + k Installation Documentation Getting Started Connect Overview Concurrency Data Import Overview Data Sources CSV Files Ove
...mport java.sql.Statement ; Connection conn = DriverManager . getConnection ( "jdbc:duckdb:" ); // create a table Statement stmt = conn . createStatement (); stmt . execute ( "CREATE TABLE items (item VARCHAR, value DECIMAL(10, 2), count INTEGER)" );...// insert two items into the table stmt . execute ( "INSERT INTO items VALUES ('jeans', 20.0, 1), ('hammer', 42.2, 2)" ); try ( ResultSet rs = stmt . executeQuery...{ while ( rs . next ()) { System . out . println ( rs . getString ( 1 )); System . out . println ( rs . getInt ( 3 )); } } stmt . close (); jeans 1 hammer 2 DuckDB also supports prepared statements as per the JDBC API: import java.sql.PreparedStateme... - https://man.mtool.work/duckdb/1.3/clients/java.html
- ODBC 101: A Duck Themed Guide to ODBC – DuckDB 10353
- This page is for DuckDB 1.3, which is outdated. Switch to the current version . Search Shortcut cmd + k | ctrl + k Installation Documentation Getting Started Connect Overview Concurrency Data Import Overview Data Sources CSV Files Overview
...ocated first, and then used once the connection has been established. Statement Handle name Statement Type name SQL_HANDLE_STMT Description Handles the execution of SQL statements, as well as the returned result sets. Use case Executing SQL queries,...ery Now that the application is set up, we can add a query to it. First, we need to allocate a statement handle: SQLHANDLE stmt ; SQLAllocHandle ( SQL_HANDLE_STMT , dbc , & stmt ); Then we can execute a query: SQLExecDirect ( stmt , ( SQLCHAR * ) "SE...results. First, we need to bind the columns in the result set to buffers: SQLLEN int_val ; SQLLEN null_val ; SQLBindCol ( stmt , 1 , SQL_C_SLONG , & int_val , 0 , & null_val ); Then we can fetch the results: SQLFetch ( stmt ); 5. Go Wild Now that we... - https://man.mtool.work/duckdb/1.3/guides/odbc/general.html
- Prepared Statements – DuckDB 9365
- This page is for DuckDB 1.3, which is outdated. Switch to the current version . Search Shortcut cmd + k | ctrl + k Installation Documentation Getting Started Connect Overview Concurrency Data Import Overview Data Sources CSV Files Overview
...ith the prepared statement it can be cleaned up using the duckdb_destroy_prepare method. Example duckdb_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 , 2 , 43 ); // NULL as second parameter...means no result set is requested duckdb_execute_prepared ( stmt , NULL ); duckdb_destroy_prepare ( & stmt ); // we can also query result sets using prepared statements if ( duckdb_prepar... - https://man.mtool.work/duckdb/1.3/clients/c/prepared.html
- Node.js API – DuckDB 9275
- This page is for DuckDB 1.3, which is outdated. Switch to the current documentation . Search Shortcut cmd + k | ctrl + k Installation Documentation Getting Started Connect Overview Concurrency Data Import Overview Data Sources CSV Files Ove
...) }); Prepared Statements From connections, you can create prepared statements (and only that) using con.prepare() : const stmt = con . prepare ( ' SELECT ?::INTEGER AS fortytwo ' ); To execute this statement, you can call for example all() on the st...mt object: stmt . all ( 42 , function ( err , res ) { if ( err ) { console . warn ( err ); } else { console . log ( res [ 0 ]. fortytwo )...multiple times. This is for example useful to fill a table with data: con . run ( ' CREATE TABLE a (i INTEGER) ' ); const stmt = con . prepare ( ' INSERT INTO a VALUES (?) ' ); for ( let i = 0 ; i < 10 ; i ++ ) { stmt . run ( i ); } stmt . finalize... - https://man.mtool.work/duckdb/1.3/clients/nodejs/overview.html
- ADBC Client – DuckDB 8376
- This page is for DuckDB 1.3, which is outdated. Switch to the current version . Search Shortcut cmd + k | ctrl + k Installation Documentation Getting Started Connect Overview Concurrency Data Import Overview Data Sources CSV Files Overview
...NewReader ( sr ) if err != nil { return fmt . Errorf ( "failed to create IPC reader: %w" , err ) } defer rdr . Release () stmt , err := r . conn . NewStatement () if err != nil { return fmt . Errorf ( "failed to create new statement: %w" , err ) } i...f err := stmt . SetOption ( adbc . OptionKeyIngestMode , adbc . OptionValueIngestModeCreate ); err != nil { return fmt . Errorf ( "faile...d to set ingest mode: %w" , err ) } if err := stmt . SetOption ( adbc . OptionKeyIngestTargetTable , "temp_table" ); err != nil { return fmt . Errorf ( "failed to set ingest... - https://man.mtool.work/duckdb/1.3/clients/adbc.html
- Query – DuckDB 8142
- This page is for DuckDB 1.3, which is outdated. Switch to the current version . Search Shortcut cmd + k | ctrl + k Installation Documentation Getting Started Connect Overview Concurrency Data Import Overview Data Sources CSV Files Overview
...conn . close (); Prepared Statements // Create a new connection const conn = await db . connect (); // Prepare query const stmt = await conn . prepare ( `SELECT v + ? FROM generate_series(0, 10_000) t(v);` ); // ... and run the query with materialize...d results await stmt . query ( 234 ); // ... or result chunks for await ( const batch of await stmt . send ( 234 )) { // ... } // Close the sta...tement to release memory await stmt . close (); // Closing the connection will release statements as well await conn . close (); Arrow Table to JSON // Create... - https://man.mtool.work/duckdb/1.3/clients/wasm/query.html
- R Client – DuckDB 7495
- This page is for DuckDB 1.3, which is outdated. Switch to the current version . Search Shortcut cmd + k | ctrl + k Installation Documentation Getting Started Connect Overview Concurrency Data Import Overview Data Sources CSV Files Overview
...st ( 'laptop' , 2000 , 1 )) # if you want to reuse a prepared statement multiple times, use dbSendStatement() and dbBind() stmt <- dbSendStatement ( con , "INSERT INTO items VALUES (?, ?, ?)" ) dbBind ( stmt , list ( 'iphone' , 300 , 2 )) dbBind ( st...mt , list ( 'android' , 3.5 , 1 )) dbClearResult ( stmt ) # query the database using a prepared statement res <- dbGetQuery ( con , "SELECT item FROM items WHERE value > ?" , lis... - https://man.mtool.work/duckdb/1.3/clients/r.html
- Rust Client – DuckDB 7495
- This page is for DuckDB 1.3, which is outdated. Switch to the current documentation . Search Shortcut cmd + k | ctrl + k Installation Documentation Getting Started Connect Overview Concurrency Data Import Overview Data Sources CSV Files Ove
...u8 >> , } conn .execute ( "INSERT INTO person (name, data) VALUES (?, ?)" , params! [ me .name , me .data ], ) ? ; let mut stmt = conn .prepare ( "SELECT id, name, data FROM person" ) ? ; let person_iter = stmt .query_map ([], | row | { Ok ( Person {...n conn DuckDB Rust duckdb database memory client also Client details handle using params case execute prepare query Person stmt iter Appender rows Documentation 関連するページ Prepared Statements Java JDBC Client Go Client Query Python DB API Transac... - https://man.mtool.work/duckdb/1.3/clients/rust.html
- Julia Client – DuckDB 7100
- This page is for DuckDB 1.3, which is outdated. Switch to the current documentation . Search Shortcut cmd + k | ctrl + k Installation Documentation Getting Started Connect Overview Concurrency Data Import Overview Data Sources CSV Files Ove
...table DBInterface . execute ( con , "CREATE TABLE integers (i INTEGER)" ) # insert data by executing a prepared statement stmt = DBInterface . prepare ( con , "INSERT INTO integers VALUES(?)" ) DBInterface . execute ( stmt , [ 42 ]) # query the data... - https://man.mtool.work/duckdb/1.3/clients/julia.html
PREV
1
NEXT
DuckDB 1.3 Documentation / man.mtool.work