lib/google/cloud/bigtable/column_family_map.rb in google-cloud-bigtable-1.3.0 vs lib/google/cloud/bigtable/column_family_map.rb in google-cloud-bigtable-2.0.0

- old
+ new

@@ -209,11 +209,11 @@ gc_rule ||= positional_gc_rule if positional_gc_rule warn "The positional gc_rule argument is deprecated. Use the named gc_rule argument instead." end - column_family = Google::Bigtable::Admin::V2::ColumnFamily.new + column_family = Google::Cloud::Bigtable::Admin::V2::ColumnFamily.new column_family.gc_rule = gc_rule.to_grpc if gc_rule @column_families[name] = column_family nil end @@ -246,11 +246,11 @@ # end # def update name, gc_rule: nil raise ArgumentError, "column family #{name.inspect} does not exist" unless @column_families.has_key? name - column_family = Google::Bigtable::Admin::V2::ColumnFamily.new + column_family = Google::Cloud::Bigtable::Admin::V2::ColumnFamily.new column_family.gc_rule = gc_rule.to_grpc if gc_rule @column_families[name] = column_family nil end @@ -297,11 +297,11 @@ # # Build column family modifications for the map. # # @param comparison_map [Google::Protobuf::Map] The map to compare the # current map against for building the modification entries. - # @return [Array<Google::Bigtable::Admin::V2::ModifyColumnFamiliesRequest::Modification>] + # @return [Array<Google::Cloud::Bigtable::Admin::V2::ModifyColumnFamiliesRequest::Modification>] # def modifications comparison_map = nil comparison_map ||= empty_map created_modifications(comparison_map) + @@ -350,27 +350,27 @@ protected ## # Create an empty Google::Protobuf::Map suitable for column_families. def empty_map - Google::Bigtable::Admin::V2::Table.new.column_families + Google::Cloud::Bigtable::Admin::V2::Table.new.column_families end ## # @private # # Build column family modifications for created column families. # # @param comparison_map [Google::Protobuf::Map] The map to compare the # current map against for building the modification entries. - # @return [Array<Google::Bigtable::Admin::V2::ModifyColumnFamiliesRequest::Modification>] + # @return [Array<Google::Cloud::Bigtable::Admin::V2::ModifyColumnFamiliesRequest::Modification>] # def created_modifications comparison_map added_keys = @column_families.keys - comparison_map.keys added_keys.map do |name| - Google::Bigtable::Admin::V2::ModifyColumnFamiliesRequest:: \ + Google::Cloud::Bigtable::Admin::V2::ModifyColumnFamiliesRequest:: \ Modification.new( id: name, create: @column_families[name] ) end @@ -381,20 +381,20 @@ # # Build column family modifications for updated column families. # # @param comparison_map [Google::Protobuf::Map] The map to compare the # current map against for building the modification entries. - # @return [Array<Google::Bigtable::Admin::V2::ModifyColumnFamiliesRequest::Modification>] + # @return [Array<Google::Cloud::Bigtable::Admin::V2::ModifyColumnFamiliesRequest::Modification>] # def updated_modifications comparison_map possibly_updated_keys = @column_families.keys & comparison_map.keys updated_keys = possibly_updated_keys.reject do |name| @column_families[name] == comparison_map[name] end updated_keys.map do |name| - Google::Bigtable::Admin::V2::ModifyColumnFamiliesRequest:: \ + Google::Cloud::Bigtable::Admin::V2::ModifyColumnFamiliesRequest:: \ Modification.new( id: name, update: @column_families[name] ) end @@ -405,16 +405,16 @@ # # Build column family modifications for dropped column families. # # @param comparison_map [Google::Protobuf::Map] The map to compare the # current map against for building the modification entries. - # @return [Array<Google::Bigtable::Admin::V2::ModifyColumnFamiliesRequest::Modification>] + # @return [Array<Google::Cloud::Bigtable::Admin::V2::ModifyColumnFamiliesRequest::Modification>] # def dropped_modifications comparison_map dropped_keys = comparison_map.keys - @column_families.keys dropped_keys.map do |name| - Google::Bigtable::Admin::V2::ModifyColumnFamiliesRequest:: \ + Google::Cloud::Bigtable::Admin::V2::ModifyColumnFamiliesRequest:: \ Modification.new( id: name, drop: true ) end