|
184 | 184 |
|
185 | 185 | ## 3. java.sql.CallableStatement |
186 | 186 |
|
187 | | -**Implementation:** NOT IMPLEMENTED |
| 187 | +**Implementation:** `DatabricksCallableStatement.java` — partial support (IN parameters only) |
188 | 188 |
|
189 | | -| Method Signature | Implemented | Exception Type | Deprecated? | Usage Category | Notes | |
190 | | -|-----------------|-------------|----------------|-------------|----------------|-------| |
191 | | -| `registerOutParameter(int, int)` | NO | - | No | COMMON | Stored procedures not implemented | |
192 | | -| `registerOutParameter(int, int, int)` | NO | - | No | OCCASIONAL | Stored procedures not implemented | |
193 | | -| `wasNull()` | NO | - | No | COMMON | Stored procedures not implemented | |
194 | | -| `getString(int)` | NO | - | No | COMMON | Stored procedures not implemented | |
195 | | -| `getBoolean(int)` | NO | - | No | COMMON | Stored procedures not implemented | |
196 | | -| `getByte(int)` | NO | - | No | OCCASIONAL | Stored procedures not implemented | |
197 | | -| `getShort(int)` | NO | - | No | COMMON | Stored procedures not implemented | |
198 | | -| `getInt(int)` | NO | - | No | COMMON | Stored procedures not implemented | |
199 | | -| `getLong(int)` | NO | - | No | COMMON | Stored procedures not implemented | |
200 | | -| `getFloat(int)` | NO | - | No | COMMON | Stored procedures not implemented | |
201 | | -| `getDouble(int)` | NO | - | No | COMMON | Stored procedures not implemented | |
202 | | -| `getBigDecimal(int, int)` | NO | - | Yes | DEPRECATED | Stored procedures not implemented | |
203 | | -| `getBytes(int)` | NO | - | No | OCCASIONAL | Stored procedures not implemented | |
204 | | -| `getDate(int)` | NO | - | No | COMMON | Stored procedures not implemented | |
205 | | -| `getTime(int)` | NO | - | No | OCCASIONAL | Stored procedures not implemented | |
206 | | -| `getTimestamp(int)` | NO | - | No | COMMON | Stored procedures not implemented | |
207 | | -| `getObject(int)` | NO | - | No | COMMON | Stored procedures not implemented | |
208 | | -| `getBigDecimal(int)` | NO | - | No | COMMON | Stored procedures not implemented | |
209 | | -| `getObject(int, Map)` | NO | - | No | RARE | Stored procedures not implemented | |
210 | | -| `getRef(int)` | NO | - | No | RARE | Stored procedures not implemented | |
211 | | -| `getBlob(int)` | NO | - | No | RARE | Stored procedures not implemented | |
212 | | -| `getClob(int)` | NO | - | No | RARE | Stored procedures not implemented | |
213 | | -| `getArray(int)` | NO | - | No | OCCASIONAL | Stored procedures not implemented | |
214 | | -| `getDate(int, Calendar)` | NO | - | No | OCCASIONAL | Stored procedures not implemented | |
215 | | -| `getTime(int, Calendar)` | NO | - | No | OCCASIONAL | Stored procedures not implemented | |
216 | | -| `getTimestamp(int, Calendar)` | NO | - | No | OCCASIONAL | Stored procedures not implemented | |
217 | | -| `registerOutParameter(int, int, String)` | NO | - | No | RARE | Stored procedures not implemented | |
218 | | -| `registerOutParameter(String, int)` | NO | - | No | COMMON | Stored procedures not implemented | |
219 | | -| `registerOutParameter(String, int, int)` | NO | - | No | OCCASIONAL | Stored procedures not implemented | |
220 | | -| `registerOutParameter(String, int, String)` | NO | - | No | RARE | Stored procedures not implemented | |
221 | | -| `getURL(int)` | NO | - | No | RARE | Stored procedures not implemented | |
222 | | -| `setURL(String, URL)` | NO | - | No | RARE | Stored procedures not implemented | |
223 | | -| `setNull(String, int)` | NO | - | No | COMMON | Stored procedures not implemented | |
224 | | -| `setBoolean(String, boolean)` | NO | - | No | COMMON | Stored procedures not implemented | |
225 | | -| `setByte(String, byte)` | NO | - | No | OCCASIONAL | Stored procedures not implemented | |
226 | | -| `setShort(String, short)` | NO | - | No | COMMON | Stored procedures not implemented | |
227 | | -| `setInt(String, int)` | NO | - | No | COMMON | Stored procedures not implemented | |
228 | | -| `setLong(String, long)` | NO | - | No | COMMON | Stored procedures not implemented | |
229 | | -| `setFloat(String, float)` | NO | - | No | COMMON | Stored procedures not implemented | |
230 | | -| `setDouble(String, double)` | NO | - | No | COMMON | Stored procedures not implemented | |
231 | | -| `setBigDecimal(String, BigDecimal)` | NO | - | No | COMMON | Stored procedures not implemented | |
232 | | -| `setString(String, String)` | NO | - | No | COMMON | Stored procedures not implemented | |
233 | | -| `setBytes(String, byte[])` | NO | - | No | OCCASIONAL | Stored procedures not implemented | |
234 | | -| `setDate(String, Date)` | NO | - | No | COMMON | Stored procedures not implemented | |
235 | | -| `setTime(String, Time)` | NO | - | No | OCCASIONAL | Stored procedures not implemented | |
236 | | -| `setTimestamp(String, Timestamp)` | NO | - | No | COMMON | Stored procedures not implemented | |
237 | | -| ... (50+ more methods) | NO | - | No | VARIOUS | All CallableStatement methods not implemented | |
| 189 | +`DatabricksCallableStatement` extends `DatabricksPreparedStatement` and implements `CallableStatement`. |
| 190 | +All IN parameter binding (`setXXX(int, value)`) and execution methods are inherited from `PreparedStatement`. |
| 191 | +OUT/INOUT parameters, named parameters, and return-value syntax (`{? = call ...}`) throw `SQLFeatureNotSupportedException`. |
| 192 | + |
| 193 | +| Method Signature | Implemented | Exception Type | Notes | |
| 194 | +|-----------------|-------------|----------------|-------| |
| 195 | +| *All `setXXX(int, value)` methods* | YES (inherited) | - | Inherited from DatabricksPreparedStatement | |
| 196 | +| *`executeQuery()`, `executeUpdate()`, `execute()`* | YES (inherited) | - | Inherited from DatabricksPreparedStatement | |
| 197 | +| *`addBatch()`, `executeBatch()`* | YES (inherited) | - | Inherited from DatabricksPreparedStatement | |
| 198 | +| *`clearParameters()`, `getParameterMetaData()`* | YES (inherited) | - | Inherited from DatabricksPreparedStatement | |
| 199 | +| `registerOutParameter(int, int)` | THROWS | `SQLFeatureNotSupportedException` | OUT params not supported | |
| 200 | +| `registerOutParameter(int, int, int)` | THROWS | `SQLFeatureNotSupportedException` | OUT params not supported | |
| 201 | +| `registerOutParameter(int, int, String)` | THROWS | `SQLFeatureNotSupportedException` | OUT params not supported | |
| 202 | +| `registerOutParameter(String, int)` | THROWS | `SQLFeatureNotSupportedException` | OUT params not supported | |
| 203 | +| `registerOutParameter(String, int, int)` | THROWS | `SQLFeatureNotSupportedException` | OUT params not supported | |
| 204 | +| `registerOutParameter(String, int, String)` | THROWS | `SQLFeatureNotSupportedException` | OUT params not supported | |
| 205 | +| `wasNull()` | THROWS | `SQLFeatureNotSupportedException` | OUT params not supported | |
| 206 | +| *All `getXXX(int)` methods (~30)* | THROWS | `SQLFeatureNotSupportedException` | OUT param retrieval not supported | |
| 207 | +| *All `getXXX(String)` methods (~30)* | THROWS | `SQLFeatureNotSupportedException` | OUT param retrieval not supported | |
| 208 | +| *All `setXXX(String, value)` methods (~35)* | THROWS | `SQLFeatureNotSupportedException` | Named parameters not supported | |
238 | 209 |
|
239 | 210 | **Summary for CallableStatement:** |
240 | 211 | - **Total Methods:** 100+ (approx) |
241 | | -- **Fully Implemented:** 0 |
242 | | -- **Note:** Driver throws `DatabricksSQLFeatureNotImplementedException` in `Connection.prepareCall()` - "Callable statements are not implemented in OSS JDBC" |
| 212 | +- **Fully Implemented (inherited):** ~45 (all setXXX by index, execute, batch, lifecycle) |
| 213 | +- **Throws SQLFeatureNotSupportedException:** ~100 (registerOutParameter, getXXX, named setXXX) |
| 214 | +- **Note:** `Connection.prepareCall()` creates `DatabricksCallableStatement`. `{call proc(?)}` escape syntax is converted to `CALL proc(?)`. `{? = call ...}` return-value syntax is rejected at construction time. |
243 | 215 |
|
244 | 216 | --- |
245 | 217 |
|
|
0 commit comments