MCPcopy Create free account
hub / github.com/dataease/SQLBot / transFilterTerm

Function transFilterTerm

backend/apps/datasource/crud/row_permission.py:178–209  ·  view source on GitHub ↗
(term: str)

Source from the content-addressed store, hash-verified

176
177
178def transFilterTerm(term: str) -> str:
179 if term == "eq":
180 return " = "
181 if term == "not_eq":
182 return " <> "
183 if term == "lt":
184 return " < "
185 if term == "le":
186 return " <= "
187 if term == "gt":
188 return " > "
189 if term == "ge":
190 return " >= "
191 if term == "in":
192 return " IN "
193 if term == "not in":
194 return " NOT IN "
195 if term == "like":
196 return " LIKE "
197 if term == "not like":
198 return " NOT LIKE "
199 if term == "null":
200 return " IS NULL "
201 if term == "not_null":
202 return " IS NOT NULL "
203 if term == "empty":
204 return " = "
205 if term == "not_empty":
206 return " <> "
207 if term == "between":
208 return " BETWEEN "
209 return ""
210
211
212def userHaveVariable(user_variables: List, sys_variable: SystemVariable):

Callers 1

transTreeItemFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected