138 filter_build operator in sets list=true

This commit is contained in:
msyu
2025-09-06 19:17:59 +03:00
parent 0437e37c5e
commit 8f072bb610
3 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -51,7 +51,7 @@
//variables.framework.docs={}; //variables.framework.docs={};
variables.framework.docs.APIName="svc-api"; variables.framework.docs.APIName="svc-api";
variables.framework.docs.APIVersion="0.137"; /*dependencies*/ /*$ git config --global --unset user.password*/ variables.framework.docs.APIVersion="0.138"; /*dependencies*/ /*$ git config --global --unset user.password*/
variables.framework.globalHeaders = structNew(); variables.framework.globalHeaders = structNew();
variables.framework.globalHeaders["Access-Control-Expose-Headers"] = "Location"; variables.framework.globalHeaders["Access-Control-Expose-Headers"] = "Location";
+2 -1
View File
@@ -1,5 +1,6 @@
<!--- version 2.01---><!---15:25 31.01.2019---> <!--- version 2.01---><!---15:25 31.01.2019--->
<!--- version 3---><!---16:42 16.11.2020---> <!--- version 3---><!---16:42 16.11.2020--->
<!--- version 4---><!---2025-09-06 19:15:50 больше не нужно объявлять параметр как list, достаточно оператора IN--->
<!--- build query filter string ---> <!--- build query filter string --->
<cfparam name="ATTRIBUTES.filter" type="struct"/> <cfparam name="ATTRIBUTES.filter" type="struct"/>
@@ -22,7 +23,7 @@
---><cfif i LT #len#><cfqueryparam cfsqltype="#getCfSqLType(fltr.ftype)#" list="#fltr.list#" value="#fltr.prefix##fltr.val##fltr.suffix#"/></cfif><!--- ---><cfif i LT #len#><cfqueryparam cfsqltype="#getCfSqLType(fltr.ftype)#" list="#fltr.list#" value="#fltr.prefix##fltr.val##fltr.suffix#"/></cfif><!---
---></cfloop><!--- ---></cfloop><!---
---><cfelse><!--- ---><cfelse><!---
---><cfoutput>#fltr.field#</cfoutput><cfswitch expression=#uCase(fltr.compare)#><cfcase value="EQ"> = </cfcase><cfcase value="NE,NEQ"> <> </cfcase><cfcase value="LE,LTE"> <= </cfcase><cfcase value="LT"> < </cfcase><cfcase value="GE,GTE"> >= </cfcase><cfcase value="GT"> > </cfcase><cfcase value="LIKE"> LIKE </cfcase><cfcase value="LIKE%,LIKEP"> LIKE <cfqueryparam cfsqltype=#getCfSqLType(fltr.ftype)# value="%#fltr.val#%"/><cfcontinue/></cfcase><cfcase value="IN"> IN (<cfqueryparam cfsqltype=#getCfSqLType(fltr.ftype)# list="#fltr.list#" value="#fltr.val#"/>)<cfcontinue/></cfcase><cfdefaultcase> = <cfoutput> #fltr.field#</cfoutput><cfcontinue/><!---***криво---></cfdefaultcase></cfswitch><cfqueryparam cfsqltype=#getCfSqLType(fltr.ftype)# value="#fltr.val#"/><cfcontinue/> ---><cfoutput>#fltr.field#</cfoutput><cfswitch expression=#uCase(fltr.compare)#><cfcase value="EQ"> = </cfcase><cfcase value="NE,NEQ"> <> </cfcase><cfcase value="LE,LTE"> <= </cfcase><cfcase value="LT"> < </cfcase><cfcase value="GE,GTE"> >= </cfcase><cfcase value="GT"> > </cfcase><cfcase value="LIKE"> LIKE </cfcase><cfcase value="LIKE%,LIKEP"> LIKE <cfqueryparam cfsqltype=#getCfSqLType(fltr.ftype)# value="%#fltr.val#%"/><cfcontinue/></cfcase><cfcase value="IN"> IN (<cfqueryparam cfsqltype=#getCfSqLType(fltr.ftype)# list=true value="#fltr.val#"/>)<cfcontinue/></cfcase><cfdefaultcase> = <cfoutput> #fltr.field#</cfoutput><cfcontinue/><!---***криво---></cfdefaultcase></cfswitch><cfqueryparam cfsqltype=#getCfSqLType(fltr.ftype)# value="#fltr.val#"/><cfcontinue/>
</cfif> </cfif>
</cfloop> </cfloop>
<cfexit method="exittag"/> <cfexit method="exittag"/>
+1 -1
View File
@@ -40,7 +40,7 @@
"operation_is_pending"={prefix="inr", type="boolean"}, "operation_is_pending"={prefix="inr", type="boolean"},
"is_test"={prefix="inr", type="boolean"}, "is_test"={prefix="inr", type="boolean"},
"is_auxiliary"={prefix="inr", type="boolean"}, "is_auxiliary"={prefix="inr", type="boolean"},
"explained_status"={prefix="inr", type="string", list=true}, "explained_status"={prefix="inr", type="string"},
"dt_state"={prefix="inr", type="date"}, "dt_state"={prefix="inr", type="date"},
"version"={prefix="inr", type="integer"}<!--- , "version"={prefix="inr", type="integer"}<!--- ,
"io_instance_uid"={prefix="inr", type="integer"}, "io_instance_uid"={prefix="inr", type="integer"},