class Google::Cloud::Bigquery::Dataset::Updater
Yielded to a block to accumulate changes for a create request. See {Project#create_dataset}.
Attributes
@private A list of attributes that were updated.
Public Class Methods
@private Create an Updater
object.
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
# 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
@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
@raise [RuntimeError] not implemented
# File lib/google/cloud/bigquery/dataset.rb, line 2881 def create_materialized_view(*) raise "not implemented in #{self.class}" end
@raise [RuntimeError] not implemented
# File lib/google/cloud/bigquery/dataset.rb, line 2911 def create_routine(*) raise "not implemented in #{self.class}" end
@raise [RuntimeError] not implemented
# File lib/google/cloud/bigquery/dataset.rb, line 2869 def create_table(*) raise "not implemented in #{self.class}" end
@raise [RuntimeError] not implemented
# File lib/google/cloud/bigquery/dataset.rb, line 2875 def create_view(*) raise "not implemented in #{self.class}" end
@raise [RuntimeError] not implemented
# File lib/google/cloud/bigquery/dataset.rb, line 2863 def delete(*) raise "not implemented in #{self.class}" end
@raise [RuntimeError] not implemented
# File lib/google/cloud/bigquery/dataset.rb, line 2941 def external(*) raise "not implemented in #{self.class}" end
@raise [RuntimeError] not implemented
# File lib/google/cloud/bigquery/dataset.rb, line 2953 def load(*) raise "not implemented in #{self.class}" end
@raise [RuntimeError] not implemented
# File lib/google/cloud/bigquery/dataset.rb, line 2947 def load_job(*) raise "not implemented in #{self.class}" end
@raise [RuntimeError] not implemented
# File lib/google/cloud/bigquery/dataset.rb, line 2899 def model(*) raise "not implemented in #{self.class}" end
@raise [RuntimeError] not implemented
# File lib/google/cloud/bigquery/dataset.rb, line 2905 def models(*) raise "not implemented in #{self.class}" end
@raise [RuntimeError] not implemented
# File lib/google/cloud/bigquery/dataset.rb, line 2935 def query(*) raise "not implemented in #{self.class}" end
@raise [RuntimeError] not implemented
# File lib/google/cloud/bigquery/dataset.rb, line 2929 def query_job(*) raise "not implemented in #{self.class}" end
@raise [RuntimeError] not implemented
# File lib/google/cloud/bigquery/dataset.rb, line 2959 def reload! raise "not implemented in #{self.class}" end
@raise [RuntimeError] not implemented
# File lib/google/cloud/bigquery/dataset.rb, line 2917 def routine(*) raise "not implemented in #{self.class}" end
@raise [RuntimeError] not implemented
# File lib/google/cloud/bigquery/dataset.rb, line 2923 def routines(*) raise "not implemented in #{self.class}" end
@raise [RuntimeError] not implemented
# File lib/google/cloud/bigquery/dataset.rb, line 2887 def table(*) raise "not implemented in #{self.class}" end
@raise [RuntimeError] not implemented
# File lib/google/cloud/bigquery/dataset.rb, line 2893 def tables(*) raise "not implemented in #{self.class}" end
@private
# File lib/google/cloud/bigquery/dataset.rb, line 2977 def to_gapi check_for_mutated_access! @gapi end
Protected Instance Methods
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