Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddFilterToQuery ¶
func AddFilterToQuery(f *humamw.FilterGroup, whereToColumnMap map[string]string, orderToColumnMap map[string]string, query string, params []any) (string, []any, error)
Injects the filter (WHERE and ORDER BY) to the query.
If the column being filtered by is not present in the filterToColumnMap but is present in the filter definition in the middleware, no error will happen. This is because you may want to apply specific filters in a query, and other filters in other queries.
Note: May fail if the query has a JOIN, and does not have a WHERE clause. This can be botched by adding a WHERE TRUE clause, or, if you feel like it, editing string manipulation code to contemplate that case.
func IndexInMainQuery ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.