On Sun, May 02, 2004 at 09:59:19AM -0400, Matthew O. Persico wrote: > On Sat, 1 May 2004 18:53:30 +0100, Tim Bunce typed: > > > > Comments? > > 1) I was going to do a pod2html on this email and post it someplace so that we don't > end up with emails that include the text over and over, but my ASP is down at the > moment. You might consider the same.
Once it's ready for dbi-users perhaps. > 2) A thought - Someone is going to come out of the woodwork and > tell you why ';' won't work as a delimiter. You are going to need > to write parsing code to find the ';' No DBI or driver parsing required. The semicolon is parsed by databases that support it. [I do have a plan to enable the DBI to support explicit batches, which will be semicolon delimited, which I've discussed in the past, but it's not very relevant here.] I'll add a note to the the docs to explain that semicolons are just an example of a common statement delimiter and are not mandated. I'll quote DBD::Sybase as an example of an SQL dialect that doesn't use any delimiter at all. Thanks for the reminder (I'd forgotten about it.) Also, Michael Peppler wrote: : For Sybase there is no difference between the "explicit batch" and : Procedures, and Sybase will not accept semi-colons as statement : separators. You can submit almost any combination of T-SQL statements as : a batch and have it executed and return results as required, including : multiple stored procedure calls, multiple "normal" SQL calls, etc. Sure, okay. I'll add a note to that effect. > M. Peppler is going to have > to rework Sybase to get at the same info as provided by this new > functionality 'cause odds are the sql fed to DBD::Sybase is not > going to have ;. The semicolons aren't required. SQL changes aren't required. > And there will be a clamoring for more 'per-result' set functionality. I'm not sure what you mean here. > Sooooo, I say, if you want multiset functionality, pass in multiple > sets. Instead of containing all the sql together with ; in between > batches, pass in an array ref of sql statements, each comprising a > 'batch'. That way, there is no semicolon parsing required on DBI's > part, Peppler can write code to process this stuff in the new way, > but if I pass one big SQL statement, it behaves as is, with no > access to the enhanced data available and eventually, if there is > per-batch-set functionality to be made available, you can replace > each sql statement in the array with a DBI::BatchStatement object > to provide and interface to each result. Umm, for now I'd rather just specify an attribute that returns the character/string used to delimit sub-statements. That would be a space, or perhaps a newline, for DBD::Sybase. Tim.