MCPcopy Create free account
hub / github.com/RedisGraph/redisgraph-go / CallProcedure

Method CallProcedure

graph.go:260–274  ·  view source on GitHub ↗

Procedures CallProcedure invokes procedure.

(procedure string, yield []string, args ...interface{})

Source from the content-addressed store, hash-verified

258
259// CallProcedure invokes procedure.
260func (g *Graph) CallProcedure(procedure string, yield []string, args ...interface{}) (*QueryResult, error) {
261 q := fmt.Sprintf("CALL %s(", procedure)
262
263 tmp := make([]string, 0, len(args))
264 for arg := range args {
265 tmp = append(tmp, ToString(arg))
266 }
267 q += fmt.Sprintf("%s)", strings.Join(tmp, ","))
268
269 if yield != nil && len(yield) > 0 {
270 q += fmt.Sprintf(" YIELD %s", strings.Join(yield, ","))
271 }
272
273 return g.Query(q)
274}
275
276// Labels, retrieves all node labels.
277func (g *Graph) Labels() []string {

Callers 3

LabelsMethod · 0.95
RelationshipTypesMethod · 0.95
PropertyKeysMethod · 0.95

Calls 2

QueryMethod · 0.95
ToStringFunction · 0.85

Tested by

no test coverage detected