Skip to content

Handle quotes while building upsert query #9412

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

mangalaman93
Copy link
Member

Fixes #9405

@Copilot Copilot AI review requested due to automatic review settings May 16, 2025 10:36
@mangalaman93 mangalaman93 requested a review from a team as a code owner May 16, 2025 10:36
@github-actions github-actions bot added area/testing Testing related issues go Pull requests that update Go code labels May 16, 2025
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 pull request addresses the handling of quotes in the upsert query and fixes issue #9405 by modifying the query string construction.

  • Updated query string formatting in edgraph/server.go to properly handle embedded quotes
  • Added a new test (TestStringWithQuote) in dgraph/cmd/alpha/upsert_test.go to validate the change

Reviewed Changes

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

File Description
edgraph/server.go Updated query string construction to escape quotes correctly
dgraph/cmd/alpha/upsert_test.go Added test to ensure quotes are handled in the upsert query correctly

Copy link

trunk-io bot commented May 16, 2025

Running Code Quality on PRs by uploading data to Trunk will soon be removed. You can still run checks on your PRs using trunk-action - see the migration guide for more information.

Copy link

trunk-io bot commented May 16, 2025

Static BadgeStatic BadgeStatic BadgeStatic Badge

Failed Test Failure Summary Logs
TestDropAllInNs Error reading from the server due to an unexpected EOF. Logs ↗︎

View Full Report ↗︎Docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/testing Testing related issues go Pull requests that update Go code
Development

Successfully merging this pull request may close these issues.

@unique doesn't work with quotes
1 participant