drizzle/add-query
Source
Usage
bash
npm exec saf-workflow kickoff drizzle/add-query <path>To run this workflow automatically, tell the agent to:
- Navigate to the target package
- Run this command
- Follow the instructions until done
Checklist
When run, the workflow will:
- Copy template files and rename placeholders.
- Add parameters and results to the root types.ts file and errors to the errors.ts files.
- Implement the new query following the documentation guidelines.
- Update the group index to include the new query.
- Run
npm run typecheck - Implement the generated test file.
- Run
npm run typecheck - Run
npm run test
Help Docs
bash
Usage: npm exec saf-workflow kickoff drizzle/add-query <path>
Add a new query to a database built off the drizzle-sqlite3 package.
Arguments:
path Path of the new query (e.g. 'queries/contacts/get-by-id')
Example: "./queries/example/example-query.ts"