Support ILIKE and custom case-insensitive search functions for MySQL-compatible adapters#167
Support ILIKE and custom case-insensitive search functions for MySQL-compatible adapters#167Copilot wants to merge 6 commits into
Conversation
Agent-Logs-Url: https://github.com/durlabhjain/dframework-node/sessions/fb6a8b74-6817-4be8-9ea3-a570402f349e Co-authored-by: durlabhjain <18685657+durlabhjain@users.noreply.github.com>
…BY support Agent-Logs-Url: https://github.com/durlabhjain/dframework-node/sessions/fb6a8b74-6817-4be8-9ea3-a570402f349e Co-authored-by: durlabhjain <18685657+durlabhjain@users.noreply.github.com>
Agent-Logs-Url: https://github.com/durlabhjain/dframework-node/sessions/4e294b8b-7baf-4ae9-9329-12ae07b3a1c7 Co-authored-by: durlabhjain <18685657+durlabhjain@users.noreply.github.com>
…fy ORDER BY sanitize-then-wrap comment Agent-Logs-Url: https://github.com/durlabhjain/dframework-node/sessions/4e294b8b-7baf-4ae9-9329-12ae07b3a1c7 Co-authored-by: durlabhjain <18685657+durlabhjain@users.noreply.github.com>
|
I've verified the changes
I analyzed the final generated query, ILIKE function is not used in the where part of the query, it still maintains the "UPPER(Name) Like ". We also also add a ReadMe.md file too so backend application can kow how effectively apply the needed changes. caseInsensitiveMode: 'ilike-fn' was added to the mysqlConfig |
|
@copilot Update documentation/ examples on how different features can be activated for comparisons and how do they work in an application |
…E_CONFIGURATION Agent-Logs-Url: https://github.com/durlabhjain/dframework-node/sessions/69e06114-39cb-48ca-8b1d-2d642f97bfb0 Co-authored-by: durlabhjain <18685657+durlabhjain@users.noreply.github.com>
The root cause of filtering not working with await mysql.setConfig({
host: '...', user: '...', password: '...', database: '...',
namedPlaceholders: true,
forceCaseInsensitive: true, // ← required — without this no transformation is applied
caseInsensitiveMode: 'ilike-fn', // ← selects ILIKE(field, :param) = 1 syntax
});Without Added a full guide with troubleshooting at
Added
Also updated |
caseInsensitiveMode/shadowColumns/applyCaseInsensitive/applyShadowColumnscode'ilike-fn'mode toapplyCaseInsensitive→ returns{ statementTemplate: 'ILIKE(field, {param}) = 1', value }for StarRocks function-call syntaxaddParametersto handlestatementTemplatereturn (bind param normally, push custom statement with{param}replaced)caseInsensitiveOrderBy = falseproperty +setConfigsupportapplyOrderByCaseInsensitive(fieldName)method (false = no-op, true/'upper' = UPPER wrap, function = custom)applyOrderByCaseInsensitive, remove the double-sanitize bug on the joined string'ilike-fn'mode,applyOrderByCaseInsensitive,setConfig caseInsensitiveOrderBy