Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed tests with distinct.

  • Loading branch information...
commit 346e281c9ef7d807c70e827c0060778aee5d7b49 1 parent 47962d6
@gaspard authored
Showing with 4 additions and 4 deletions.
  1. +1 −1  test/querybuilder/basic.yml
  2. +3 −3 test/querybuilder/filters.yml
View
2  test/querybuilder/basic.yml
@@ -89,4 +89,4 @@ after_process_callback:
context:
after_filter: '(1 = 1)'
src: "objects where name like 'a%' or name like 'b%' in site"
- res: "%Q{SELECT objects.* FROM objects WHERE (1 = 1) AND (objects.name LIKE 'a%' OR objects.name LIKE 'b%')}"
+ res: "%Q{SELECT objects.* FROM objects WHERE (1 = 1) AND (objects.name LIKE 'a%' OR objects.name LIKE 'b%') GROUP BY id}"
View
6 test/querybuilder/filters.yml
@@ -83,15 +83,15 @@ equation_with_date_interval:
equation_and_or_par:
src: "objects where event_at > '2006-04-01' or name like 'foo%'"
sxp: '[:query, [:filter, [:relation, "objects"], [:or, [:>, [:field, "event_at"], [:string, "2006-04-01"]], [:like, [:field, "name"], [:string, "foo%"]]]]]'
- res: "[%Q{SELECT objects.* FROM objects WHERE (objects.event_at > '2006-04-01' OR objects.name LIKE 'foo%') AND objects.parent_id = ?}, id]"
+ res: "[%Q{SELECT objects.* FROM objects WHERE (objects.event_at > '2006-04-01' OR objects.name LIKE 'foo%') AND objects.parent_id = ? GROUP BY id}, id]"
or_with_same_tables:
src: "objects where index = 5 or index = 7"
- res: "[%Q{SELECT objects.* FROM index,objects WHERE ((index.value = 5 AND index.node_id = objects.id) OR (index.value = 7 AND index.node_id = objects.id)) AND objects.parent_id = ?}, id]"
+ res: "[%Q{SELECT objects.* FROM index,objects WHERE ((index.value = 5 AND index.node_id = objects.id) OR (index.value = 7 AND index.node_id = objects.id)) AND objects.parent_id = ? GROUP BY objects.id}, id]"
or_with_missing_table:
src: "objects where index = 5 or 7"
- res: "[%Q{SELECT objects.* FROM index,objects WHERE ((index.value = 5 AND index.node_id = objects.id) OR (7 AND index.id = 0)) AND objects.parent_id = ?}, id]"
+ res: "[%Q{SELECT objects.* FROM index,objects WHERE ((index.value = 5 AND index.node_id = objects.id) OR (7 AND index.id = 0)) AND objects.parent_id = ? GROUP BY objects.id}, id]"
equation_par:
src: "objects where (1 > 2 or 2 > 3) and 4 = 5 "
Please sign in to comment.
Something went wrong with that request. Please try again.