MCPcopy Create free account
hub / github.com/kataras/iris / ParseListOptions

Function ParseListOptions

_examples/database/mysql/sql/service.go:114–120  ·  view source on GitHub ↗

const defaultLimit = 30 // default limit if not set. ParseListOptions returns a `ListOptions` from a map[string][]string.

(q url.Values)

Source from the content-addressed store, hash-verified

112
113// ParseListOptions returns a `ListOptions` from a map[string][]string.
114func 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).

Callers

nothing calls this directly

Calls 1

GetMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…