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
+5 -1
View File
@@ -1,4 +1,4 @@
import { SqlRenderer, type CatalogColumn, type CatalogFunction, type Filter, type OrderTerm, type RenderContext, type Resource, type Statement } from '@crudy/restloom';
import { RestError, SqlRenderer, type CatalogColumn, type CatalogFunction, type Filter, type OrderTerm, type RenderContext, type Resource, type Statement } from '@crudy/restloom';
/**
* SQL Server 2022: bracketed names, @p placeholders, JSON_OBJECT for rows and
@@ -44,6 +44,10 @@ export class MssqlRenderer extends SqlRenderer {
: `${expr} COLLATE Latin1_General_100_CS_AS LIKE ${pattern} ESCAPE '\\'`;
}
regex(): string {
throw new RestError(400, 'unsupported', 'regular expressions');
}
isBoolean(expr: string, value: boolean): string {
return `${expr} = ${value ? 1 : 0}`;
}