class Google::Cloud::Bigquery::Dataset::Updater

Yielded to a block to accumulate changes for a create request. See {Project#create_dataset}.

Attributes

updates[R]

@private A list of attributes that were updated.

Public Class Methods

new(gapi) click to toggle source

@private Create an Updater object.

Calls superclass method Google::Cloud::Bigquery::Dataset::new
# File lib/google/cloud/bigquery/dataset.rb, line 2842
def initialize gapi
  super()
  @updates = []
  @gapi = gapi
end

Public Instance Methods

access() { |access| ... } click to toggle source
# File lib/google/cloud/bigquery/dataset.rb, line 2848
def access
  # TODO: make sure to call ensure_full_data! on Dataset#update
  @access ||= Access.from_gapi @gapi
  if block_given?
    yield @access
    check_for_mutated_access!
  end
  # Same as Dataset#access, but not frozen
  @access
end
check_for_mutated_access!() click to toggle source

@private Make sure any access changes are saved

# File lib/google/cloud/bigquery/dataset.rb, line 2968
def check_for_mutated_access!
  return if @access.nil?
  return unless @access.changed?
  @gapi.update! access: @access.to_gapi
  patch_gapi! :access
end
create_materialized_view(*) click to toggle source

@raise [RuntimeError] not implemented

# File lib/google/cloud/bigquery/dataset.rb, line 2881
def create_materialized_view(*)
  raise "not implemented in #{self.class}"
end
create_routine(*) click to toggle source

@raise [RuntimeError] not implemented

# File lib/google/cloud/bigquery/dataset.rb, line 2911
def create_routine(*)
  raise "not implemented in #{self.class}"
end
create_table(*) click to toggle source

@raise [RuntimeError] not implemented

# File lib/google/cloud/bigquery/dataset.rb, line 2869
def create_table(*)
  raise "not implemented in #{self.class}"
end
create_view(*) click to toggle source

@raise [RuntimeError] not implemented

# File lib/google/cloud/bigquery/dataset.rb, line 2875
def create_view(*)
  raise "not implemented in #{self.class}"
end
delete(*) click to toggle source

@raise [RuntimeError] not implemented

# File lib/google/cloud/bigquery/dataset.rb, line 2863
def delete(*)
  raise "not implemented in #{self.class}"
end
external(*) click to toggle source

@raise [RuntimeError] not implemented

# File lib/google/cloud/bigquery/dataset.rb, line 2941
def external(*)
  raise "not implemented in #{self.class}"
end
load(*) click to toggle source

@raise [RuntimeError] not implemented

# File lib/google/cloud/bigquery/dataset.rb, line 2953
def load(*)
  raise "not implemented in #{self.class}"
end
load_job(*) click to toggle source

@raise [RuntimeError] not implemented

# File lib/google/cloud/bigquery/dataset.rb, line 2947
def load_job(*)
  raise "not implemented in #{self.class}"
end
model(*) click to toggle source

@raise [RuntimeError] not implemented

# File lib/google/cloud/bigquery/dataset.rb, line 2899
def model(*)
  raise "not implemented in #{self.class}"
end
models(*) click to toggle source

@raise [RuntimeError] not implemented

# File lib/google/cloud/bigquery/dataset.rb, line 2905
def models(*)
  raise "not implemented in #{self.class}"
end
query(*) click to toggle source

@raise [RuntimeError] not implemented

# File lib/google/cloud/bigquery/dataset.rb, line 2935
def query(*)
  raise "not implemented in #{self.class}"
end
query_job(*) click to toggle source

@raise [RuntimeError] not implemented

# File lib/google/cloud/bigquery/dataset.rb, line 2929
def query_job(*)
  raise "not implemented in #{self.class}"
end
refresh!()
Alias for: reload!
reload!() click to toggle source

@raise [RuntimeError] not implemented

# File lib/google/cloud/bigquery/dataset.rb, line 2959
def reload!
  raise "not implemented in #{self.class}"
end
Also aliased as: refresh!
routine(*) click to toggle source

@raise [RuntimeError] not implemented

# File lib/google/cloud/bigquery/dataset.rb, line 2917
def routine(*)
  raise "not implemented in #{self.class}"
end
routines(*) click to toggle source

@raise [RuntimeError] not implemented

# File lib/google/cloud/bigquery/dataset.rb, line 2923
def routines(*)
  raise "not implemented in #{self.class}"
end
table(*) click to toggle source

@raise [RuntimeError] not implemented

# File lib/google/cloud/bigquery/dataset.rb, line 2887
def table(*)
  raise "not implemented in #{self.class}"
end
tables(*) click to toggle source

@raise [RuntimeError] not implemented

# File lib/google/cloud/bigquery/dataset.rb, line 2893
def tables(*)
  raise "not implemented in #{self.class}"
end
to_gapi() click to toggle source

@private

# File lib/google/cloud/bigquery/dataset.rb, line 2977
def to_gapi
  check_for_mutated_access!
  @gapi
end

Protected Instance Methods

patch_gapi!(attribute) click to toggle source

Queue up all the updates instead of making them.

# File lib/google/cloud/bigquery/dataset.rb, line 2986
def patch_gapi! attribute
  @updates << attribute
  @updates.uniq!
end