-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Open
Labels
type:questiongeneral questionsgeneral questions
Description
Your Question
I'd like to be able to use this query
db.Where(`jobs.playbook_backup @? '$.nodes.* ? (@.name=="@actionName") ? (@.type=="action")'`, sql.Named("actionName", pj.NodesActionName))But between the ? needing to be escaped, and the named argument not working, I don't really know what are my options without defacing the query with endless gorm.Expr() while keeping it secure with a prepared statement (and not injecting the value directly).
Is it possible to disable the ? placeholder completely for a given clause maybe?
The document you expected this should be explained
https://gorm.io/docs/advanced_query.html#Named-Argument
Expected answer
How to make this query work.
Metadata
Metadata
Assignees
Labels
type:questiongeneral questionsgeneral questions