Is there a DBI proxy that handles SQL restrictions and transactions?

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', where query_name is the first word of whatever is passed to prepare. DBD::Oracle has a lot of internal queries, and the first word of many of them is select (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?

Answers


This question would be best asked on the DBI Users mailing list, dbi-users@perl.org. Sign up at http://dbi.perl.org/

I'm not sure what you mean about DBD::Proxy restricting queries. On the only occasion I've used it, it didn't modify the queries at all.


Need Your Help

Adding multiple rows to a datatable for dynamically created columns

c# datatable

Hi all I am getting a string as follows for the data to be inserted as follows in a variable.

Running a plugin after all fonts are fully loaded, using WebFontLoader

javascript fonts webfont-loader

I have a plugin called slabtext that I want to run ONLY after my fonts are FULLY loaded. I tried the following but It doesn't work (probably an error in the script just before the closing body). Is...