Catalyst-Controller-DBIC-API

 view release on metacpan or  search on metacpan

t/lib/DBICTest.pm  view on Meta::CPAN

        [ qw/cdid artist title year/ ],
        [ 1, 1, "Spoonful of bees", 1999 ],
        [ 2, 1, "Forkful of bees", 2001 ],
        [ 3, 1, "Caterwaulin' Blues", 1997 ],
        [ 4, 2, "Generic Manufactured Singles", 2001 ],
        [ 5, 2, "We like girls and stuff", 2003 ],
        [ 6, 3, "Come Be Depressed With Us", 1998 ],
    ]);

    $schema->populate('Tag', [
        [ qw/tagid cd tag/ ],
        [ 1, 1, "Blue" ],
        [ 2, 2, "Blue" ],
        [ 3, 3, "Blue" ],
        [ 4, 5, "Blue" ],
        [ 5, 2, "Cheesy" ],
        [ 6, 4, "Cheesy" ],
        [ 7, 5, "Cheesy" ],
        [ 8, 2, "Shiny" ],
        [ 9, 4, "Shiny" ],
    ]);

t/lib/RestTest/Schema/Result/Tag.pm  view on Meta::CPAN

package # hide from PAUSE
    RestTest::Schema::Result::Tag;

use base qw/DBIx::Class::Core/;

__PACKAGE__->table('tags');
__PACKAGE__->add_columns(
  'tagid' => {
    data_type => 'integer',
    is_auto_increment => 1,
  },
  'cd' => {
    data_type => 'integer',
  },
  'tag' => {
    data_type => 'varchar',
    size      => 100,
  },
);
__PACKAGE__->set_primary_key('tagid');

__PACKAGE__->belongs_to( cd => 'RestTest::Schema::Result::CD' );

1;

t/lib/sqlite.sql  view on Meta::CPAN

  cd integer NOT NULL,
  position integer NOT NULL,
  title varchar(100) NULL,
  last_updated_on datetime NULL
);

--
-- Table: tags
--
CREATE TABLE tags (
  tagid INTEGER PRIMARY KEY NOT NULL,
  cd integer NOT NULL,
  tag varchar(100) NOT NULL
);

--
-- Table: producer
--
CREATE TABLE producer (
  producerid INTEGER PRIMARY KEY NOT NULL,
  name varchar(100) NOT NULL



( run in 0.648 second using v1.01-cache-2.11-cpan-5735350b133 )