Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#5 Named param Expression

Unassigned
open
James Ahlborn
sqlbuilder (10)
1
2013-08-16
2011-10-12
Ivan Bondarenko
No

I suggest to add something like NamedParamObject to standard object set, which will convert e.g. string "paramName" to ":paramName", as it is widely used in prepared statements.

Discussion

  • James Ahlborn
    James Ahlborn
    2011-10-12

    what type of prepared statements? jdbc doesn't support that syntax.

     
  • Some tools and extensions support it: SQLJ (in SQLJ this syntax is used for host expressions, but this only influences possible class name, not the sense), Spring and other. Why not to use sqlbuilder with them more easily.

     
  • James Ahlborn
    James Ahlborn
    2011-10-14

    not sure i see the benefit of a whole new class for this, maybe just a util method:

    public static SqlObject namedParamObject(String paramName) {
    return new CustomSql(":" + paramName);
    }

     


Anonymous


Cancel   Add attachments