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


Manual Reference Pages  -  DBIX::SKINNY::SCHEMA (3)

.ds Aq ’

NAME

DBIx::Skinny::Schema - Schema DSL for DBIx::Skinny

CONTENTS

SYNOPSIS



    package Your::Model;
    use DBIx::Skinny connect_info => +{
        dsn => dbi:SQLite:,
        username => ,
        password => ,
    };
    1;
   
    package Your::Model::Schema:
    use DBIx::Skinny::Schema;
   
    install_utf8_columns qw/name/; # for utf8 columns
   
    # set user table schema settings
    install_table user => schema {
        pk id;
        columns qw/id name created_at/;

        trigger pre_insert => callback {
            # hook
        };

        trigger pre_update => callback {
            # hook
        };

        row_class Your::Model::Row::User;
    };

    install_inflate_rule ^name$ => callback {
        inflate {
            my $value = shift;
            # inflate hook
        };
        deflate {
            my $value = shift;
            # deflate hook
        };
    };
   
    1;



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


perl v5.20.3 DBIX::SKINNY::SCHEMA (3) 2011-02-10

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