diff --git a/deps.edn b/deps.edn index c3d3ff9..fc09861 100644 --- a/deps.edn +++ b/deps.edn @@ -23,7 +23,7 @@ :exec-fn codox.main/-main :exec-args {:group-id "com.techascent" :artifact-id "tmducken" - :version "0.10.0-2" + :version "0.10.1" :name "TMDucken" :description "Clojure bindings for duckdb" :metadata {:doc/format :markdown} diff --git a/docs/index.html b/docs/index.html index 9252a6e..565c460 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,8 +1,8 @@ -TMDucken 0.10.0-2

TMDucken 0.10.0-2

Clojure bindings for duckdb.

Namespaces

tmducken.duckdb

DuckDB C-level bindings for tech.ml.dataset.

+ gtag('config', 'G-XJYNJF48RM');

TMDucken 0.10.1

Clojure bindings for duckdb.

Namespaces

\ No newline at end of file diff --git a/docs/tmducken.duckdb.html b/docs/tmducken.duckdb.html index 085a7e2..fde31e9 100644 --- a/docs/tmducken.duckdb.html +++ b/docs/tmducken.duckdb.html @@ -4,7 +4,7 @@ function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); - gtag('config', 'G-XJYNJF48RM');

tmducken.duckdb

DuckDB C-level bindings for tech.ml.dataset.

+ gtag('config', 'G-XJYNJF48RM');

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 |

close-db

(close-db db)

Close the database.

-

connect

(connect db)

Create a new database connection from an opened database. +

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)

    disconnect

    (disconnect conn)

    Disconnect a connection.

    -

    drop-table!

    (drop-table! conn dataset)

    duckdb-library-version

    (duckdb-library-version)

    get-config-options

    (get-config-options)

    Returns a sequence of maps of {:name :desc} describing valid valid configuration +

    delayed-clone

    (delayed-clone this)

    disconnect

    (disconnect conn)

    Disconnect a connection.

    +

    drop-table!

    (drop-table! conn dataset)

    duckdb-library-version

    (duckdb-library-version)

    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.
    -

    initialized?

    (initialized?)

    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 +

    initialized?

    (initialized?)

    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:

    @@ -91,7 +91,7 @@ {:name "max_memory", :desc "The maximum memory of the system (e.g. 1GB)"} {:name "threads", :desc "The number of total threads used by the system"}] -

    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 |
     
    -
    \ No newline at end of file +
    \ No newline at end of file