Skip to content

Conversation

@rck109d
Copy link
Collaborator

@rck109d rck109d commented Mar 4, 2025

No description provided.

@rck109d rck109d requested a review from Copilot March 4, 2025 20:38
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.

PR Overview

This PR adds support for a "noupdate" field tag to exclude certain columns from update operations. It updates the table schema and model definitions, enhances tag parsing in the reflection logic, and adds corresponding test cases.

Reviewed Changes

File Description
db_test.go Adds a "created_at" column with the noupdate tag and updates the VersionedUser tests accordingly.
reflect_test.go Extends test cases for tag parsing to include the noupdate flag, although with a minor error message issue.
reflect.go Updates tag parsing to support "noupdate" and adjusts internal structures accordingly.
db.go Modifies update planning to skip columns marked with the noupdate flag.

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

Comments suppressed due to low confidence (1)

reflect_test.go:185

  • The error message for the noupdate flag is incorrect, referencing 'optlock' instead of 'noupdate'. Please update the message to accurately describe the expected value.
t.Errorf("%s: expected optlock '%t', actual '%t'", c.tag, c.noupdate, noupdate)

@rck109d rck109d force-pushed the field_tag_noupdate branch from 43ef7aa to 81462ee Compare March 4, 2025 20:41
@rck109d rck109d merged commit 7a90153 into master Mar 4, 2025
1 check passed
@rck109d rck109d deleted the field_tag_noupdate branch March 4, 2025 21:04
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