⌘K ctrl+k
Search Shortcut cmd + k | ctrl + k
DuckDB 2.0 ドキュメント 全文検索
per page, with , order by , clip by
Results of 1 - 8 of about 8 for DriverManager (0.002 sec.)
Connect 13375
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 ... te DuckDB server over Quack . Opening a Connection In JDBC, database connections are created through the standard java.sql.DriverManager class. On modern JVMs the driver registers itself with the DriverManager automatically when the JDBC JAR is on the classpa ... explicitly to force registration before opening a connection: Class.forName("org.duckdb.DuckDBDriver"); Connection conn = DriverManager.getConnection("jdbc:duckdb:"); In GraalVM Native Image executables, always use this explicit load: the service-provider di ... scovery is not reliably visible to Native Image's static analysis. To create a DuckDB connection, call DriverManager with the jdbc:duckdb: JDBC URL prefix, like so: import java.sql.Connection; import java.sql.DriverManager; Connection conn ...
https://man.mtool.work/duckdb/2.0/clients/java/connecting.html
Import Data 9452
Overview The JDBC driver offers two ways to load data into DuckDB in bulk: the high-performance Appender and a JDBC batch writer. This page describes both and when to use each. Appender The Appender is available in the DuckDB JDBC driver vi ... e schema and catalog it is applied to. The Appender is flushed when the close() method is called. Example: import java.sql.DriverManager; import org.duckdb.DuckDBConnection; DuckDBConnection conn = (DuckDBConnection) DriverManager.getConnection("jdbc:duckdb:" ... call addBatch() to queue the row, and call executeBatch() to write all queued rows in a single operation. import java.sql.DriverManager; import java.sql.PreparedStatement; import org.duckdb.DuckDBConnection; DuckDBConnection conn = (DuckDBConnection) DriverM ... ch() . This avoids parameter binding but does not benefit from the reuse that prepared statements provide. import java.sql.DriverManager; import java.sql.Statement; import org.duckdb.DuckDBConnection; DuckDBConnection conn = (DuckDBConnection) DriverManager.g ...
https://man.mtool.work/duckdb/2.0/clients/java/data_import.html
Handle Results 9218
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 ... w.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_series(2000)"); var resultset = (D ... ator)) { Data.exportArrayStream(allocator, reader, arrow_array_stream); // DuckDB setup try (var conn = (DuckDBConnection) DriverManager.getConnection("jdbc:duckdb:")) { conn.registerArrowStream("asdf", arrow_array_stream); // run a query try (var stmt = conn ... ies props = new Properties(); props.setProperty(DuckDBDriver.JDBC_STREAM_RESULTS, String.valueOf(true)); Connection conn = DriverManager.getConnection("jdbc:duckdb:", props); Chunked Results The JDBC driver can return a query result as a lazily fetched sequen ...
https://man.mtool.work/duckdb/2.0/clients/java/result_handling.html
Write User Defined Functions 8657
Overview The JDBC driver can register user-defined functions (UDFs) written in Java, including scalar functions and table functions. This page covers building and registering both, from the simple functional-interface overloads to the vecto ... a unary or binary operator over INTEGER , BIGINT , or DOUBLE and avoid boxing. import java.sql.Connection; import java.sql.DriverManager; import org.duckdb.DuckDBFunctions; try (Connection conn = DriverManager.getConnection("jdbc:duckdb:")) { DuckDBFunctions. ... the object-argument withFunction() overloads cannot be combined with varargs. import java.sql.Connection; import java.sql.DriverManager; import org.duckdb.DuckDBColumnType; import org.duckdb.DuckDBFunctions; import org.duckdb.DuckDBLogicalType; try (Connecti ... on conn = DriverManager.getConnection("jdbc:duckdb:"); DuckDBLogicalType intType = DuckDBLogicalType.of(DuckDBColumnType.INTEGER)) { DuckDBFunctio ...
https://man.mtool.work/duckdb/2.0/clients/java/functions.html
Troubleshoot 8549
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 ... ng error: Exception in thread "main" java.sql.SQLException: No suitable driver found for jdbc:duckdb: at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:706) at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:252) ... And whe ...
https://man.mtool.work/duckdb/2.0/clients/java/troubleshoot.html
Java (JDBC) Client 8205
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 ... ation, or the Arrow Methods . Opening a Connection In JDBC, database connections are created through the standard java.sql.DriverManager 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: opens an in-memory database. Appending a file name, for examp ...
https://man.mtool.work/duckdb/2.0/clients/java/overview.html
Profile and Monitor 7880
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 ... ed from a separate thread and exposes getPercentage() , getRowsProcessed() , and getTotalRowsToProcess() . import java.sql.DriverManager; import java.sql.SQLException; import java.util.concurrent.CompletableFuture; import org.duckdb.DuckDBConnection; import o ... rg.duckdb.DuckDBPreparedStatement; import org.duckdb.QueryProgress; try (DuckDBConnection conn = (DuckDBConnection) DriverManager.getConnection("jdbc:duckdb:"); DuckDBPreparedStatement ps = (DuckDBPreparedStatement) conn.prepareStatement("SELECT count( ... TREE_OPTIMIZER , NO_OUTPUT , JSON , HTML , GRAPHVIZ , YAML , and MERMAID . try (DuckDBConnection conn = (DuckDBConnection) DriverManager.getConnection("jdbc:duckdb:"); Statement stmt = conn.createStatement()) { stmt.execute("SET enable_profiling = 'json'"); s ...
https://man.mtool.work/duckdb/2.0/clients/java/profiling.html
Run Queries 6868
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 ... ow 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.Statement; Connection conn = DriverManager.getConnection("jdbc:duckdb:"); // c ... port java.sql.Struct; import java.util.Map; import org.duckdb.DuckDBConnection; DuckDBConnection conn = (DuckDBConnection) DriverManager.getConnection("jdbc:duckdb:"); // LIST / ARRAY Array list = conn.createArrayOf("INTEGER", new Object[] {1, 2, 3}); try (Pr ...
https://man.mtool.work/duckdb/2.0/clients/java/querying.html
PREV 1 NEXT
DuckDB 2.0 Documentation / man.mtool.work