mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Add 'ifvar' attribute to most query elements
XML 쿼리에서 'ifvar' 속성을 사용하여, 특정 변수가 있을 때만 유효한 테이블이나 컬럼, 인덱스 힌트 등을 지정할 수 있도록 합니다. 어떤 변수를 넣는지에 따라 <condition> 뿐 아니라 <table>, <column>, <index_hint? 등의 적용 여부도 XML 쿼리 수정 없이 자유롭게 컨트롤할 수 있게 됩니다.
This commit is contained in:
parent
1289776c97
commit
6b7486e74f
12 changed files with 88 additions and 11 deletions
|
|
@ -1,18 +1,19 @@
|
|||
<query id="selectJoinTest1" action="select">
|
||||
<tables>
|
||||
<table name="documents" />
|
||||
<table name="member" />
|
||||
<table name="member" if="if_table" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="member.member_srl" />
|
||||
<column name="COUNT(*)" alias="count" />
|
||||
<column name="COUNT(*)" alias="count" if="if_column" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="documents.member_srl" var="member.member_srl" />
|
||||
<condition operation="equal" column="documents.member_srl" default="member.member_srl" />
|
||||
<condition operation="in" column="documents.document_srl" var="document_srl_list" pipe="and" />
|
||||
<condition operation="equal" column="documents.member_srl" default="member.member_srl" if="if_condition1" />
|
||||
<condition operation="in" column="documents.document_srl" var="document_srl_list" />
|
||||
<condition operation="notin" column="documents.document_srl" var="exclude_document_srl_list" if="if_condition2" />
|
||||
</conditions>
|
||||
<groups>
|
||||
<groups if="if_groupby">
|
||||
<group column="member.member_srl" />
|
||||
<having>
|
||||
<condition operation="notequal" column="member.member_srl" var="exclude_member_srl" notnull="notnull" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue