Closed cnuernber closed 1 month ago
See zulip thread - https://clojurians.zulipchat.com/#narrow/stream/236259-tech.2Eml.2Edataset.2Edev/topic/duckdb.2Finsert-dataset!.20table.20schema.20support
(deftest basic-datatype-test (try (let [ds (supported-datatype-ds)] (duckdb/run-query! @conn* "CREATE SCHEMA foo") (duckdb/create-table! @conn* ds) (tap> (ds/rows (duckdb/sql->dataset @conn* "select * from information_schema.tables" {:key-fn keyword}))) (duckdb/insert-dataset! @conn* ds) (let [sql-ds (duckdb/sql->dataset @conn* "select * from foo.testtable" {:key-fn keyword})] (doseq [column (vals ds)] (is (= (vec column) (vec (sql-ds (:name (meta column))))))))) (finally (try (duckdb/run-query! @conn* "DROP SCHEMA foo CASCADE") #_(duckdb/drop-table! @conn* "foo.testtable") (catch Throwable e nil)))))
See zulip thread - https://clojurians.zulipchat.com/#narrow/stream/236259-tech.2Eml.2Edataset.2Edev/topic/duckdb.2Finsert-dataset!.20table.20schema.20support