Skip to content

Conversation

@kyleconroy
Copy link
Collaborator

The newest vet feature is running rules against databases hosted by us. You don't need to have PostgreSQL running locally, we'll take care of everything for you. This feature will be included in the next release as a private beta. We're still working out kinks in our infrastructure.

version: '2'
cloud:
  project: "01HAQMMECEYQYKFJN8MP16QC41"
sql:
- schema: postgresql/schema.sql
  queries: postgresql/query.sql
  engine: postgresql
  database:
    managed: true
  rules:
  - sqlc/db-prepare
rootCmd.PersistentFlags().StringP("file", "f", "", "specify an alternate config file (default: sqlc.yaml)")
rootCmd.PersistentFlags().BoolP("experimental", "x", false, "DEPRECATED: enable experimental features (default: false)")
rootCmd.PersistentFlags().Bool("no-remote", false, "disable remote execution (default: false)")
rootCmd.PersistentFlags().Bool("remote", false, "enable remote execution (default: false)")
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that vet is also using the project configuration, we can't default to remote generation. Instead, allow users to opt in with the --remote flag.

@kyleconroy kyleconroy merged commit 232d6f9 into main Sep 22, 2023
@kyleconroy kyleconroy deleted the kyle/managed-vet branch September 22, 2023 21:25
alfonsodev pushed a commit to ExponentiaTeam/sqlc that referenced this pull request Oct 13, 2025
* feat(vet): Support managed databases
* feat(vet): Run rules against a managed database
* Add managed to JSON schema
* Use different hostname for region discovery
* docs: second pass at managed-databases.md

---------

Co-authored-by: Andrew Benton <andrew@sqlc.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants