Menu

#5 Named param Expression

sqlbuilder-2.1.1
closed
sqlbuilder (14)
1
2015-04-26
2011-10-12
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.

     
  • Ivan Bondarenko

    Ivan Bondarenko - 2011-10-12

    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);
    }

     
  • James Ahlborn

    James Ahlborn - 2013-08-16
    • Group: --> Unassigned
     
  • James Ahlborn

    James Ahlborn - 2015-04-26

    fixed in trunk, will be in the 2.1.1 release.

     
  • James Ahlborn

    James Ahlborn - 2015-04-26
    • status: open --> closed
    • Group: Unassigned --> sqlbuilder-2.1.1
     

Log in to post a comment.