Class: Google::Apis::DatastoreV1beta3::DatastoreService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::DatastoreV1beta3::DatastoreService
- Defined in:
- lib/google/apis/datastore_v1beta3/service.rb
Overview
Cloud Datastore API
Accesses the schemaless NoSQL database to provide fully managed, robust, scalable storage for your application.
Constant Summary collapse
- DEFAULT_ENDPOINT_TEMPLATE =
"https://datastore.$UNIVERSE_DOMAIN$/"
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Instance Method Summary collapse
-
#allocate_project_ids(project_id, allocate_ids_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1beta3::AllocateIdsResponse
Allocates IDs for the given keys, which is useful for referencing an entity before it is inserted.
-
#begin_project_transaction(project_id, begin_transaction_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1beta3::BeginTransactionResponse
Begins a new transaction.
-
#commit_project(project_id, commit_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1beta3::CommitResponse
Commits a transaction, optionally creating, deleting or modifying some entities.
-
#initialize ⇒ DatastoreService
constructor
A new instance of DatastoreService.
-
#lookup_project(project_id, lookup_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1beta3::LookupResponse
Looks up entities by key.
-
#reserve_project_ids(project_id, reserve_ids_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1beta3::ReserveIdsResponse
Prevents the supplied keys' IDs from being auto-allocated by Cloud Datastore.
-
#rollback_project(project_id, rollback_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1beta3::RollbackResponse
Rolls back a transaction.
-
#run_project_aggregation_query(project_id, run_aggregation_query_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1beta3::RunAggregationQueryResponse
Runs an aggregation query.
-
#run_project_query(project_id, run_query_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1beta3::RunQueryResponse
Queries for entities.
Constructor Details
#initialize ⇒ DatastoreService
Returns a new instance of DatastoreService.
48 49 50 51 52 53 |
# File 'lib/google/apis/datastore_v1beta3/service.rb', line 48 def initialize super(DEFAULT_ENDPOINT_TEMPLATE, '', client_name: 'google-apis-datastore_v1beta3', client_version: Google::Apis::DatastoreV1beta3::GEM_VERSION) @batch_path = 'batch' end |
Instance Attribute Details
#key ⇒ String
Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
41 42 43 |
# File 'lib/google/apis/datastore_v1beta3/service.rb', line 41 def key @key end |
#quota_user ⇒ String
Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
46 47 48 |
# File 'lib/google/apis/datastore_v1beta3/service.rb', line 46 def quota_user @quota_user end |
Instance Method Details
#allocate_project_ids(project_id, allocate_ids_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1beta3::AllocateIdsResponse
Allocates IDs for the given keys, which is useful for referencing an entity before it is inserted.
77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/google/apis/datastore_v1beta3/service.rb', line 77 def allocate_project_ids(project_id, allocate_ids_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta3/projects/{projectId}:allocateIds', ) command.request_representation = Google::Apis::DatastoreV1beta3::AllocateIdsRequest::Representation command.request_object = allocate_ids_request_object command.response_representation = Google::Apis::DatastoreV1beta3::AllocateIdsResponse::Representation command.response_class = Google::Apis::DatastoreV1beta3::AllocateIdsResponse command.params['projectId'] = project_id unless project_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#begin_project_transaction(project_id, begin_transaction_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1beta3::BeginTransactionResponse
Begins a new transaction.
110 111 112 113 114 115 116 117 118 119 120 |
# File 'lib/google/apis/datastore_v1beta3/service.rb', line 110 def begin_project_transaction(project_id, begin_transaction_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta3/projects/{projectId}:beginTransaction', ) command.request_representation = Google::Apis::DatastoreV1beta3::BeginTransactionRequest::Representation command.request_object = begin_transaction_request_object command.response_representation = Google::Apis::DatastoreV1beta3::BeginTransactionResponse::Representation command.response_class = Google::Apis::DatastoreV1beta3::BeginTransactionResponse command.params['projectId'] = project_id unless project_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#commit_project(project_id, commit_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1beta3::CommitResponse
Commits a transaction, optionally creating, deleting or modifying some entities.
144 145 146 147 148 149 150 151 152 153 154 |
# File 'lib/google/apis/datastore_v1beta3/service.rb', line 144 def commit_project(project_id, commit_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta3/projects/{projectId}:commit', ) command.request_representation = Google::Apis::DatastoreV1beta3::CommitRequest::Representation command.request_object = commit_request_object command.response_representation = Google::Apis::DatastoreV1beta3::CommitResponse::Representation command.response_class = Google::Apis::DatastoreV1beta3::CommitResponse command.params['projectId'] = project_id unless project_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#lookup_project(project_id, lookup_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1beta3::LookupResponse
Looks up entities by key.
177 178 179 180 181 182 183 184 185 186 187 |
# File 'lib/google/apis/datastore_v1beta3/service.rb', line 177 def lookup_project(project_id, lookup_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta3/projects/{projectId}:lookup', ) command.request_representation = Google::Apis::DatastoreV1beta3::LookupRequest::Representation command.request_object = lookup_request_object command.response_representation = Google::Apis::DatastoreV1beta3::LookupResponse::Representation command.response_class = Google::Apis::DatastoreV1beta3::LookupResponse command.params['projectId'] = project_id unless project_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#reserve_project_ids(project_id, reserve_ids_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1beta3::ReserveIdsResponse
Prevents the supplied keys' IDs from being auto-allocated by Cloud Datastore.
210 211 212 213 214 215 216 217 218 219 220 |
# File 'lib/google/apis/datastore_v1beta3/service.rb', line 210 def reserve_project_ids(project_id, reserve_ids_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta3/projects/{projectId}:reserveIds', ) command.request_representation = Google::Apis::DatastoreV1beta3::ReserveIdsRequest::Representation command.request_object = reserve_ids_request_object command.response_representation = Google::Apis::DatastoreV1beta3::ReserveIdsResponse::Representation command.response_class = Google::Apis::DatastoreV1beta3::ReserveIdsResponse command.params['projectId'] = project_id unless project_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#rollback_project(project_id, rollback_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1beta3::RollbackResponse
Rolls back a transaction.
243 244 245 246 247 248 249 250 251 252 253 |
# File 'lib/google/apis/datastore_v1beta3/service.rb', line 243 def rollback_project(project_id, rollback_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta3/projects/{projectId}:rollback', ) command.request_representation = Google::Apis::DatastoreV1beta3::RollbackRequest::Representation command.request_object = rollback_request_object command.response_representation = Google::Apis::DatastoreV1beta3::RollbackResponse::Representation command.response_class = Google::Apis::DatastoreV1beta3::RollbackResponse command.params['projectId'] = project_id unless project_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#run_project_aggregation_query(project_id, run_aggregation_query_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1beta3::RunAggregationQueryResponse
Runs an aggregation query.
276 277 278 279 280 281 282 283 284 285 286 |
# File 'lib/google/apis/datastore_v1beta3/service.rb', line 276 def run_project_aggregation_query(project_id, run_aggregation_query_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta3/projects/{projectId}:runAggregationQuery', ) command.request_representation = Google::Apis::DatastoreV1beta3::RunAggregationQueryRequest::Representation command.request_object = run_aggregation_query_request_object command.response_representation = Google::Apis::DatastoreV1beta3::RunAggregationQueryResponse::Representation command.response_class = Google::Apis::DatastoreV1beta3::RunAggregationQueryResponse command.params['projectId'] = project_id unless project_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#run_project_query(project_id, run_query_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DatastoreV1beta3::RunQueryResponse
Queries for entities.
309 310 311 312 313 314 315 316 317 318 319 |
# File 'lib/google/apis/datastore_v1beta3/service.rb', line 309 def run_project_query(project_id, run_query_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta3/projects/{projectId}:runQuery', ) command.request_representation = Google::Apis::DatastoreV1beta3::RunQueryRequest::Representation command.request_object = run_query_request_object command.response_representation = Google::Apis::DatastoreV1beta3::RunQueryResponse::Representation command.response_class = Google::Apis::DatastoreV1beta3::RunQueryResponse command.params['projectId'] = project_id unless project_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |