Document-class: PG::TypeMap < Object
This is the base class for type maps. See derived classes for implementations of different type cast strategies ( PG::TypeMapByColumn, PG::TypeMapByOid ).
Document-class: PG::TypeMapInRuby < PG::TypeMap
This class can be used to implement a type map in ruby, typically as a default_type_map in a type map chain.
This API is EXPERIMENTAL and could change in the future.
Returns the default TypeMap that is currently set for values that could not be casted by this type map.
Returns a kind of PG::TypeMap.
static VALUE pg_typemap_default_type_map_get(VALUE self) { t_typemap *this = DATA_PTR( self ); return this->default_typemap; }
Set the default TypeMap that is used for values that could not be casted by this type map.
typemap
must be a kind of PG::TypeMap
static VALUE pg_typemap_default_type_map_set(VALUE self, VALUE typemap) { t_typemap *this = DATA_PTR( self ); if ( !rb_obj_is_kind_of(typemap, rb_cTypeMap) ) { rb_raise( rb_eTypeError, "wrong argument type %s (expected kind of PG::TypeMap)", rb_obj_classname( typemap ) ); } Check_Type(typemap, T_DATA); this->default_typemap = typemap; return typemap; }
Set the default TypeMap that is used for values that could not be casted by this type map.
typemap
must be a kind of PG::TypeMap
Returns self.
static VALUE pg_typemap_with_default_type_map(VALUE self, VALUE typemap) { pg_typemap_default_type_map_set( self, typemap ); return self; }