Data-TagDB
view release on metacpan or search on metacpan
lib/Data/TagDB.pm view on Meta::CPAN
If a open handle is passed, the same restrictions apply as for L</dbh>.
=head2 dbh
my $dbh = $db->dbh;
Returns the current L<DBI> connection.
This connection can be used to call any transaction independent method on the handle.
It can for example be used to call L<DBI/ping> to keep the connection alive.
If methods are called that depend on the state of the transaction logic
(such as performing an SELECT or UPDATE) the state of the transaction B<must> be managed via
this module. See L</begin_work>.
The same holds true for any open handle passed to L</new>. When passed the handle must
not be in any active transaction and must not be used outside this module to change the transaction
state of the handle.
It is also wise to avoid interacting with the tables managed by this module. This may result in the
lib/Data/TagDB/Tutorial.pod view on Meta::CPAN
To support transactions L<Data::TagDB/begin_work>, L<Data::TagDB/commit>, and L<Data::TagDB/rollback> are provided.
They are proxy methods for L<DBI/begin_work>, L<DBI/commit>, and L<DBI/rollback>.
=head2 Caching
Caches can be used to keep tags instances from being destroyed.
This is done by first creating a new cache:
my Data::TagDB::Cache $cache = $db->create_cache;
And then adding any tags to keep them alive:
$cache->add($tag0, $tag1, ...);
You can have any amount of caches. E.g. if the the software uses a single database connection but handles multiple requests one could
have one global cache to cache the most relevant tags, and one per request cache to cache tags relevant to the request.
One the cache is destroyed, the tags will also be released (unless otherwise in use or hold by another cache).
=head1 AUTHOR
lib/Data/TagDB/Tutorial/Conventions.pod view on Meta::CPAN
Such data is a clear sign that it is in fact an account.
Legal entities are entities that are created by legal means. Most commonly
companies. In order for them to be legal entities registration and legal
documentation is needed.
Such entities should include the role C<legal-entity> (C<f57f5e00-1d08-4731-b49b-c8316e23f06a>).
If it is unclear if a group qualifies as a legal entity (e.g. people doing something together vs.
a registered association) it is wise to only mark it as C<entity>.
Natural entities are I<living beings>.
Those include alive, dead, real, fictional, human and non-human beings.
Such subjects should have the role
C<natural-entity> AKA C<person> (C<f6249973-59a9-47e2-8314-f7cf9a5f77bf>) included in their list of roles.
In addition to the C<natural-entity> the universal tag model includes the type
C<body> (C<5501e545-f39a-4d62-9f65-792af6b0ccba>) used to record all what is related to the body of a person,
such as birthday, locations, and species.
And C<character> (C<a331f2c5-20e5-4aa2-b277-8e63fd03438d>) used to record anything about the character of a person,
such as identity, world view, and interests.
B<Note:>
( run in 0.688 second using v1.01-cache-2.11-cpan-39bf76dae61 )