Catalyst-Plugin-AutoCRUD
view release on metacpan or search on metacpan
examples/demo/demo.conf view on Meta::CPAN
# this is Scenario 3: we have no Catalyst Model and no DBIx::Class
# schema so it must all be created on the fly. Pass in the correct
# connection details:
<Model::AutoCRUD::DBIC>
connect_info dbi:SQLite:dbname=../sql/__autocrud_demo_app.sqlite
connect_info username
connect_info password
<connect_info>
AutoCommit 1
sqlite_unicode 1
</connect_info>
</Model::AutoCRUD::DBIC>
# any other AutoCRUD config goes here. in this demo app we override
# the default /autocrud path to be "" which means the server root.
<Plugin::AutoCRUD>
# extjs2 /static/extjs-2
basepath ""
#
examples/demo/demo_other_features.conf view on Meta::CPAN
# schema so it must all be created on the fly. Pass in the correct
# connection details:
<Model::AutoCRUD::DBIC>
schema_class DemoAppOtherFeaturesSchema
connect_info dbi:SQLite:dbname=../sql/__autocrud_other_features.sqlite
connect_info username
connect_info password
<connect_info>
AutoCommit 1
sqlite_unicode 1
quote_char "`"
name_sep "."
</connect_info>
</Model::AutoCRUD::DBIC>
# any other AutoCRUD config goes here. in this demo app we override
# the default /autocrud path to be "" which means the server root.
<Plugin::AutoCRUD>
# extjs2 /static/extjs-2
examples/demo/demo_with_display_name.conf view on Meta::CPAN
# if you have a DBIx::Class schema then use Model::AutoCRUD::DBIC
# but specify schema_class to load it up (see Scenario 2 in docs):
<Model::AutoCRUD::DBIC>
schema_class DemoAppMusicSchema
connect_info dbi:SQLite:dbname=../sql/__autocrud_demo_app.sqlite
connect_info username
connect_info password
<connect_info>
AutoCommit 1
sqlite_unicode 1
</connect_info>
</Model::AutoCRUD::DBIC>
# when you have no Catalyst Model and no DBIx::Class schema it must
# all be created on the fly. Omit the schema_class setting as in
# Scenario 3 from the docs.
# any other AutoCRUD config goes here. in this demo app we override
# the default /autocrud path to be "" which means the server root.
examples/demo/lib/DemoAppOtherFeaturesSchema/Result/UnicodeTest.pm view on Meta::CPAN
use base 'DBIx::Class::Core';
=head1 NAME
DemoAppOtherFeaturesSchema::Result::UnicodeTest
=cut
__PACKAGE__->table("unicode_test");
=head1 ACCESSORS
=head2 id
data_type: 'integer'
is_auto_increment: 1
is_nullable: 0
=head2 text
examples/sql/bootstrap_sqlite.pl view on Meta::CPAN
# just run it as: perl ./bootstrap_sqlite.pl
use DBI;
use Data::Dumper;
foreach my $name (qw/demo_app other_features/) {
my $dbfile = "__autocrud_$name.sqlite";
if (-e $dbfile) { unlink $dbfile or die "Failed to unlink $dbfile: $!"; }
my $dbh = DBI->connect("dbi:SQLite:dbname=$dbfile",'','',{ sqlite_unicode => 1 });
open my $sql_fh, "$name.sql" or die "Can't read SQL file: $!";
local $/ = ""; ## empty line(s) are delimeters
while (my $sql = <$sql_fh>) {
print $sql;
$dbh->do($sql);
}
# to test it went in okay
# print Dumper $dbh->selectall_arrayref('SELECT * FROM artist', { Slice => {} });
examples/sql/other_features.sql view on Meta::CPAN
-- Table: bookmark_with_link_proxy
--
CREATE TABLE bookmark_with_link_proxy (
id INTEGER PRIMARY KEY AUTOINCREMENT,
link INTEGER REFERENCES link(id)
);
INSERT INTO bookmark_with_link_proxy (link) VALUES (1);
--
-- Table: unicode_test
--
CREATE TABLE unicode_test (
id INTEGER PRIMARY KEY AUTOINCREMENT,
text CHARACTER
);
INSERT INTO unicode_test (text) VALUES ('ééé');
INSERT INTO unicode_test (text) VALUES ('®ç');
--
-- Table: noprimarykey
--
CREATE TABLE noprimarykey (
foo integer NOT NULL,
bar integer NOT NULL,
baz integer NOT NULL
);
( run in 0.657 second using v1.01-cache-2.11-cpan-88abd93f124 )