Discover Packages
github.com/kahlys/alfred
package
module
Version:
v1.0.1
Opens a new window with list of versions in this module.
Published: Mar 30, 2022
License: MIT
Opens a new window with license information.
Imports: 10
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
README
¶
Expand ▾
Collapse ▴
Documentation
¶
AddToPSQLQuery add filter to a pq query.
SELECT *, count(*) OVER() FROM (<query>) AS query WHERE <filter1> ILIKE <value1> AND ... ORDER BY <sortBy> <order> LIMIT 1 OFFSET 1
Keep return true if the struct v has valid fields value according to the filter.
ToSQL return a SQL condition to be used in a SQL query : "Param <= Value".
EQ for ==
Keep return true if the struct v has valid fields value according to the filter.
ToSQL return a SQL condition to be used in a SQL query : "Param = Value".
An ErrParamType is returned when failed to convert to a certain type a value of a filter.
Filter is the interface for a simple filter for filtering result values.
Filters for filtering result values.
Keep return true if the struct v has valid fields value according to applayable filters.
GT for >
Keep return true if the struct v has valid fields value according to the filter.
ToSQL return a SQL condition to be used in a SQL query : "Param > Value".
GTE for >=
Keep return true if the struct v has valid fields value according to the filter.
ToSQL return a SQL condition to be used in a SQL query : "Param >= Value".
LT for <
Keep return true if the struct v has valid fields value according to the filter.
ToSQL return a SQL condition to be used in a SQL query : "Param < Value".
LTE for <=
Keep return true if the struct v has valid fields value according to the filter.
ToSQL return a SQL condition to be used in a SQL query : "Param <= Value".
Like filter to test if a string contains a substring.
Keep return true if the struct v has valid fields value according to the filter.
ToSQL return a SQL condition to be used in a SQL query : "Param ILIKE %Value%".
Option are filtering, sorting and pagination parameters.
ParseURLValues parse filters from url values. The format is '?filter[<>][<type>]=<value>'.
Possible type are : like, eq, gt, gte, lt, lte.
It panics if x is not a slice of structs.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.