Results of 1 - 9 of about 9 for ResultSet (0.002 sec.)
- Run Queries 13571
- 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
...se run on, see Define Connections . Sending Queries DuckDB supports the standard JDBC methods to send queries and retrieve result sets. First a Statement object has to be created from the Connection , this object can then be used to send queries using exe...meant to be used for queries that produce results (e.g., SELECT ). Below are two examples. See also the JDBC Statement and ResultSet documentations. import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.Stat...// 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("SELECT * FROM items")) { while (rs.next()) { System.out.println(rs.getString(1)); System.out.print... - https://man.mtool.work/duckdb/2.0/clients/java/querying.html
- Handle Results 10299
- 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
...ns. Arrow Methods The DuckDB result set integrates with Apache Arrow through the Java Arrow bindings . A DuckDBResultSet can export its rows as an Arrow stream f...ot . import org.apache.arrow.memory.RootAllocator; import org.apache.arrow.vector.ipc.ArrowReader; import org.duckdb.DuckDBResultSet; try (var conn = DriverManager.getConnection("jdbc:duckdb:"); var stmt = conn.prepareStatement("SELECT * FROM generate_ser...ies(2000)"); var resultset = (DuckDBResultSet) stmt.executeQuery(); var allocator = new RootAllocator()) { try (var reader = (ArrowReader) resultset.... - https://man.mtool.work/duckdb/2.0/clients/java/result_handling.html
- DuckDB_% Metadata Functions 8699
- DuckDB offers a collection of table functions that provide metadata about the current database. These functions reside in the main schema and their names are prefixed with duckdb_ . The resultset returned by a duckdb_ table function may be
...can use a duckdb_ function call in the FROM clause of a SELECT statement, and you may refer to the columns of its returned resultset elsewhere in the statement, for example in the WHERE clause. Table functions are still functions, and you should write par...entheses after the function name to call it to obtain its returned resultset: SELECT * FROM duckdb_settings(); Alternatively, you may execute table functions also using the CALL -syntax: CALL duckdb_...NCE statement and are documented there in full. Note that the attributes will always be filled out in the duckdb_sequences resultset, even if they were not explicitly specified in the CREATE SEQUENCE statement. The last_value column contains the last valu... - https://man.mtool.work/duckdb/2.0/sql/meta/duckdb_table_functions.html
- Java (JDBC) Client 8610
- 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
...class, using the jdbc:duckdb: JDBC URL prefix: import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.Statement; Connection conn = DriverManager.getConnection("jdbc:duckdb:"); Used on its own, jdbc:duckdb: o...ver is on the classpath 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 cove... - https://man.mtool.work/duckdb/2.0/clients/java/overview.html
- Troubleshoot 8340
- Overview This page collects common issues encountered when using the DuckDB JDBC driver, together with their workarounds. If you run into a problem that is not covered here, search the driver's issue tracker on GitHub. Driver Class Not Foun
...ob Parquet files written by some legacy writers do not set the UTF8 flag on string columns, so DuckDB reads them as BLOB . ResultSet.getObject() then returns a DuckDBBlobResult and ResultSet.getString() returns the bytes rendered as an escaped string rath... - https://man.mtool.work/duckdb/2.0/clients/java/troubleshoot.html
- Connect 8142
- 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
..., or AUTOMATIC . custom_user_agent Append a custom string to the user agent reported to DuckDB. jdbc_stream_results Stream result sets instead of materializing them. See Streaming Results . jdbc_auto_commit Set the default auto-commit mode for new connect...EXISTS events (id INTEGER, 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 ex...ion conn = DriverManager.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... - https://man.mtool.work/duckdb/2.0/clients/java/connecting.html
- GROUPING SETS 7962
- GROUPING SETS , ROLLUP and CUBE can be used in the GROUP BY clause to perform a grouping over multiple dimensions within the same query. Note that this syntax is not compatible with GROUP BY ALL . Examples Compute the average income along t
...he grouping can themselves contain actual NULL -values, then it can be challenging to distinguish whether the value in the resultset is a “real” NULL -value coming out of the data itself, or a NULL -value generated by the grouping construct. The GROUPING_...for which GROUPING_ID(y, q, m) returns 3 . Finally, the () grouping set results in one super-aggregate row for the entire resultset, leaving NULL -values for y , q and m and for which GROUPING_ID(y, q, m) returns 7 . To understand the relationship betwee... - https://man.mtool.work/duckdb/2.0/sql/query_syntax/grouping_sets.html
- Swift Client 7675
- DuckDB has a Swift client. See the announcement post for details. Instantiating DuckDB DuckDB supports both in-memory and persistent databases. To work with an in-memory database, run: let database = try Database(store: .inMemory) To work w
...lee won't be blocked while the query is executing. We'll then cast the result columns to Swift native types using DuckDB's ResultSet cast(to:) family of methods, before finally wrapping them up in a DataFrame from the TabularData framework. ... import Tab... - https://man.mtool.work/duckdb/2.0/clients/tertiary_clients/swift.html
- Jupyter Notebooks 7495
- DuckDB's Python client can be used directly in Jupyter notebooks with no additional configuration, as the first section shows. Additional libraries can simplify SQL query development; the rest of this guide uses the JupySQL package. See oth
...db_column; If the %config SqlMagic.autopandas = True option is set, the variable is a Pandas dataframe, otherwise, it is a ResultSet that can be converted to Pandas with the DataFrame() function. Querying Pandas Dataframes DuckDB is able to find and query... - https://man.mtool.work/duckdb/2.0/guides/python/jupyter.html
PREV
1
NEXT
DuckDB 2.0 Documentation / man.mtool.work