Module: PG::TypeMap::DefaultTypeMappable
| Relationships & Source Files | |
| Extension / Inclusion / Inheritance Descendants | |
|
Included In:
| |
| Defined in: | ext/pg_type_map.c |
Instance Attribute Summary
-
#default_type_map ⇒ TypeMap
rw
Returns the default
::PG::TypeMapthat is currently set for values that could not be casted by this type map. -
#default_type_map=(typemap)
rw
Set the default
::PG::TypeMapthat is used for values that could not be casted by this type map.
Instance Method Summary
-
#with_default_type_map(typemap)
Set the default
::PG::TypeMapthat is used for values that could not be casted by this type map.
Instance Attribute Details
#default_type_map ⇒ TypeMap (rw)
Returns the default ::PG::TypeMap that is currently set for values that could not be casted by this type map.
Returns a kind of ::PG::TypeMap.
# File 'ext/pg_type_map.c', line 153
static VALUE
pg_typemap_default_type_map_get(VALUE self)
{
t_typemap *this = RTYPEDDATA_DATA( self );
return this->default_typemap;
}
#default_type_map=(typemap) (rw)
Set the default ::PG::TypeMap that is used for values that could not be casted by this type map.
typemap must be a kind of ::PG::TypeMap
# File 'ext/pg_type_map.c', line 128
static VALUE
pg_typemap_default_type_map_set(VALUE self, VALUE typemap)
{
t_typemap *this = RTYPEDDATA_DATA( self );
t_typemap *tm;
UNUSED(tm);
rb_check_frozen(self);
/* Check type of method param */
TypedData_Get_Struct(typemap, t_typemap, &pg_typemap_type, tm);
RB_OBJ_WRITE(self, &this->default_typemap, typemap);
return typemap;
}
Instance Method Details
#with_default_type_map(typemap)
Set the default ::PG::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.
# File 'ext/pg_type_map.c', line 172
static VALUE
pg_typemap_with_default_type_map(VALUE self, VALUE typemap)
{
pg_typemap_default_type_map_set( self, typemap );
return self;
}