Re: Passing null values in parameters, part 2 )

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Tue Sep 29 2009 - 03:47:31 EDT

  • Next message: Evgeny Ryabitskiy: "Re: Passing null values in parameters, part 2 )"

    On Sep 28, 2009, at 11:09 PM, Evgeny Ryabitskiy wrote:

    > If I explicitly set JDBC type in bind directive, I get right type
    > (the one
    > that I have set explicitly).

    Good to know.

    > Set whole result is a solution but also not so flexible. If I have
    > select
    > from 10 columns and want change type of only one column I should
    > pass all 10
    > types (where 9 is same that returns by default).

    Agree, this is painful, done for purely implementation reasons and is
    something we should handle better.

    > I wish to have ability to optionally set result type for several
    > columns
    > from API.
    > I have very simple idea: To have standard Object-wrapper (name like
    > "BindValue" or something like that) that contains reference to
    > Object (or
    > null) and it's JDBC type and precision.
    > After we touch BindDirective to work with this "BindValue", we can
    > anytime
    > pass BindValue and explicitly set JDBC type through API.

    I like the idea, but maybe we can take this even further, and provide
    an API substitute for the entire directive, e.g. instead of

        #bind($bindDirective)

    we'd have

        $bindDirective

    i.e. from the user standpoint, extra #bind(..) wrapper seems
    redundant. Now wonder if we can extend that to other directives, such
    as #result?

    What do you think?

    Andrus



    This archive was generated by hypermail 2.0.0 : Tue Sep 29 2009 - 03:47:53 EDT