This is an exported version of the JIRA issue tracker. Please use the Google Code site to open new tickets or report updates to these existing tickets. Feel free to contact the mailing list with any questions.

[RRR-67] Named sql parameters
Created: Wed, 19 Jan 2005 14:50:41 -0800 (PST)  Updated: Mon, 7 Feb 2005 12:08:14 -0800 (PST)

Status:Closed
Project:ReportRunner
Component/s:
Affects Version/s:
Fix Version/s:0.4

Type:ImprovementPriority: Major
Reporter:Henri YandellAssignee:Henri Yandell
Resolution:Fixed 
Environment:


 Description   
Have another sql report, or an attribute or some such which allows for named parameters in sql and not just plain ? marks.

This allows other parameters to not fuck up the sql report.

It'll need trickery. Find indexes of all occurences of the named param, then go through and replace the named parameter for a ? or ?,?,? etc while maintaining the values array.

Let's us lose the ?? hack too.
Comment by bayard [ Thu, 3 Feb 2005 22:45:33 -0800 (PST) ]
Any subclasses of SqlReport will be affected by this change as execute becomes a final method in SqlReport. Instead you have to implement executeSql(DataSource).

The advantage of this is that variants are handled for you.
Comment by bayard [ Thu, 3 Feb 2005 22:48:17 -0800 (PST) ]
SqlReport split in half.

Named parameters need implementation. Tempting to just handle them myself as it's not really that difficult. Another option would be to use jdbi.codehaus.org, though that adds another dependency.
Comment by bayard [ Mon, 7 Feb 2005 12:08:14 -0800 (PST) ]
Implemented. I continue to use dbutils underneath, all that happens is that on top I convert the named parameter bits into question marks.