feat: implement CompileJsonColumnsUpdate#53
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
Adds support for compiling JSON column updates via a new CompileJsonColumnsUpdate method, resolving issues #712 and #713.
- Imports the database helper alias and integrates it into JSON update expressions
- Implements
CompileJsonColumnsUpdateto transform JSON path update keys intojsonb_setcalls - Returns a map of compiled assignments or an error
Comments suppressed due to low confidence (3)
grammar.go:303
- [nitpick] Add a doc comment above
CompileJsonColumnsUpdatedescribing its purpose, parameters, and return values to improve readability and maintainability.
func (r *Grammar) CompileJsonColumnsUpdate(values map[string]any) (map[string]any, error) {
grammar.go:303
- There are no tests covering
CompileJsonColumnsUpdate. Please add unit tests to verify JSON-path update behavior and edge cases.
func (r *Grammar) CompileJsonColumnsUpdate(values map[string]any) (map[string]any, error) {
grammar.go:310
- The
stringspackage is used here but not imported; addimport "strings"to the imports block to prevent a compile error.
if strings.Contains(key, "->") {
b2d5d7b to
176a903
Compare
176a903 to
4ce15a8
Compare
4ce15a8 to
ddb66f1
Compare
hwbrzzl
reviewed
Jun 25, 2025
d4f8393 to
b3b6510
Compare
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.
📑 Description
Resolve goravel/goravel#712
Resolve goravel/goravel#713
Related goravel/framework#1092
✅ Checks