Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^7: Can DBI modify queries on the fly?

by ikegami (Pope)
on Feb 18, 2009 at 18:58 UTC ( #744844=note: print w/ replies, xml ) Need Help??


in reply to Re^6: Can DBI modify queries on the fly?
in thread Can DBI modify queries on the fly?

Both of those are serious enough to make me want to go back to looking at some DBD subclass with an overridden method instead of using the callback, but I'm not sure it will be worth the effort.

Using a different DBD is what I recommended, and I still do. You'll probably want it to act as a wrapper to an existing DBD.

If you absolutely refuse to change the DSN, you can make your Wrapper DBD transparent by using the callback mechanism. Just like the linked example switches Sybase for Gofer, your callback would switch the original handle for a wrapped handle.


Comment on Re^7: Can DBI modify queries on the fly?
Re^8: Can DBI modify queries on the fly?
by kyle (Abbot) on Feb 18, 2009 at 19:05 UTC

    Using a different DBD is what I recommended, and I still do.

    Why do that over this (easier) callback method? It acts a lot like a wrapper, but I don't have to cough up a separate package.

      It's an undocumented feature that's akin to using Hook::LexWrap to change the behaviour of a class. It makes no sense to me.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://744844]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2014-10-31 11:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (216 votes), past polls