Skip Menu |
 

This queue is for tickets about the SQL-Statement CPAN distribution.

Report information
The Basics
Id: 71338
Status: rejected
Priority: 0/
Queue: SQL-Statement

People
Owner: Nobody in particular
Requestors: BitCard [...] ResonatorSoft.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 1.33
Fixed in: (no value)



Subject: Support for SQL statement regeneration after params are added
Download (untitled) / with headers
text/plain 782b
I am currently using SQL::Parser/Statement for some SQL parsing in a DBD module before it's sent off to the database. The database supports SQL (but not params), so it doesn't actually need to execute via SQL::Statement. However, while the terms and parameters are neatly arranged in a where_terms tree, there are three problems with trying to add the params: 1. The SQL::Eval module allows for a params method, but it's too far into the process, as it already requires database access. 2. The SQL::Statement::Placeholder objects don't actually have the ARGNUM defined for some strange reason, so you can't tell which real value goes on which param. 3. There is no function to reverse the where_terms process back to an SQL statement. Could something like that be implemented?
On Thu Sep 29 12:33:05 2011, SineSwiper wrote: Show quoted text
> I am currently using SQL::Parser/Statement for some SQL parsing in a DBD > module before it's sent off to the database. The database supports SQL > (but not params), so it doesn't actually need to execute via
SQL::Statement. Show quoted text
> > However, while the terms and parameters are neatly arranged in a > where_terms tree, there are three problems with trying to add the params: > > 1. The SQL::Eval module allows for a params method, but it's too far > into the process, as it already requires database access.
No, it requires $sth->execute(@values). Show quoted text
> 2. The SQL::Statement::Placeholder objects don't actually have the > ARGNUM defined for some strange reason, so you can't tell which real > value goes on which param.
The reason isn't so strange. But it might look strange to new folks. Show quoted text
> 3. There is no function to reverse the where_terms process back to an > SQL statement.
Coorect. Show quoted text
> Could something like that be implemented?
No. No. Maybe (depends whether Data::Query can be used for SSv2).


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.