Skip to content

Conversation

@daniil-pankratov
Copy link
Contributor

Hello @houqp !
Here is PR with various fixes as well as MacOS build in the pipeline :)

  • Added fix for Postgres cast operator ::;
  • Added pass-through functions support such as Rebind/Rebindx in sqlx;
  • Added Postgres CASE support;

@houqp houqp requested a review from Copilot December 12, 2025 06:10
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enhances PostgreSQL query support in sqlvet by adding CASE expression parsing, PostgreSQL cast operator (::) handling, and pass-through function support (like Rebind/Rebindx in sqlx). It also includes code quality improvements and macOS CI build support.

  • Added PostgreSQL CASE expression parsing to handle conditional logic in queries
  • Added support for pass-through functions like Rebind/Rebindx that transform query syntax
  • Fixed handling of PostgreSQL cast operator (::) by only applying named query compilation to Named* functions

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pkg/vet/vet.go Added CASE expression parsing logic to handle WHEN/THEN/ELSE clauses
pkg/vet/gosource_test.go Added tests for Rebind support and PostgreSQL cast operators, replaced deprecated ioutil calls with os functions
pkg/vet/gosource.go Implemented pass-through function detection, enhanced query string extraction, refactored to use constants, fixed error message capitalization
main.go Version bump to 1.1.11
.github/workflows/build.yml Added macOS to build matrix

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@houqp houqp merged commit c708d01 into houqp:master Dec 12, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants