File tree Expand file tree Collapse file tree 1 file changed +44
-1
lines changed Expand file tree Collapse file tree 1 file changed +44
-1
lines changed Original file line number Diff line number Diff line change 55#### Breaking changes
66* To avoid allocating data twice for inputs, the results now by default will return references in the data field of ` Adbc.Column ` .
77
8- If you need to use the in the Elixir world, you can use ` Adbc.Result.materialize/1 ` and
8+ If you need to use them in the Elixir world, you can use ` Adbc.Result.materialize/1 ` and
99 ` Adbc.Column.materialize/1 ` to convert the data to regular Elixir terms.
1010
11+ ``` elixir
12+ iex> {:ok , results} = Connection .query (conn, " SELECT 123 as num, 456.78 as fp" )
13+ {:ok ,
14+ results = %Adbc .Result {
15+ data: [
16+ %Adbc .Column {
17+ name: " num" ,
18+ type: :s64 ,
19+ metadata: nil ,
20+ nullable: true ,
21+ data: [# Reference<0.351247108.3006922760.20174>]
22+ },
23+ %Adbc .Column {
24+ name: " fp" ,
25+ type: :f64 ,
26+ metadata: nil ,
27+ nullable: true ,
28+ data: [# Reference<0.351247108.3006922760.20175>]
29+ }
30+ ],
31+ num_rows: nil
32+ }}
33+ iex> Adbc .Result .materialize (results)
34+ %Adbc .Result {
35+ data: [
36+ %Adbc .Column {
37+ name: " num" ,
38+ type: :s64 ,
39+ nullable: true ,
40+ metadata: nil ,
41+ data: [123 ]
42+ },
43+ %Adbc .Column {
44+ name: " fp" ,
45+ type: :f64 ,
46+ nullable: true ,
47+ metadata: nil ,
48+ data: [456.78 ]
49+ }
50+ ]
51+ }
52+ ```
53+
1154## v0.5.0
1255
1356#### Breaking changes
You can’t perform that action at this time.
0 commit comments