Tangram::Type(3pm) | User Contributed Perl Documentation | Tangram::Type(3pm) |
Tangram::Type - mapping individual fields
Tangram's persistent type system is extensible, allowing you to mount your own types and make them persistent. All you have to do is to register your type and provide mapping code. See Tangram::Type::Extending.
Tangram comes with built-in support for the following types:
"string", "int", "real": see Tangram::Type::Scalar
"date", "time", "datetime", "dmdatetime": see "Date/Type/Date/DateTime" in Tangram::Type
"storable": see Tangram::Type::Dump::Storable. Very much like "perl_dump", but implemented via the `Storable' serialisation engine.
"yaml": see Tangram::Type::Dump::YAML. Very much like "perl_dump", but implemented via the `YAML' serialisation engine. Doesn't currently work, due to inadequacies in the current Perl YAML implementation.
NEW in Tangram 2.08:
"idbif": see Tangram::Type::Dump::Any. Like the above, but can combine multiple object properties into a single database column.
"flat_array": see "Array/Scalar" in Tangram::Type
"flat_hash": see "Hash/Scalar" in Tangram::Type
In Perl space, these collections are represented via the Set::Object module. Sets may not have duplicate elements, and cannot contain undef values.
"set": see Tangram::Type::Set::FromMany (implementing an unordered N to N relationship, with all objects sharing a common base class)
"iset": see Tangram::Type::Set::FromOne (implementing an unordered 1 to N relationship, with all objects sharing a common base class)
"array" : see Tangram::Type::Array::FromMany (implementing an ordered N to N relationship, with all objects sharing a common base class)
"iarray": see Tangram::Type::Array::FromOne (implementing an ordered 1 to N relationship, with all objects sharing a common base class)
"hash" : see Tangram::Type::Hash::FromMany (implementing a keyed N to N relationship, with all objects sharing a common base class)
"ihash": see Tangram::Type::Hash::FromOne (implementing a keyed 1 to N relationship, with all objects sharing a common base class)
2017-08-01 | perl v5.26.0 |