[autarch@urth.org - Tue May 25 16:28:07 2004]:
Show quoted text> Could you send me the actual error?
The script I use to create a table, BlogEntries, to store blog entries:
use Alzabo::Create::Schema;
my $schema = Alzabo::Create::Schema->new(name => 'cype',
rdbms => 'PostgreSQL');
my $table = $schema->make_table(name => 'BlogEntries');
my $id_c = $table->make_column(name => 'id',
type => 'int',
nullable => 0,
sequenced => 1);
...
$schema->create(user => '...', password => '...');
This executes fine and, as you tell me, I find a table ' "BlogEntries" '(without the single-
quotes) in the database.
Here's my script to get entries:
use Alzabo::Runtime;
my $schema = Alzabo::Runtime::Schema->load_from_file(name => 'cype');
$schema->connect(user => '...', password => '...');
my $entry = $schema->table('BlogEntries');
...
When I run this script, I get this error:
DBD::Pg::st execute failed: ERROR: relation "blogentries" does not exist at /usr/local/share/
perl/5.8.3/Alzabo/Driver.pm line 521.
SQL: SELECT BlogEntries.id AS id, BlogEntries.title AS title, BlogEntries.author AS author,
BlogEntries.created AS created, BlogEntries.updated AS updated, BlogEntries.intro AS intro,
BlogEntries.data AS data FROM BlogEntries AS BlogEntries WHERE BlogEntries.id LIKE ?
BIND: 1
Trace begun at /usr/local/share/perl/5.8.3/Alzabo/Driver.pm line 529
Alzabo::DriverStatement::execute('Alzabo::DriverStatement=HASH(0x866b0a4)') called at /
usr/local/share/perl/5.8.3/Alzabo/Driver.pm line 476
Alzabo::DriverStatement::new('Alzabo::DriverStatement', 'dbh', 'DBI::db=HASH(0x8659aa0)',
'sql', 'SELECT BlogEntries.id AS id, BlogEntries.title AS title, BlogEntries.author AS author,
BlogEntries.created AS created, BlogEntries.updated AS updated, BlogEntries.intro AS intro,
BlogEntries.data AS data FROM BlogEntries AS BlogEntries WHERE BlogEntries.id LIKE ?', 'bind',
'ARRAY(0x865f12c)', 'limit', undef) called at /usr/local/share/perl/5.8.3/Alzabo/Driver.pm
line 285
Alzabo::Driver::statement('Alzabo::Driver::PostgreSQL=HASH(0x8173e0c)', 'sql', 'SELECT
BlogEntries.id AS id, BlogEntries.title AS title, BlogEntries.author AS author,
BlogEntries.created AS created, BlogEntries.updated AS updated, BlogEntries.intro AS intro,
BlogEntries.data AS data FROM BlogEntries AS BlogEntries WHERE BlogEntries.id LIKE ?', 'bind',
'ARRAY(0x865f12c)', 'limit', undef) called at /usr/local/share/perl/5.8.3/Alzabo/Runtime/
Table.pm line 370
Alzabo::Runtime::Table::_cursor_by_sql(undef, 'where', 'ARRAY(0x864c44c)', 'sql', 'Alzabo::
SQLMaker::PostgreSQL=HASH(0x865f174)') called at /usr/local/share/perl/5.8.3/Alzabo/
Runtime/Table.pm line 281
Alzabo::Runtime::Table::rows_where('Alzabo::Runtime::Table=HASH(0x8173e18)', 'where',
'ARRAY(0x864c44c)') called at fetch.pl line 23
The doble-quoted name obviosly crashes with the not-quoted tablename used in fetch.pl.
Is it possible to change fetch.pl to use quoted tablenames? Or another solution?
/knuti