odata

package
v0.0.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 8, 2022 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// Ascendent Order
	Ascendent = "asc"
	// Descendent Order
	Descendent = "desc"
)
View Source
const (
	Select      = "$select"
	Top         = "$top"
	Skip        = "$skip"
	Count       = "$count"
	OrderBy     = "$orderby"
	InlineCount = "$inlinecount"
	Filter      = "$filter"
)

OData keywords

Variables

View Source
var ErrInvalidOrderBy = errors.New("second value in orderby needs to be asc or desc")
View Source
var ErrToManyOrderByStatements = errors.New("cannot have more than 2 items in orderby query")

Functions

func ParseURLValues

func ParseURLValues(query url.Values) (map[string]interface{}, error)

ParseURLValues parses url values in odata format into a map of interfaces for the DB adapters to translate

Types

type OrderItem

type OrderItem struct {
	Field string
	Order string
}

OrderItem holds order key information

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL