Skip to content
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

DMS: Skip primary key columns in SET clauses for UPDATE statements #18

Merged
merged 1 commit into from
Aug 16, 2024

Conversation

hammerhead
Copy link
Member

CrateDB does not allow changing primary key columns, even when setting them to their current value.

CrateDB does not allow changing primary key columns,
even when setting them to their current value.
if column_name in self.primary_keys:
continue

constraint = f"{self.DATA_COLUMN}['{column_name}'] = '{column_value}'"
Copy link
Member Author

Choose a reason for hiding this comment

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

It should be ok to wrap every column in quotes, since CrateDB already has type information for every column and will auto-cast

Copy link

codecov bot commented Aug 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (3ddb9df) to head (d38e9f7).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #18   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           21        21           
  Lines          815       823    +8     
=========================================
+ Hits           815       823    +8     
Flag Coverage Δ
mongodb 100.00% <100.00%> (ø)
vanilla 100.00% <100.00%> (ø)
zyp 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@amotl amotl left a comment

Choose a reason for hiding this comment

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

Thank you! I will run another release right away.

@amotl amotl merged commit cafa70c into crate:main Aug 16, 2024
16 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.

2 participants