Module: Google::Cloud
- Defined in:
- lib/google-cloud-spanner.rb,
lib/google/cloud/spanner.rb,
lib/google/cloud/spanner/data.rb,
lib/google/cloud/spanner/pool.rb,
lib/google/cloud/spanner/range.rb,
lib/google/cloud/spanner/client.rb,
lib/google/cloud/spanner/commit.rb,
lib/google/cloud/spanner/errors.rb,
lib/google/cloud/spanner/fields.rb,
lib/google/cloud/spanner/policy.rb,
lib/google/cloud/spanner/convert.rb,
lib/google/cloud/spanner/project.rb,
lib/google/cloud/spanner/results.rb,
lib/google/cloud/spanner/service.rb,
lib/google/cloud/spanner/session.rb,
lib/google/cloud/spanner/version.rb,
lib/google/cloud/spanner/database.rb,
lib/google/cloud/spanner/instance.rb,
lib/google/cloud/spanner/snapshot.rb,
lib/google/cloud/spanner/credentials.rb,
lib/google/cloud/spanner/transaction.rb,
lib/google/cloud/spanner/database/job.rb,
lib/google/cloud/spanner/instance/job.rb,
lib/google/cloud/spanner/database/list.rb,
lib/google/cloud/spanner/instance/list.rb,
lib/google/cloud/spanner/instance/config.rb,
lib/google/cloud/spanner/v1/spanner_client.rb,
lib/google/cloud/spanner/instance/config/list.rb,
lib/google/cloud/spanner/admin/database/v1/database_admin_client.rb,
lib/google/cloud/spanner/admin/instance/v1/instance_admin_client.rb
Defined Under Namespace
Modules: Spanner
Class Method Summary collapse
-
.spanner(project = nil, keyfile = nil, scope: nil, timeout: nil, client_config: nil) ⇒ Google::Cloud::Spanner::Project
Creates a new object for connecting to the Spanner service.
Instance Method Summary collapse
-
#spanner(scope: nil, timeout: nil, client_config: nil) ⇒ Google::Cloud::Spanner::Project
Creates a new object for connecting to the Spanner service.
Class Method Details
.spanner(project = nil, keyfile = nil, scope: nil, timeout: nil, client_config: nil) ⇒ Google::Cloud::Spanner::Project
Creates a new object for connecting to the Spanner service. Each call creates a new connection.
For more information on connecting to Google Cloud see the Authentication Guide.
98 99 100 101 102 103 104 |
# File 'lib/google-cloud-spanner.rb', line 98 def self.spanner project = nil, keyfile = nil, scope: nil, timeout: nil, client_config: nil require "google/cloud/spanner" Google::Cloud::Spanner.new project: project, keyfile: keyfile, scope: scope, timeout: timeout, client_config: client_config end |
Instance Method Details
#spanner(scope: nil, timeout: nil, client_config: nil) ⇒ Google::Cloud::Spanner::Project
Creates a new object for connecting to the Spanner service. Each call creates a new connection.
For more information on connecting to Google Cloud see the Authentication Guide.
61 62 63 64 65 |
# File 'lib/google-cloud-spanner.rb', line 61 def spanner scope: nil, timeout: nil, client_config: nil Google::Cloud.spanner @project, @keyfile, scope: scope, timeout: (timeout || @timeout), client_config: client_config end |