MCPcopy
hub / github.com/cayleygraph/cayley / Execute

Function Execute

query/session.go:144–151  ·  view source on GitHub ↗

Execute runs the query in a given language and returns an iterator over the results. Type of results depends on Collation. See Options for details.

(ctx context.Context, qs graph.QuadStore, lang, query string, opt Options)

Source from the content-addressed store, hash-verified

142// Execute runs the query in a given language and returns an iterator over the results.
143// Type of results depends on Collation. See Options for details.
144func Execute(ctx context.Context, qs graph.QuadStore, lang, query string, opt Options) (Iterator, error) {
145 l := GetLanguage(lang)
146 if l == nil {
147 return nil, fmt.Errorf("unsupported language: %q", lang)
148 }
149 sess := l.Session(qs)
150 return sess.Execute(ctx, query, opt)
151}

Callers 1

NewQueryCmdFunction · 0.92

Calls 3

GetLanguageFunction · 0.85
ErrorfMethod · 0.65
ExecuteMethod · 0.65

Tested by

no test coverage detected