GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
DBIx::Lite::Row(3) User Contributed Perl Documentation DBIx::Lite::Row(3)

DBIx::Lite::Row

version 0.33

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). 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;

This method returns a hashref containing column values.

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

This method accepts a column names and returns its value. If the column does not exist, it returns undef.

    print $book->get('title');

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.

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' });

This method returns the DBIx::Lite object from which this record was retrieved.

Alessandro Ranellucci <aar@cpan.org>

This 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.

2021-09-07 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.