feat(gdb/gdb_model_lock.go): gdb support lock update skip locked#4607
Merged
hailaz merged 7 commits intogogf:masterfrom Jan 15, 2026
Merged
feat(gdb/gdb_model_lock.go): gdb support lock update skip locked#4607hailaz merged 7 commits intogogf:masterfrom
hailaz merged 7 commits intogogf:masterfrom
Conversation
当不同数据库存在相同表名和相同字段名, 并且该字段存在约束时, 例如字段类型是JSON, 会出现字段叠加. 导致访问数据库时, 出现数组越界.
…eFields fix:修复mysql不同数据库下相同表名相同字段名出现字段叠加的问题
Contributor
Author
|
Mariadb 10+ 和 MySQL 8+ 支持的特性 |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds support for the "FOR UPDATE SKIP LOCKED" SQL syntax to the GDB ORM library, providing better row-level locking capabilities across multiple database systems.
Changes:
- Added 32 new lock clause constants covering PostgreSQL, MySQL, Oracle, and SQL Server locking syntaxes
- Introduced new generic
Lock()method with comprehensive database-specific documentation - Added new
LockUpdateSkipLocked()convenience method - Refactored existing
LockUpdate()andLockShared()methods to use constants instead of hardcoded strings
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
hailaz
approved these changes
Jan 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat(gdb/gdb_model_lock.go): GDB 支持 FOR UPDATE SKIP LOCKED 语法