01: /*
02:
03: Derby - Class org.apache.derby.client.net.StatementRequestInterface
04:
05: Licensed to the Apache Software Foundation (ASF) under one or more
06: contributor license agreements. See the NOTICE file distributed with
07: this work for additional information regarding copyright ownership.
08: The ASF licenses this file to You under the Apache License, Version 2.0
09: (the "License"); you may not use this file except in compliance with
10: the License. You may obtain a copy of the License at
11:
12: http://www.apache.org/licenses/LICENSE-2.0
13:
14: Unless required by applicable law or agreed to in writing, software
15: distributed under the License is distributed on an "AS IS" BASIS,
16: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17: See the License for the specific language governing permissions and
18: limitations under the License.
19:
20: */
21:
22: package org.apache.derby.client.net;
23:
24: import org.apache.derby.client.am.ColumnMetaData;
25: import org.apache.derby.client.am.Section;
26: import org.apache.derby.client.am.SqlException;
27:
28: // In general, all required data is passed.
29: // In addition, Material Statement objects are passed for convenient access to any material statement caches.
30: // Implementations of this interface should not dereference common layer Statement state, as it is passed in,
31: // but may dereference material layer Statement state if necessary for performance.
32:
33: public interface StatementRequestInterface {
34: public void writeExecuteImmediate(NetStatement materialStatement,
35: String sql, Section section) throws SqlException;
36:
37: public void writePrepareDescribeOutput(
38: NetStatement materialStatement, String sql, Section section)
39: throws SqlException;
40:
41: public void writePrepare(NetStatement materialStatement,
42: String sql, Section section) throws SqlException;
43:
44: public void writeOpenQuery(NetStatement materialStatement,
45: Section section, int fetchSize, int resultSetType)
46: throws SqlException;
47:
48: public void writeExecute(
49: NetPreparedStatement materialPreparedStatement,
50: Section section,
51: org.apache.derby.client.am.ColumnMetaData parameterMetaData,
52: Object[] inputs, int numInputColumns,
53: boolean outputExpected,
54: // This is a hint to the material layer that more write commands will follow.
55: // It is ignored by the driver in all cases except when blob data is written,
56: // in which case this boolean is used to optimize the implementation.
57: // Otherwise we wouldn't be able to chain after blob data is sent.
58: // If we could always chain a no-op DDM after every execute that writes blobs
59: // then we could just always set the chaining flag to on for blob send data
60: boolean chainedWritesFollowingSetLob) throws SqlException;
61:
62: public void writeOpenQuery(
63: NetPreparedStatement materialPreparedStatement,
64: Section section, int fetchSize, int resultSetType,
65: int numInputColumns, ColumnMetaData parameterMetaData,
66: Object[] inputs) throws SqlException;
67:
68: public void writeDescribeInput(
69: NetPreparedStatement materialPreparedStatement,
70: Section section) throws SqlException;
71:
72: public void writeDescribeOutput(
73: NetPreparedStatement materialPreparedStatement,
74: Section section) throws SqlException;
75:
76: public void writeExecuteCall(NetStatement materialStatement,
77: boolean outputExpected, String procedureName,
78: Section section, int fetchSize,
79: boolean suppressResultSets, // set to true for batched calls
80: int resultSetType, ColumnMetaData parameterMetaData,
81: Object[] inputs) throws SqlException;
82:
83: public void writeSetSpecialRegister(java.util.ArrayList sqlsttList)
84: throws SqlException;
85: }
|