*
* @param dict
* @throws PyException
*/
protected static void _addSqlTypes(PyObject dict) throws PyException {
PyDictionary sqltype = new PyDictionary();
dict.__setitem__("sqltype", sqltype);
try {
Class<?> c = Class.forName("java.sql.Types");
Field[] fields = c.getFields();
for (Field f : fields) {
PyString name = Py.newString(f.getName());
PyObject value = new DBApiType(f.getInt(c));
dict.__setitem__(name, value);
sqltype.__setitem__(value, name);
}
c = Class.forName("java.sql.ResultSet");
fields = c.getFields();