TMDucken 0.10.0-2
Clojure bindings for duckdb.
Namespaces
tmducken.duckdb
DuckDB C-level bindings for tech.ml.dataset.
+ gtag('config', 'G-XJYNJF48RM');Generated by Codox with RDash UI theme
TMDucken 0.10.1
TMDucken 0.10.1
Clojure bindings for duckdb.
Namespaces
tmducken.duckdb
DuckDB C-level bindings for tech.ml.dataset.
Generated by Codox with RDash UI theme
TMDucken 0.10.0-2
tmducken.duckdb
DuckDB C-level bindings for tech.ml.dataset.
+ gtag('config', 'G-XJYNJF48RM');Generated by Codox with RDash UI theme
TMDucken 0.10.1
tmducken.duckdb
DuckDB C-level bindings for tech.ml.dataset.
Current datatype support:
- boolean, all numeric types int8->int64, uint8->uint64, float32, float64. @@ -46,9 +46,9 @@ | MSFT | 2000-05-01 | 25.45 |
connect
(connect db)
Create a new database connection from an opened database. Users should call disconnect to close this connection.
-create-table!
(create-table! conn dataset options)
(create-table! conn dataset)
Create an sql table based off of the column datatypes of the dataset. Note that users +
create-table!
(create-table! conn dataset options)
(create-table! conn dataset)
Create an sql table based off of the column datatypes of the dataset. Note that users can also call execute-query! with their own sql create-table string. Note that the fastest way to get data into the system is insert-dataset!.
Options:
@@ -57,10 +57,10 @@ be used.:primary-key
- sequence of column names to be used as the primary key.delayed-clone
(delayed-clone this)
get-config-options
(get-config-options)
Returns a sequence of maps of {:name :desc} describing valid valid configuration +
delayed-clone
(delayed-clone this)
get-config-options
(get-config-options)
Returns a sequence of maps of {:name :desc} describing valid valid configuration options to the open-db function.
-initialize!
(initialize! {:keys [duckdb-home lib-instance]})
(initialize!)
Initialize the duckdb ffi system. This must be called first should be called only once. +
initialize!
(initialize! {:keys [duckdb-home lib-instance]})
(initialize!)
Initialize the duckdb ffi system. This must be called first should be called only once. It is safe, however, to call this multiple times.
Options:
-
@@ -69,10 +69,10 @@
neither is passed in then the library will be searched in the normal system library
paths.
insert-dataset!
(insert-dataset! conn dataset options)
(insert-dataset! conn dataset)
Append this dataset using the higher performance append api of duckdb. This is recommended +
insert-dataset!
(insert-dataset! conn dataset options)
(insert-dataset! conn dataset)
Append this dataset using the higher performance append api of duckdb. This is recommended as opposed to using sql statements or prepared statements. That being said the schema of this dataset must match precisely the schema of the target table.
-open-db
(open-db path config-options)
(open-db path)
(open-db)
Open a database. path
may be nil in which case database is opened in-memory.
+
open-db
(open-db path config-options)
(open-db path)
(open-db)
Open a database. path
may be nil in which case database is opened in-memory.
For valid config options call get-config-options. Options must be
passed as a map of string->string. As duckdb is dynamically linked configuration options
may change but with linux-amd64-0.3.1
current options are:
prepare
(prepare conn sql)
(prepare conn sql options)
Create a prepared statement returning a clojure function you can call taking args specified +
prepare
(prepare conn sql)
(prepare conn sql options)
Create a prepared statement returning a clojure function you can call taking args specified in the prepared statement. This function is auto-closeable which releases the prepared statement - it is also registered with the resource system so it will be released when it is no longer reachable by the gc system.
The function return value can be either a sequence of datasets or a single dataset. For :streaming
, the sequence
@@ -145,11 +145,11 @@
| MSFT | 2000-04-01 | 28.37 |
| MSFT | 2000-05-01 | 25.45 |
-
run-query!
(run-query! conn sql options)
(run-query! conn sql)
Run a query ignoring the results. Useful for queries such as single-row insert or update where +
run-query!
(run-query! conn sql options)
(run-query! conn sql)
Run a query ignoring the results. Useful for queries such as single-row insert or update where you don't care about the results.
-sql->dataset
(sql->dataset conn sql options)
(sql->dataset conn sql)
Execute a query returning a single dataset. This runs the query in a context that releases the memory used +
sql->dataset
(sql->dataset conn sql options)
(sql->dataset conn sql)
Execute a query returning a single dataset. This runs the query in a context that releases the memory used for the result set before function returns returning a dataset that has no native bindings.
-sql->datasets
(sql->datasets conn sql options)
(sql->datasets conn sql)
Execute a query returning either a sequence of datasets or a single dataset.
+sql->datasets
(sql->datasets conn sql options)
(sql->datasets conn sql)
Execute a query returning either a sequence of datasets or a single dataset.
See documentation and options for prepare.
Examples:
tmducken.duckdb> (first (sql->datasets conn "select * from stocks"))
@@ -178,4 +178,4 @@
| MSFT | 2000-04-01 | 28.37 |
| MSFT | 2000-05-01 | 25.45 |
-