Zing::Lookup - Domain Lookup Table
Domain Lookup Table Construct
use Zing::Lookup; my $lookup = Zing::Lookup->new(name => 'users'); # my $domain = $lookup->set('unique-id');
This package provides an index and lookup-table for Zing::Domain data structures which provides the ability to create a collection of domains with full history of state changes.
This package inherits behaviors from:
Zing::Domain
This package uses type constraints from:
Zing::Types
This package implements the following methods:
cursor() : Cursor
The cursor method returns a Zing::Cursor object which provides the ability to page-through and traverse the lookup dataset forwards and backwards.
# given: synopsis $lookup->cursor;
del(Str $key) : Lookup
The del method deletes the Zing::Domain associated with a specific key.
# given: synopsis $lookup->del('user-12345');
# given: synopsis $lookup->set('user-12345', 'me@example.com'); $lookup->del('user-12345');
drop() : Int
The drop method returns truthy if the lookup has been destroyed. This operation does not cascade.
# given: synopsis $lookup->set('user-12345', 'me@example.com'); $lookup->drop;
# given: synopsis $lookup->set('user-12345', 'me@example.com'); $lookup->savepoint->send; $lookup->drop;
get(Str $key) : Maybe[Domain]
The get method return the Zing::Domain associated with a specific key.
# given: synopsis $lookup->get('user-12345');
# given: synopsis $lookup->set('user-12345')->set(email => 'me@example.com'); $lookup->get('user-12345');
savepoint() : Savepoint
The savepoint method returns a Zing::Savepoint object which provides the ability to save and restore large indices (lookup states). If a lookup has an associated savepoint it will be loaded automatically on object construction.
# given: synopsis $lookup->savepoint;
set(Str $key) : Domain
The set method creates a Zing::Domain association with a specific key in the lookup. The key must be unique or will overwrite any existing data.
# given: synopsis $lookup->del('user-12345'); $lookup->set('user-12345');
Al Newkirk, awncorp@cpan.org
awncorp@cpan.org
Copyright (C) 2011-2019, Al Newkirk, et al.
This is free software; you can redistribute it and/or modify it under the terms of the The Apache License, Version 2.0, as elucidated in the "license file".
Wiki
Project
Initiatives
Milestones
Contributing
Issues
To install Zing, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Zing
CPAN shell
perl -MCPAN -e shell install Zing
For more information on module installation, please visit the detailed CPAN module installation guide.