|
NAMEDBIx::Lite::RowVERSIONversion 0.33OVERVIEWThis 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). If a column does not exist, calling its method will die with an exception (use get if you want to handle this gracefully). my $book = $dbix->table('books')->find({ id => 10 }); print $book->title; print $book->author->name; hashrefThis method returns a hashref containing column values.my $hashref = $book->hashref; print "$_ = $hashref->{$_}\n" for keys %$hashref; getThis method accepts a column names and returns its value. If the column does not exist, it returns undef.print $book->get('title'); updateThis 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. deleteThis 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. insert_relatedThis 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' }); dbThis method returns the DBIx::Lite object from which this record was retrieved.AUTHORAlessandro Ranellucci <aar@cpan.org>COPYRIGHT AND LICENSEThis software is copyright (c) 2021 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.
Visit the GSP FreeBSD Man Page Interface. |