Skip to content

Commit 31f3308

Browse files
committed
DuckDB 1.1.3, New options in DBConfig, Bugfixing
1 parent 98d04c0 commit 31f3308

17 files changed

+1204
-62
lines changed

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
11
# Changelog
2+
3+
0.3.7
4+
- DuckDB 1.1.3 bugfix release.
5+
- Added release(resource) function.
6+
- Extended DbConfig with new parameters.
7+
- Now INTERVAL type in Elixir is tuple of size 3 : {months, days, micros} (Here in month 30 days...).
8+
- Now MAP type in Elixir is list of tuples [{key, value}]. Because MAP is ordered list and 'key' can be any type.

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ Duckdbex.query(conn, "CREATE TABLE map_table (map_col MAP(INT, DOUBLE));")
308308
Duckdbex.query(conn, "INSERT INTO map_table VALUES (map([1, 2], [2.98, 3.14])), (map([3, 4], [9.8, 1.6]));")
309309

310310
{:ok, r} = Duckdbex.query(conn, "SELECT * FROM map_table")
311-
[[%{1 => 2.98, 2 => 3.14}], [%{3 => 9.8, 4 => 1.6}]] = Duckdbex.fetch_all(r)
311+
[[[{1, 2.98}, {2, 3.14}]], [[{3, 9.8}, {4, 1.6}]]] = Duckdbex.fetch_all(r)
312312
```
313313

314314
### UNION
@@ -320,7 +320,7 @@ A UNION type (not to be confused with the SQL UNION operator) is a nested type c
320320
{:ok, _} = Duckdbex.query(conn, "CREATE TABLE tbl1(u UNION(num INT, str VARCHAR));")
321321
{:ok, _} = Duckdbex.query(conn, "INSERT INTO tbl1 values (1) , ('two') , (union_value(str := 'three'));")
322322
{:ok, r} = Duckdbex.query(conn, "SELECT u from tbl1;")
323-
[[%{"num" => 1}], [%{"str" => "two"}], [%{"str" => "three"}]] = Duckdbex.fetch_all(r)
323+
[[{"num", 1}], [{"str", "two"}], [{"str", "three"}]] = Duckdbex.fetch_all(r)
324324
```
325325

326326
### ENUM
@@ -331,7 +331,7 @@ The ENUM type represents a dictionary data structure with all possible unique va
331331
{:ok, _} = Duckdbex.query(conn, "CREATE TYPE mood AS ENUM ('sad', 'ok', 'happy');")
332332

333333
{:ok, _} = Duckdbex.query(conn, "CREATE TABLE person (name text, current_mood mood);")
334-
{:ok, _} = Duckdbex.query(conn, "INSERT INTO person VALUES ('Pedro','happy'), ('Mark', NULL), ('Pagliacci', 'sad'), ackey', 'ok');")
334+
{:ok, _} = Duckdbex.query(conn, "INSERT INTO person VALUES ('Pedro','happy'), ('Mark', NULL), ('Pagliacci', 'sad'), ('ackey', 'ok');")
335335

336336
{:ok, r} = Duckdbex.query(conn, "SELECT * FROM person WHERE current_mood = 'sad';")
337337
[["Pagliacci", "sad"]] = Duckdbex.fetch_all(r)

0 commit comments

Comments
 (0)