Menu

Named parameters

Help
MatyX
2007-02-06
2013-04-17
  • MatyX

    MatyX - 2007-02-06

    Hi guys. I took a look to your framework and it looks good. I'd want to know if the framework supports named parameters (I couldn't get it in the doc) and how should I use that.

    Thanks!

    MatyX.

     
    • Paul Feuer

      Paul Feuer - 2007-02-11

      hey - sorry for the delayed response, still getting used to sourceforge proj admin. so it doesn't currently support named params. we don't tend to use them where we are. in looking at jdbc3, it seems CallableStatement only supports named params on the getters and not setters. it looks like the Oracle 10g jdbc implementation has oracle specific named get/set params.

      what is the main benefit you see of using them? do you want the flexibility of named params for interaction with the DatabaseCall? or for prepared statement queries? cause you could do something like this within the current framework:

      // from within an Op
      DatabaseCall call = makeProcedure("sp_my_proc");
      Parameter myOutputNum = new Parameter( Types.NUMERIC );
      call.setParameters( new Object[] { myOutputNum } );
      executor.executeDatabaseCall( call );
      Number returnedValue = (Number) myOutputNum.getValue();

      how would you like to see it?

       

Log in to post a comment.

MongoDB Logo MongoDB