ap / DBIx-Connector

Fast, safe DBI connection and transaction management
https://metacpan.org/release/DBIx-Connector
40 stars 14 forks source link

Add Firebird support #43

Closed stefansbv closed 8 years ago

stefansbv commented 8 years ago

Hi David,

All the tests pass, but it must be something wrong, it was too easy :-)

theory commented 8 years ago

Well for one thing, the Authors section has the wrong author! :-)

theory commented 8 years ago

Oh, wait, no, I misread it, you're there. Thanks!

theory commented 8 years ago

Okay, testing this, but the live test isn't working. I created an empty database (using firebird-superserver) and got the connection working, but get this error:

$ prove -lv t/svp_live.t 
t/svp_live.t .. 
1..38
ok 1 - Get a connection
ok 2 - Get the database handle
ok 3 - 'The handle' isa 'DBI::db'
DBD::Firebird::db do failed: This operation is not defined for system tables.
-unsuccessful metadata update
-Generator G_ARTIST_ID not found at t/svp_live.t line 63.
# Looks like you planned 38 tests but ran 3.
# Looks like your test exited with 255 just after 3.

Line 63 is the line that's executing the @tables statements.

theory commented 8 years ago

I put in some debugging, and it's choking on the first SQL statement, RECREATE TABLE artist (id INTEGER, name VARCHAR(100)).

theory commented 8 years ago

Sorry, it's DROP GENERATOR g_artist_id that it chokes on.

theory commented 8 years ago

Okay, looks like we need a way to drop the generator only if it exists.

stefansbv commented 8 years ago

Yes, I came to the same conclusion...

theory commented 8 years ago

Okay, fixed it in 13cfdcb by avoiding the issue altogether.

stefansbv commented 8 years ago

Great! Thanks.

BTW, I didn't find an easy way to drop generator if exists.

theory commented 8 years ago

Yeah, I didn't think there would be, and it was easier just to be explicit and drop the requirement for the thing.