Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultSortColumn = "id"
Functions ¶
func WriteQuery ¶
func WriteQuery(parameters Parameters) (query, countQuery string, args []interface{})
WriteQuery generates a SQL query for paginated results and a count query based on the provided filters, sorting, and pagination parameters. It constructs a SELECT query with conditions for filtering, ordering, pagination (LIMIT and OFFSET) and a COUNT query for the total number of records.
Types ¶
Click to show internal directories.
Click to hide internal directories.