Module: Dgraph
- Defined in:
- lib/dgraph.rb,
lib/dgraph/version.rb
Overview
D-graph ruby driver
Constant Summary collapse
- VERSION =
'0.3.0'
Class Method Summary collapse
-
.alter(operation_string) ⇒ Object
Altering database schema (needed for indexing, declaring reverse edges, etc) example: Dgraph.alter(“children: uid @reverse .”).
- .mutate(query_string) ⇒ Object
- .query(query_string, vars = {}) ⇒ Object
- .stub ⇒ Object
Class Method Details
.alter(operation_string) ⇒ Object
Altering database schema (needed for indexing, declaring reverse edges, etc) example: Dgraph.alter(“children: uid @reverse .”)
19 20 21 |
# File 'lib/dgraph.rb', line 19 def self.alter(operation_string) stub.alter(Api::Operation.new(schema: operation_string)) end |
.mutate(query_string) ⇒ Object
9 10 11 |
# File 'lib/dgraph.rb', line 9 def self.mutate(query_string) stub.mutate(Api::Mutation.new(set_json: query_string, commit_now: true)) end |