4444 */
4545public class SelectAction extends BaseSQLAction {
4646
47- private static void bind (DbAdapter adapter , PreparedStatement statement , ParameterBinding [] bindings ) throws Exception {
48-
49- for (ParameterBinding b : bindings ) {
50-
51- // null DbAttributes are a result of inferior qualifier
52- // processing (qualifier can't map parameters to DbAttributes
53- // and therefore only supports standard java types now) hence, a
54- // special moronic case here:
55- if (b .getAttribute () == null ) {
56- statement .setObject (b .getStatementPosition (), b .getValue ());
57- } else {
58- adapter .bindParameter (statement , b );
59- }
60- }
61-
62- }
63-
6447 protected Select <?> query ;
6548 protected QueryMetadata queryMetadata ;
6649
@@ -87,9 +70,22 @@ protected void performAction(Connection connection, OperationObserver observer,
8770
8871 logger .logQuery (translated .sql (), translated .bindings ());
8972
73+ DbAdapter adapter = dataNode .getAdapter ();
9074 PreparedStatement statement = connection .prepareStatement (translated .sql ());
91- bind (dataNode .getAdapter (), statement , translated .bindings ());
9275
76+ for (ParameterBinding b : translated .bindings ()) {
77+
78+ // null DbAttributes are a result of inferior qualifier
79+ // processing (qualifier can't map parameters to DbAttributes
80+ // and therefore only supports standard java types now) hence, a
81+ // special moronic case here:
82+ if (b .getAttribute () == null ) {
83+ statement .setObject (b .getStatementPosition (), b .getValue ());
84+ } else {
85+ adapter .bindParameter (statement , b );
86+ }
87+ }
88+
9389 int fetchSize = queryMetadata .getStatementFetchSize ();
9490 if (fetchSize != 0 ) {
9591 statement .setFetchSize (fetchSize );
0 commit comments