NAME

DBIx::Lite::Row

VERSION

version 0.20

OVERVIEW

This class is not supposed to be instantiated manually. You usually get your first Result objects by calling one of retrieval methods on a DBIx::Lite::ResultSet object.

Accessor methods will be provided automatically for all retrieved columns and for related tables (see docs for DBIx::Lite::Schema).

my $book = $dbix->table('books')->find({ id => 10 });
print $book->title;
print $book->author->name;

hashref

This method returns a hashref containing column values.

my $hashref = $book->hashref;
print "$_ = $hashref->{$_}\n" for keys %$hashref;

update

This method is only available if you specified a primary key for the table (see docs for DBIx::Lite::Schema).

It accepts a hashref of column values and it will perform a SQL UPDATE command.

delete

This method is only available if you specified a primary key for the table (see docs for DBIx::Lite::Schema).

It will perform a SQL DELETE command.

This method is only available if you specified a primary key for the table (see docs for DBIx::Lite::Schema).

It accepts the name of the relted column you want to insert into, and a hashref of the column values to pass to the INSERT command. It will return the inserted object.

$dbix->schema->one_to_many('authors.id' => 'books.author_id');
my $book = $author->insert_related('books', { title => 'Camel Tales' });

AUTHOR

Alessandro Ranellucci <aar@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2015 by Alessandro Ranellucci.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.