Skip Menu |

This queue is for tickets about the DBIx-Class CPAN distribution.

Report information
The Basics
Id: 42550
Status: rejected
Priority: 0/
Queue: DBIx-Class

People
Owner: Nobody in particular
Requestors: ddascalescu+perl [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 0.08099_05
Fixed in: (no value)



Subject: DOC: "Adding Indexes And Functions To Your SQL" in the Cookbook needs fixes
The "Adding Indexes And Functions To Your SQL" section mentions an out of date way of determining the database type: $sqlt_table->schema->translator->producer_type SQL::Translator returns just "CODE" nowadays. (also, the statement doesn't compile - the open parenthesis needs to be moved before 'my'). Is there a workaround way to determine the database type in sub sqlt_deploy_hook { ... } ?
From: ddascalescu+perl [...] gmail.com
Show quoted text
> Is there a workaround way to determine the database type in sub > sqlt_deploy_hook { ... } ?
$self->storage->connect_info->[0] Patching the doc with this change and the moved parenthesis should be sufficient to close this ticket.
$sqlt_table->schema->translator->producer_type in fact does return the current db type as can be seen here (and by `prove`ing t/86sqlt.t): http://dev.catalyst.perl.org/svnweb/bast/revision/?rev=5466 No doc patches are necessary, please provide us with a code example where producer_type indeed returns 'CODE'