mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 18:21:39 +09:00
Add unit tests for SELECT COUNT(*) queries
This commit is contained in:
parent
cf1f4f3a3b
commit
02122cb383
3 changed files with 44 additions and 0 deletions
19
tests/_data/dbquery/selectCountTest1.xml
Normal file
19
tests/_data/dbquery/selectCountTest1.xml
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<query id="selectCountTest1" action="select">
|
||||
<tables>
|
||||
<table name="documents" />
|
||||
<table name="member" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="member.*" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="documents.member_srl" default="member.member_srl" />
|
||||
<condition operation="in" column="documents.document_srl" var="document_srl_list" pipe="and" />
|
||||
</conditions>
|
||||
<groups>
|
||||
<group column="member.member_srl" />
|
||||
<having>
|
||||
<condition operation="notequal" column="member.member_srl" var="exclude_member_srl" notnull="notnull" />
|
||||
</having>
|
||||
</groups>
|
||||
</query>
|
||||
11
tests/_data/dbquery/selectCountTest2.xml
Normal file
11
tests/_data/dbquery/selectCountTest2.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<query id="selectCountTest2" action="select">
|
||||
<tables>
|
||||
<table name="documents" />
|
||||
</tables>
|
||||
<columns distinct="true">
|
||||
<column name="module_srl" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="in" column="document_srl" var="document_srl_list" />
|
||||
</conditions>
|
||||
</query>
|
||||
Loading…
Add table
Add a link
Reference in a new issue