Documentation ¶
Index ¶
Constants ¶
View Source
const ( MaxQueryLen = 255 MaxResults = 150 DefaultMaxResults = 15 )
Shared configuration for search methods.
Variables ¶
This section is empty.
Functions ¶
func Escape ¶
Escape will escape a search string for use with the Postgres `like` and `ilike` operators.
func ParseCursor ¶
ParseCursor will parse the data held in cursor c into the passed state object.
func RenderQuery ¶
func RenderQuery(ctx context.Context, tmpl *template.Template, data RenderData) (query string, args []interface{}, err error)
RenderQuery will render a search query with the given template and data. Named args in the format `:name:` will be replaced with the appropriate numbered args (e.g. `$1`, `$2`)
Types ¶
type RenderData ¶
RenderData is used as the data for a template with the ability to output a list of all possible arguments.
Click to show internal directories.
Click to hide internal directories.