Add unit tests for SELECT COUNT(*) queries

This commit is contained in:
Kijin Sung 2021-01-07 01:06:02 +09:00
parent cf1f4f3a3b
commit 02122cb383
3 changed files with 44 additions and 0 deletions

View 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>

View 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>