Class: Google::Cloud::Spanner::Service

Inherits:
Object
  • Object
show all
Defined in:
lib/spanner_emulator_toolkit/google_cloud_spanner_ext/service.rb

Instance Method Summary collapse

Instance Method Details

#list_sessions(database:, call_options: nil, token: nil, max: nil) ⇒ Object

add a missing list_sessions method

Parameters:

  • database (String)

    in the form of a full Spanner identifier like “project/…/instance/…/database/…”



10
11
12
13
14
15
16
17
18
19
# File 'lib/spanner_emulator_toolkit/google_cloud_spanner_ext/service.rb', line 10

def list_sessions(database:, call_options: nil, token: nil, max: nil)
  opts = default_options call_options: call_options
  request = {
    database: database,
    page_size: max,
    page_token: token
  }
  paged_enum = service.list_sessions request, opts
  paged_enum.response
end