querybuilder

package
v0.0.0-...-4a67c56 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2023 License: NCSA Imports: 3 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL