Skip to content
Snippets Groups Projects
Commit 1fb60721 authored by Cam Saül's avatar Cam Saül
Browse files

Test updates :wrench: [ci drivers]

parent bbbf86e3
No related branches found
No related tags found
No related merge requests found
......@@ -8,28 +8,28 @@
;; Just check that a basic query works
(expect
{:status :completed
{:status :completed
:row_count 2
:data {:rows [[100]
[99]]
:columns ["ID"]
:cols [{:name "ID", :base_type :type/Integer}]
:native_form {:query "SELECT ID FROM VENUES ORDER BY ID DESC LIMIT 2;"}}}
:data {:rows [[100]
[99]]
:columns ["ID"]
:cols [{:name "ID", :display_name "ID", :base_type :type/Integer}]
:native_form {:query "SELECT ID FROM VENUES ORDER BY ID DESC LIMIT 2;"}}}
(qp/process-query {:native {:query "SELECT ID FROM VENUES ORDER BY ID DESC LIMIT 2;"}
:type :native
:database (id)}))
;; Check that column ordering is maintained
(expect
{:status :completed
{:status :completed
:row_count 2
:data {:rows [[100 "Mohawk Bend" 46]
[99 "Golden Road Brewing" 10]]
:columns ["ID" "NAME" "CATEGORY_ID"]
:cols [{:name "ID", :base_type :type/Integer}
{:name "NAME", :base_type :type/Text}
{:name "CATEGORY_ID", :base_type :type/Integer}]
:native_form {:query "SELECT ID, NAME, CATEGORY_ID FROM VENUES ORDER BY ID DESC LIMIT 2;"}}}
:data {:rows [[100 "Mohawk Bend" 46]
[99 "Golden Road Brewing" 10]]
:columns ["ID" "NAME" "CATEGORY_ID"]
:cols [{:name "ID", :display_name "ID", :base_type :type/Integer}
{:name "NAME", :display_name "Name", :base_type :type/Text}
{:name "CATEGORY_ID", :display_name "Category ID", :base_type :type/Integer}]
:native_form {:query "SELECT ID, NAME, CATEGORY_ID FROM VENUES ORDER BY ID DESC LIMIT 2;"}}}
(qp/process-query {:native {:query "SELECT ID, NAME, CATEGORY_ID FROM VENUES ORDER BY ID DESC LIMIT 2;"}
:type :native
:database (id)}))
......
......@@ -7,8 +7,8 @@
;; make sure that `infer-column-types` can still infer types even if the initial value(s) are `nil` (#4256)
(expect
[{:name "a", :base_type :type/Integer}
{:name "b", :base_type :type/Integer}]
[{:name "a", :display_name "A", :base_type :type/Integer}
{:name "b", :display_name "B", :base_type :type/Integer}]
(:cols (infer-column-types {:columns [:a :b], :rows [[1 nil]
[2 nil]
[3 nil]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment