Describe the feature
Support escaping double quotes in struct tags.
Motivation
I have the following object and want to do a PostgreSQL full text search index on the column Name:
type Object struct {
Key uuid.UUID `gorm:"primaryKey;type:uuid;default:gen_random_uuid()"`
Name string `gorm:"not null"`
}
In SQL this would be:
CREATE INDEX idx_Object_Name ON "Object" USING GIN (to_tsvector('english', "Name"));
To do this in a GORM struct tag, I need to be able to put to_tsvector('english', "Name") with double quotes as the expression parameter. However, this doesn't seem to be supported or at least documented.
Related Issues
Describe the feature
Support escaping double quotes in struct tags.
Motivation
I have the following object and want to do a PostgreSQL full text search index on the column
Name:In SQL this would be:
To do this in a GORM struct tag, I need to be able to put
to_tsvector('english', "Name")with double quotes as theexpressionparameter. However, this doesn't seem to be supported or at least documented.Related Issues