feat: regular expression and array filters, GET procedures; 0.3.0

This commit is contained in:
2026-11-02 02:09:06 +01:00
parent 8735abfe79
commit 215d1c2f7e
30 changed files with 171 additions and 44 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@crudy/restloom-mysql",
"version": "0.2.0",
"version": "0.3.0",
"type": "module",
"description": "MySQL dialect for restloom",
"keywords": [
@@ -36,7 +36,7 @@
"prepack": "npm run build"
},
"dependencies": {
"@crudy/restloom": "^0.2.0"
"@crudy/restloom": "^0.3.0"
},
"peerDependencies": {
"mysql2": "^3.11.0"
+4
View File
@@ -41,6 +41,10 @@ export class MysqlRenderer extends SqlRenderer {
: `${expr} COLLATE utf8mb4_bin LIKE ${pattern} ESCAPE '\\\\'`;
}
regex(expr: string, pattern: string, insensitive: boolean): string {
return `REGEXP_LIKE(${expr}, ${pattern}, '${insensitive ? 'i' : 'c'}')`;
}
isBoolean(expr: string, value: boolean): string {
return `${expr} = ${value ? 1 : 0}`;
}