Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterQuery ¶
func FilterQuery(baseQuery string, filters map[string][]string, model interface{}) (string, map[string]interface{}, error)
FilterQuery takes a base query (something like "SELECT * FROM resumes") and adds WHERE conditions based on the filters The model must be a struct with "db" tags for each field that can be filtered The filters must map a key matching the "db" tag of the model to a list of filter strings (format of URL query params) Returns the final query string and query arguments that can be used by a NamedQuery
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.