const defaultLimit = 30 // default limit if not set. ParseListOptions returns a `ListOptions` from a map[string][]string.
(q url.Values)
| 112 | |
| 113 | // ParseListOptions returns a `ListOptions` from a map[string][]string. |
| 114 | func ParseListOptions(q url.Values) ListOptions { |
| 115 | offset, _ := strconv.ParseUint(q.Get("offset"), 10, 64) |
| 116 | limit, _ := strconv.ParseUint(q.Get("limit"), 10, 64) |
| 117 | order := q.Get("order") // empty, asc(...) or desc(...). |
| 118 | |
| 119 | return ListOptions{Offset: offset, Limit: limit, Order: order} |
| 120 | } |
| 121 | |
| 122 | // List binds one or more records from the database to the "dest". |
| 123 | // If the record supports ordering then it will sort by the `Sorted.OrderBy` column name(s). |
nothing calls this directly
no test coverage detected
searching dependent graphs…