Documentation ¶
Overview ¶
Package query defines the graph session interface general to all query languages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrParseMore = errors.New("query: more input required")
Functions ¶
func Languages ¶ added in v0.6.0
func Languages() []string
Languages returns names of registered query languages.
func RegisterLanguage ¶ added in v0.6.0
func RegisterLanguage(lang Language)
RegisterLanguage register a new query language.
Types ¶
type Language ¶ added in v0.6.0
type Language struct { Name string Session func(graph.QuadStore) Session REPL func(graph.QuadStore) REPLSession HTTP func(graph.QuadStore) HTTP HTTPQuery func(ctx context.Context, qs graph.QuadStore, w ResponseWriter, r io.Reader) HTTPError func(w ResponseWriter, err error) }
Language is a description of query language.
func GetLanguage ¶ added in v0.6.0
GetLanguage returns a query language description. It returns nil if language was not registered.
type REPLSession ¶ added in v0.6.0
type ResponseWriter ¶ added in v0.6.0
ResponseWriter is a subset of http.ResponseWriter
type Result ¶ added in v0.6.0
type Result interface { Result() interface{} Err() error }
func ErrorResult ¶ added in v0.6.0
Click to show internal directories.
Click to hide internal directories.