I am looking for a DBI (or similar) proxy that supports both SQL restrictions and transactions. The two I know about are:
DBD::Proxy
DBD::Gofer
DBD::Proxy
The problem I have found with DBD::Proxy
is that its server, DBI::ProxyServer
, doesn't just restrict queries coming in over the network (which I want), but it also restricts queries generated internally by the database driver. So, for example, with DBD::Oracle
, ping no longer works, as well as many other queries it issues itself.
I can't just allow them, because:
- That is quite a bit of internal knowledge of DBD::Oracle and would be quite fragile.
- The whitelist is
query_name => 'sql'
, wherequery_name
is the first word of whatever is passed toprepare
. DBD::Oracle has a lot of internal queries, and the first word of many of them isselect
(duh).
So, it doesn't seem I can use DBD::Proxy
DBD::Gofer
I haven't tried DBD::Gofer, because the docs seem to tell me that I can't use transactions through it:
CONSTRAINTS
...
You can’t use transactions
AutoCommit only. Transactions aren’t supported.
So, before I write my own application-specific proxy (using RPC::PLServer
?), is there code out there that solves this problem?