NAME

Teng::Plugin::Lookup - lookup single row.

NAME

package MyDB;
use parent qw/Teng/;
__PACKAGE__->load_plugin('Lookup');

package main;
my $db = MyDB->new(...);
$db->lookup('user' => +{id => 1}); # => get single row

DESCRIPTION

This plugin provides fast lookup row .

METHODS

$row = $db->lookup($table_name, \%search_condition, [\%attr]);

lookup single row records.

Teng#single is heavy.

NOTE: Unlike Teng#single, this method returns a blank list in list context when no desired records are found.