|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The DataHandler is responsible mapping the JDBC data type to a JPython object. Depending on the version of the JDBC implementation and the particulars of the driver, the type mapping can be significantly different. This interface can also be used to change the behaviour of the default mappings provided by the cursor. This might be useful in handling more complicated data types such as BLOBs, CLOBs and Arrays.
Method Summary | |
org.python.core.PyObject |
getPyObject(java.sql.ResultSet set,
int col,
int type)
Given a ResultSet, column and type, return the appropriate JPython object. |
void |
setJDBCObject(java.sql.PreparedStatement stmt,
int index,
org.python.core.PyObject object)
$METHOD_DESCRIPTION$ |
void |
setJDBCObject(java.sql.PreparedStatement stmt,
int index,
org.python.core.PyObject object,
int type)
$METHOD_DESCRIPTION$ |
Method Detail |
public org.python.core.PyObject getPyObject(java.sql.ResultSet set, int col, int type) throws java.sql.SQLException
Note: DO NOT iterate the ResultSet.
set
- the current ResultSet set to the current rowcol
- the column number (adjusted properly for JDBC)type
- the column typejava.sql.SQLException
- if the type is unmappablepublic void setJDBCObject(java.sql.PreparedStatement stmt, int index, org.python.core.PyObject object) throws java.sql.SQLException
stmt
- index
- object
- java.sql.SQLException
- public void setJDBCObject(java.sql.PreparedStatement stmt, int index, org.python.core.PyObject object, int type) throws java.sql.SQLException
stmt
- index
- object
- type
- java.sql.SQLException
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |