Class: PG::Result
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/pg-1.4.5/lib/pg/result.rb
Instance Method Summary collapse
-
#field_names_as(type) ⇒ Object
Set the data type for all field name returning methods.
-
#inspect ⇒ Object
Return a String representation of the object suitable for debugging.
-
#map_types!(type_map) ⇒ Object
Apply a type map for all value retrieving methods.
Instance Method Details
#field_names_as(type) ⇒ Object
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.
26 27 28 29 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/pg-1.4.5/lib/pg/result.rb', line 26 def field_names_as(type) self.field_name_type = type return self end |
#inspect ⇒ Object
Return a String representation of the object suitable for debugging.
32 33 34 35 36 37 38 39 40 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/pg-1.4.5/lib/pg/result.rb', line 32 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 |
#map_types!(type_map) ⇒ Object
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
16 17 18 19 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/pg-1.4.5/lib/pg/result.rb', line 16 def map_types!(type_map) self.type_map = type_map return self end |