Skip to content

Conversation

lwnmengjing
Copy link
Member

Description

Checklist

  • the pull request title describes what this PR does (not a vague title like Update index.md)
  • the pull request targets the default branch of the repository (main)
  • no unintentional fmt.Print left behind after debugging
  • did I name variables, methods and classes according to the naming rules? (https://go.dev/doc/effective_go#names)
  • caught exceptions or throw them to the upper level for processing, not ignored (https://go.dev/doc/effective_go#errors)
  • did I explain all possible solutions and why I chose the one I did?
  • added any comments to make new functions clearer
  • tests are added for the changes I made (if any source code was modified)
  • documentation added or updated
  • I have run the project locally and verified that there are no errors
  • instructions for how reviewers can test the code locally
  • screenshot of the feature/bug fix (if applicable)

Copy link

@Copilot 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 driver handling in the database configuration and improves SQL query column formatting. The changes aim to fix issues related to driver assignment and ensure proper column qualification in SQL queries.

  • Sets the global driver variable in the gorms package based on database configuration
  • Reorders column formatting logic to ensure proper table qualification when table names are present

Reviewed Changes

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

File Description
pkg/config/gormdb/gorm.go Adds driver assignment logic to set the global gorms.Driver variable based on configuration
pkg/search/gorms/query.go Reorders column formatting to ensure table prefix is applied correctly when table names are specified

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@lwnmengjing lwnmengjing merged commit ec8403e into main Aug 14, 2025
4 checks passed
@lwnmengjing lwnmengjing deleted the fix/search branch August 14, 2025 01:54
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.

2 participants