⌘K ctrl+k
Search Shortcut cmd + k | ctrl + k
DuckDB 2.0 ドキュメント 全文検索
per page, with , order by , clip by
Results of 1 - 6 of about 6 for executeQuery (0.002 sec.)
Run Queries 12923
Overview Java applications send queries and read result sets through the familiar Statement , PreparedStatement , and ResultSet interfaces. This page covers sending queries and reading DuckDB's nested and composite types. For opening the Co ... Statement object has to be created from the Connection , this object can then be used to send queries using execute() and executeQuery() . execute() is meant for queries where no results are expected like CREATE TABLE or UPDATE etc. and executeQuery() is me ... into the table stmt.execute("INSERT INTO items VALUES ('jeans', 20.0, 1), ('hammer', 42.2, 2)"); try (ResultSet rs = stmt.executeQuery("SELECT * FROM items")) { while (rs.next()) { System.out.println(rs.getString(1)); System.out.println(rs.getInt(3)); } } s ... lements java.sql.Struct ) MAP java.util.LinkedHashMap UNION the resolved member value ENUM String try (ResultSet rs = stmt.executeQuery("SELECT [1, 2, 3] AS l, {'a': 1, 'b': 2} AS s")) { while (rs.next()) { DuckDBArray list = (DuckDBArray) rs.getObject(1); O ...
https://man.mtool.work/duckdb/2.0/clients/java/querying.html
Connect 9322
Overview Every DuckDB feature reachable from Java starts with a Connection . This page covers the JDBC URL forms the driver accepts, how DuckDB and driver options are passed and which of them win, how connections come to share (or not share ... s DuckDB runs queries on its own pool of native threads. This pool is independent of the JVM's threads: a single Statement.executeQuery() call can occupy every thread in the pool, and blocking JDBC calls from many application threads do not increase DuckDB's ... NTEGER, payload VARCHAR)"); stmt.execute("INSERT INTO events VALUES (1, 'hello'), (2, 'world')"); try (ResultSet rs = stmt.executeQuery("SELECT count(*) FROM events")) { rs.next(); System.out.println(rs.getLong(1)); } } The ducklake extension is autoloaded o ... ager.getConnection("jdbc:duckdb:ducklake:metadata.ducklake"); Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery("SELECT id, payload FROM events ORDER BY id")) { while (rs.next()) { System.out.println(rs.getInt(1) + " " + rs.getString( ...
https://man.mtool.work/duckdb/2.0/clients/java/connecting.html
Handle Results 8847
Overview Beyond the standard JDBC ResultSet , the DuckDB driver can hand results to Apache Arrow , stream large results instead of materializing them, and expose raw columnar data chunks. This page covers each of these result-handling optio ... duckdb:"); var stmt = conn.prepareStatement("SELECT * FROM generate_series(2000)"); var resultset = (DuckDBResultSet) stmt.executeQuery(); var allocator = new RootAllocator()) { try (var reader = (ArrowReader) resultset.arrowExportStream(allocator, 256)) { w ... Stream("asdf", arrow_array_stream); // run a query try (var stmt = conn.createStatement(); var rs = (DuckDBResultSet) stmt.executeQuery("SELECT count(*) FROM asdf")) { while (rs.next()) { System.out.println(rs.getInt(1)); } } } } Streaming Results Result str ...
https://man.mtool.work/duckdb/2.0/clients/java/result_handling.html
Profile and Monitor 8536
Overview The JDBC driver exposes several ways to observe a running or completed query: cancelling and timing out queries, polling query progress, retrieving profiling output, and emitting memory-usage events through Java Flight Recorder . T ... its progress can be polled while it executes. CompletableFuture<Void> query = CompletableFuture.runAsync(() -> { try { ps.executeQuery().close(); } catch (SQLException e) { throw new RuntimeException(e); } }); while (!query.isDone()) { QueryProgress progres ... Connection("jdbc:duckdb:"); Statement stmt = conn.createStatement()) { stmt.execute("SET enable_profiling = 'json'"); stmt.executeQuery("SELECT count(*) FROM range(1000)").close(); String profile = conn.getProfilingInformation(ProfilerPrintFormat.JSON); Syst ...
https://man.mtool.work/duckdb/2.0/clients/java/profiling.html
Java (JDBC) Client 8061
Installation To use the DuckDB Java (JDBC) client, visit the Java installation page . The latest stable version of the DuckDB Java (JDBC) client is 2.0.0. The DuckDB Java (JDBC) client lets Java applications query DuckDB through the standar ... ath and a connection can be opened, run a trivial query: try (Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery("SELECT 42")) { rs.next(); System.out.println(rs.getInt(1)); // prints 42 } Define Connections covers the connection lifec ...
https://man.mtool.work/duckdb/2.0/clients/java/overview.html
ADBC Client 7110
Installation To use the DuckDB ADBC client, download the libduckdb archive for your platform and follow the instructions below . For Python, install the duckdb package instead, as described in the Python section . The latest stable version ... cription Arguments Example StatementSetSqlQuery Set the SQL query to execute. The query can then be executed with StatementExecuteQuery. (AdbcStatement*, const char*, AdbcError*) AdbcStatementSetSqlQuery(&adbc_statement, "SELECT * FROM TABLE", &adbc_error) S ... tatementExecuteQuery Execute a statement and get the results. (AdbcStatement*, ArrowArrayStream*, int64_t*, AdbcError*) AdbcStatementExecuteQue ... or Append ADBC_INGEST_OPTION_MODE_CREATE_APPEND Create a new table if it does not exist, otherwise append to it. StatementExecuteQuery returns the number of rows affected through its rows_affected output parameter. Ingestion Options Option Description adbc. ...
https://man.mtool.work/duckdb/2.0/clients/adbc.html
PREV 1 NEXT
DuckDB 2.0 Documentation / man.mtool.work