-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Nishibayashi Takuji
committed
Jan 28, 2011
1 parent
efb3d2d
commit 492f45a
Showing
5 changed files
with
44 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,6 +1,13 @@ | |||
package SenchaStudy::Container; | package SenchaStudy::Container; | ||
use Chiffon::Core; | use Chiffon::Core; | ||
use Chiffon::Container -base; | use Chiffon::Container -base; | ||
use SenchaStudy::Model::DB; | |||
|
|||
register 'db' => sub { | |||
my $self = shift; | |||
my $conf = $self->get('conf'); | |||
SenchaStudy::Model::DB->new($conf->{datasource}->{master}); | |||
}; | |||
|
|
||
1; | 1; | ||
|
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,8 @@ | |||
package SenchaStudy::Model::DB; | |||
use strict; | |||
use warnings; | |||
use utf8; | |||
use DBIx::Skinny; | |||
use DBIx::Skinny::Mixin modules => ['SearchWithPager']; | |||
|
|||
1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,14 @@ | |||
package SenchaStudy::Model::DB::Schema; | |||
use strict; | |||
use warnings; | |||
use utf8; | |||
use DBIx::Skinny::Schema; | |||
|
|||
install_table conversation => schema { | |||
pk 'id'; | |||
columns qw/id body/; | |||
}; | |||
|
|||
install_utf8_columns qw/body/; | |||
|
|||
1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters