Help for this page

Select Code to Download


  1. or download this
    use Rose::DB;
    
    Rose::DB->register_db
    ...
    $a->[2]++;
    
    $f = $db->format_array($a); # '{2,"four",7}'
    
  2. or download this
    CREATE TABLE mywidgets
    (
    ...
      name  VARCHAR(255) NOT NULL,
      nums  INT[]
    );
    
  3. or download this
    package MyWidget;
    use base 'Rose::DB::Object';
    ...
    MyWidget->meta->initialize;
    
    1;
    
  4. or download this
    $n = MyWidget->new(name => 'Sprocket',
                       nums => [ 2, 4, 6, 8 ]);
    ...
    $n2->load;
    
    print $n2->nums->[1]; # 4