Skip to content

Commit

Permalink
📝 Add explanation for CLI check command
Browse files Browse the repository at this point in the history
  • Loading branch information
ionesosa-e authored Feb 4, 2025
1 parent b276af3 commit 6f9cc33
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,28 @@ work:
> defining two functions `find_squirrel` and `list_squirrels` you can then
> import and use in your code.
### CLI Commands
Squirrel offers the following commands to streamline your workflow:
- `gleam run -m squirrel`: Generates type-safe Gleam code for all SQL queries found in `src/**/sql/*.sql`.
- `gleam run -m squirrel check`: Validates that the generated Gleam code is up-to-date with the SQL queries.
#### `check` Command
The `check` command ensures consistency between your `.sql` files and the generated code. It is particularly useful for Continuous Integration (CI) pipelines or when validating changes in your project.
If discrepancies are found, Squirrel will report the files that need to be updated. You can regenerate the code using the default command:
```bash
gleam run -m squirrel
```
#### Example usage:

```bash
gleam run -m squirrel check
```

### Talking to the database

In order to understand the type of your queries, Squirrel needs to connect to
Expand Down

0 comments on commit 6f9cc33

Please sign in to comment.