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: docs/howto/vet.md
+26-11Lines changed: 26 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -4,15 +4,16 @@
4
4
5
5
`sqlc vet` runs queries through a set of lint rules.
6
6
7
-
Rules are defined in the `sqlc`[configuration](../reference/config) file. They consist
8
-
of a name, message, and a [Common Expression Language (CEL)](https://github.com/google/cel-spec)
9
-
expression. Expressions are evaluated using [cel-go](https://github.com/google/cel-go).
10
-
If an expression evaluates to `true`, `sqlc vet` will report an error using the given message.
7
+
Rules are defined in the `sqlc`[configuration](../reference/config) file. They
8
+
consist of a name, message, and a [Common Expression Language
9
+
(CEL)](https://github.com/google/cel-spec) expression. Expressions are evaluated
10
+
using [cel-go](https://github.com/google/cel-go). If an expression evaluates to
11
+
`true`, `sqlc vet` will report an error using the given message.
11
12
12
13
## Defining lint rules
13
14
14
-
Each lint rule's CEL expression has access to information from your sqlc configuration and queries
15
-
via variables defined in the following proto messages.
15
+
Each lint rule's CEL expression has access to information from your sqlc
16
+
configuration and queries via variables defined in the following proto messages.
16
17
17
18
```proto
18
19
message Config
@@ -190,13 +191,27 @@ sql:
190
191
- sqlc/db-prepare
191
192
```
192
193
194
+
Databases configured with a `uri` must have an up-to-date schema, and `sqlc` does not apply schema migrations your database. You can configure [managed databases](managed-databases.md) instead to have `sqlc` create and migrate databases automatically.
0 commit comments