We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
As part of supporting aggregate functions add support for following functions:
MIN() MAX()
Add min and max tag that can be used in selectClause structs as follows:
min
max
selectClause
type TestSoqlStruct struct { SelectClause NestedStruct `soql:"selectClause,tableName= Contact"` GroupBy []string `soql:"groupByClause"` } type NestedStruct struct { FirstName string `soql:"selectColumn,fieldName=FirstName"` LastName string `soql:"selectColumn,fieldName=LastName"` Count int `soql:"min,fieldName= CreatedDate"` } soqlStruct := TestSoqlStruct{ GroupBy: []string{"FirstName", "LastName"}, } soqlQuery, err := Marshal(soqlStruct) if err != nil { fmt.Printf("Error in marshaling: %s\n", err.Error()) } fmt.Println(soqlQuery)
This should result in SOQL as follows
SELECT FirstName, LastName, MIN(CreatedDate) FROM Contact GROUP BY FirstName, LastName'
Note that if fieldName is not specified then return ErrInvalidTag.
fieldName
ErrInvalidTag
Same should apply for max tag as well.
Allow min and max to be used only for supported primitive data types
The text was updated successfully, but these errors were encountered:
No branches or pull requests
As part of supporting aggregate functions add support for following functions:
Add
min
andmax
tag that can be used inselectClause
structs as follows:This should result in SOQL as follows
Note that if
fieldName
is not specified then returnErrInvalidTag
.Same should apply for
max
tag as well.Allow
min
andmax
to be used only for supported primitive data typesThe text was updated successfully, but these errors were encountered: