query: code.soquee.net/query Index | Files

package query

import "code.soquee.net/query"

Package query is used to parse the simple query language used by Soquee.

Index

Package Files

query.go

type IssueStatus Uses

type IssueStatus int

IssueStatus represents the status of an issue (closed, open or any).

const (
    StatusAny IssueStatus = iota
    StatusClosed
    StatusOpen
)

A collection of issue statuses. Issues may be open or closed, and, in this special case "Any" which means "either of those".

type Query Uses

type Query struct {
    Status   IssueStatus
    TSVector string
    Assignee string
    Limit    int
    Labels   []string
}

Query contains the parsed query string split into fields. This struct may grow over time and the field order is not part the package stability guarantee.

TSVector is a PostgreSQL compatible full text search string. It is not guaranteed to be safe from SQL injection and should always be parameterized.

func Bytes Uses

func Bytes(q []byte) *Query

Bytes parses a query from a byte slice.

func Parse Uses

func Parse(r io.Reader) (*Query, error)

Parse parses the query string from r and returns a parsed representation.

func String Uses

func String(q string) *Query

String parses a query from a string.

Package query imports 9 packages (graph). Updated 2019-07-13. Refresh now. Tools for package owners.