You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add support for parameter prefixes in order to be able to explicitly bind to a desired origin
This feature allows us to use parameters from different sources. See example for testing PUT methods
in the tests.
BREAKING CHANGE: every :parameter should be revised and modified to be :b.parameter to bind to
request body or :p.parameter to bind to path parameter.
See also #8
SET name = :name, name_ru = :nameRu, slug = :slug, updated_at = NOW(), updated_by = :userId
36
-
WHERE id = :categoryId
35
+
SET name = :b.name, name_ru = :b.nameRu, slug = :b.slug, updated_at = NOW(), updated_by = :b.userId
36
+
WHERE id = :p.categoryId
37
37
delete: >-
38
38
DELETE
39
39
FROM categories
40
-
WHERE id = :categoryId
40
+
WHERE id = :p.categoryId
41
41
```
42
+
Note that the queries use a little unusual named parameters: `:b.name`, `p.categoryId`, etc The prefixes `b` (body) and `p` (path) are used here in order to bind to parameters from the appropriate sources. The prefixes are needed only during code generation and they will absent from the resulted code.
0 commit comments