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
Copy file name to clipboardExpand all lines: README.md
+2-1
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,7 @@ Generates the endpoints (or a whole app) from a mapping (SQL query -> URL)
19
19
query: >-
20
20
SELECT id, name, name_ru, slug
21
21
FROM categories
22
+
LIMIT :q.limit
22
23
post:
23
24
query: >-
24
25
INSERT INTO categories(name, slug, created_at, created_by, updated_at, updated_by)
@@ -41,7 +42,7 @@ Generates the endpoints (or a whole app) from a mapping (SQL query -> URL)
41
42
FROM categories
42
43
WHERE id = :p.categoryId
43
44
```
44
-
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.
45
+
Note that the queries use a little unusual named parameters: `:b.name`, `:p.categoryId`, etc The prefixes `q` (query), `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.
45
46
46
47
1. Generate code
47
48
| Language | Command for code generation | Example of generated files | Libraries |
0 commit comments