Atsushi Kobayashi > Teng-0.15 > Teng::Row

Download:
Teng-0.15.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source   Latest Release: Teng-0.25

NAME ^

Teng::Row - Teng's Row class

METHODS ^

$row = Teng::Row->new

create new Teng::Row's instance

$row->get_column($column_name)
    my $val = $row->get_column($column_name);

get a column value from a row object.

$row->get_columns
    my $data = $row->get_columns;

Does get_column, for all column values.

$row->set_columns(\%new_row_data)
    $row->set_columns({$col => $val});

set columns data.

$row->set_column($col => $val)
    $row->set_column($col => $val);

set column data.

$row->get_dirty_columns

returns those that have been changed.

$row->update([$arg])

update is executed for instance record.

It works by schema in which primary key exists.

    $row->update({name => 'tokuhirom'});
    # or 
    $row->set({name => 'tokuhirom'});
    $row->update;
$row->delete

delete is executed for instance record.

It works by schema in which primary key exists.

my $refetched_row = $row->refetch;

refetch record from database. get new row object.

$row->handle

get teng object.

    $row->handle->single('table', {id => 1});
syntax highlighting: