Sha256: 9b7125bb899bada77e472cd61e208554f2566bbfb323e4268ac96169cc7a4ddd

Contents?: true

Size: 995 Bytes

Versions: 127

Compression:

Stored size: 995 Bytes

Contents

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

require 'pg' unless defined?( PG )


class PG::Result

	# Apply a type map for all value retrieving methods.
	#
	# +type_map+: a PG::TypeMap instance.
	#
	# This method is equal to #type_map= , but returns self, so that calls can be chained.
	#
	# See also PG::BasicTypeMapForResults
	def map_types!(type_map)
		self.type_map = type_map
		return self
	end

	# Set the data type for all field name returning methods.
	#
	# +type+: a Symbol defining the field name type.
	#
	# This method is equal to #field_name_type= , but returns self, so that calls can be chained.
	def field_names_as(type)
		self.field_name_type = type
		return self
	end

	### Return a String representation of the object suitable for debugging.
	def inspect
		str = self.to_s
		str[-1,0] = if cleared?
			" cleared"
		else
			" status=#{res_status(result_status)} ntuples=#{ntuples} nfields=#{nfields} cmd_tuples=#{cmd_tuples}"
		end
		return str
	end

end # class PG::Result

Version data entries

127 entries across 127 versions & 4 rubygems

Version Path
pg-1.5.4-x86-mingw32 lib/pg/result.rb
pg-1.5.4-x64-mingw32 lib/pg/result.rb
pg-1.5.4-x64-mingw-ucrt lib/pg/result.rb
pg-1.5.4 lib/pg/result.rb
rubypitaya-3.12.5 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/pg-1.4.5/lib/pg/result.rb
pg-1.5.3-x64-mingw32 lib/pg/result.rb
pg-1.5.3-x64-mingw-ucrt lib/pg/result.rb
pg-1.5.3-x86-mingw32 lib/pg/result.rb
pg-1.5.3 lib/pg/result.rb
pg-1.5.2-x64-mingw32 lib/pg/result.rb
pg-1.5.2-x64-mingw-ucrt lib/pg/result.rb
pg-1.5.2 lib/pg/result.rb
pg-1.5.1-x86-mingw32 lib/pg/result.rb
pg-1.5.1-x64-mingw-ucrt lib/pg/result.rb
pg-1.5.1-x64-mingw32 lib/pg/result.rb
pg-1.5.1 lib/pg/result.rb
pg-1.5.0-x86-mingw32 lib/pg/result.rb
pg-1.5.0-x64-mingw-ucrt lib/pg/result.rb
pg-1.5.0-x64-mingw32 lib/pg/result.rb
pg-1.5.0 lib/pg/result.rb