Sha256: 18dfeaab5eaae4e4a0a5f3b42362eccdf91f9963ca5efa912f5262df5f15de8e

Contents?: true

Size: 538 Bytes

Versions: 3

Compression:

Stored size: 538 Bytes

Contents

# -*- ruby -*-
# frozen_string_literal: true

require 'yugabyte_ysql' unless defined?( YugabyteYSQL )


class YugabyteYSQL::Tuple

	### Return a String representation of the object suitable for debugging.
	def inspect
		"#<#{self.class} #{self.map{|k,v| "#{k}: #{v.inspect}" }.join(", ") }>"
	end

	def has_key?(key)
		field_map.has_key?(key)
	end
	alias key? has_key?

	def keys
		field_names || field_map.keys.freeze
	end

	def each_key(&block)
		if fn=field_names
			fn.each(&block)
		else
			field_map.each_key(&block)
		end
	end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
yugabyte_ysql-0.3 lib/pg/tuple.rb
yugabyte_ysql-0.2 lib/pg/tuple.rb
yugabyte_ysql-0.1 lib/pg/tuple.rb