Class: GcDatastore::Datastore

Inherits:
Object
  • Object
show all
Defined in:
lib/gc_datastore/datastore.rb

Instance Method Summary collapse

Constructor Details

#initialize(remoteRpc, datastore) ⇒ Datastore

Returns a new instance of Datastore.



3
4
5
6
# File 'lib/gc_datastore/datastore.rb', line 3

def initialize(remoteRpc, datastore)
  @remoteRpc = remoteRpc
  @datastore = datastore
end

Instance Method Details

#allocateIds(body_object = {}) ⇒ Object



8
9
10
# File 'lib/gc_datastore/datastore.rb', line 8

def allocateIds(body_object={})
  @remoteRpc.call(@datastore.datasets.allocate_ids, body_object)
end

#beginTransaction(body_object = {}) ⇒ Object



12
13
14
# File 'lib/gc_datastore/datastore.rb', line 12

def beginTransaction(body_object={})
  @remoteRpc.call(@datastore.datasets.begin_transaction, body_object)
end

#commit(body_object = {}) ⇒ Object



16
17
18
# File 'lib/gc_datastore/datastore.rb', line 16

def commit(body_object={})
  @remoteRpc.call(@datastore.datasets.commit, body_object)
end

#lookup(body_object = {}) ⇒ Object



20
21
22
# File 'lib/gc_datastore/datastore.rb', line 20

def lookup(body_object={})
  @remoteRpc.call(@datastore.datasets.lookup, body_object)
end

#rollback(body_object = {}) ⇒ Object



24
25
26
# File 'lib/gc_datastore/datastore.rb', line 24

def rollback(body_object={})
  @remoteRpc.call(@datastore.datasets.rollback, body_object)
end

#runQuery(body_object = {}) ⇒ Object



28
29
30
# File 'lib/gc_datastore/datastore.rb', line 28

def runQuery(body_object={})
  @remoteRpc.call(@datastore.datasets.run_quert, body_object)
end