DBIx::Lite::Row
version 0.14
This class is not supposed to be instantiated manually. You usually get your first Result objects by calling some 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;
This method returns a hashref containing column values.
my $hashref = $book->hashref; print "$_ = $hashref->{$_}\n" for keys %$hashref;
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.
UPDATE
It will perform a SQL DELETE command.
DELETE
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.
INSERT
$dbix->schema->one_to_many('authors.id' => 'books.author_id'); my $book = $author->insert_related('books', { title => 'Camel Tales' });
Alessandro Ranellucci <aar@cpan.org>
This software is copyright (c) 2012 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.
To install DBIx::Lite, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DBIx::Lite
CPAN shell
perl -MCPAN -e shell install DBIx::Lite
For more information on module installation, please visit the detailed CPAN module installation guide.