Re: already existing database handles
[prev]
[thread]
[next]
[Date index for 2005/06/19]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
> Therefore, the DBI handle attributes you need to be compatible with
> Class::DBI are the following:
>
> RaiseError => 1,
> PrintError => 0,
> Taint => 1,
> RootClass => "DBIx::ContextualFetch"
> FetchHashKeyName => 'NAME_lc',
> ShowErrorStatement => 1,
> ChopBlanks => 1,
> AutoCommit => 1 (unless you are using Postgres or
> Oracle, in which case it's 0)
>
The above helps alot. Thank you again.
>> To make things more complicated I need to use a module like
>> Class::DBI::AutoLoader to get the functionality I am reaching for. It
>> doesn't support already existing db handles as far as I can tell. It
>> blows up on new if not given exactly what it wants. Once I have this
>> worked out with CDBI I can work on AutoLoader and perhaps extend it's
>> functionality to support this feature.
> AutoLoader is kind of obsolete, I think. You should be looking at
Loader. I
> don't use either one though, as I prefer to create my classes by hand.
If I inherit from Loader, then override db_Main that will get me started
but I still only want some tables pulled in. Loader pulls in the whole
database. That's too much overhead.
For now I will have to write the new method in my module to accept my
already existing dbHandle and then call the parent new. With my own
db_Main routine this should be able to use the prexisting handle rather
than create another one.
- --
JT Morée
PC Xperience, Inc.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCtNI3XEayxvjyJdwRAv8kAJ9uYceLM6+fXbCILRuymFUnqkuLrACfZSnO
B6LHVYchkzSN19FlogckReI=
=8ZTm
-----END PGP SIGNATURE-----
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.