Top Description Fields Constructors Methods
com.ziclix.python.sql

public Class zxJDBC

Additional top-level class in compilation unit: zxJDBCFunc.

extends PyObject
implements ClassDictInit
Class Inheritance
All Implemented Interfaces
org.python.core.ClassDictInit
Annotations
@Untraversable
Imports
org.python.core.ClassDictInit, .Options, .Py, .PyArray, .PyBuiltinFunctionSet, .PyDictionary, .PyException, .PyInteger, .PyObject, .PyString, .PyStringMap, .Untraversable, java.io.CharArrayWriter, .PrintWriter, java.lang.reflect.Field, java.sql.SQLException, java.text.MessageFormat, java.util.ArrayList, .Enumeration, .List, .MissingResourceException, .Properties, .ResourceBundle

Creates database connections.

from com.ziclix.python.sql import zxJDBC
db = zxJDBC.connect("jdbc:mysql://localhost:3306/MySql", None, None, "org.gjt.mm.mysql.Driver")
Author
brian zimmer

Field Summary

Modifier and TypeField and Description
public static PyObject
DatabaseError

Field DatabaseError

public static PyObject
DataError

Field DataError

public static DateFactory
datefactory

Instance used to create date-like objects as per the API

public static PyObject
Error

Field Error

public static PyObject
IntegrityError

Field IntegrityError

public static PyObject
InterfaceError

Field InterfaceError

public static PyObject
InternalError

Field InternalError

public static PyObject
NotSupportedError

Field NotSupportedError

public static PyObject
OperationalError

Field OperationalError

public static PyObject
ProgrammingError

Field ProgrammingError

private static ResourceBundle
resourceBundle

The ResourceBundle with error messages and doc strings

public static PyObject
Warning

Field Warning

Inherited from org.python.core.PyObject:
attributesgcMonitorGlobalobjtypeTYPE

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected static void
_addConnectors(PyObject dict)

Add all the possible connectors

protected static void
_addSqlTypes(PyObject dict)

Add the types from java.sql.Types

protected static void
_buildExceptions(PyObject dict)

Create the exception classes and get their descriptions from the resource bundle.

protected static PyObject

Returns:

PyObject
buildClass
(String classname, PyObject superclass)

Method buildClass

public static void
classDictInit(PyObject dict)

Initializes the module.

public static String

Returns:

String
getString
(String key)

Return the string associated with the key for the default resource bundle.

public static String

Returns:

String
getString
(String key, Object[] values)

Return a formatted string.

public static PyException

Returns:

PyException
makeException
(String msg)

Return a newly instantiated PyException of the type Error.

public static PyException

Returns:

PyException
makeException
(PyObject type, String msg)

Return a newly instantiated PyException of the given type.

public static PyException

Returns:

PyException
makeException
(Throwable throwable)

Return a newly instantiated PyException of the type Error.

public static PyException

Returns:

PyException
makeException
(PyObject type, Throwable t)

Return a newly instantiated PyException of the given type.

public static PyException

Returns:

PyException
makeException
(PyObject type, Throwable t, int
Row index where the error has happened. Useful for diagnosing.
rowIndex
)

Return a newly instantiated PyException of the given type.

Inherited from org.python.core.PyObject:
__abs____add____and____call____call____call____call____call____call____call____call____call____call____call____call____call____call____call____call____cmp____coerce____coerce_ex____complex____contains____delattr____delattr____delete____delitem____delitem____delslice____delslice____dir____div____divmod____ensure_finalizer____eq____findattr____findattr____findattr_ex____finditem____finditem____finditem____float____floordiv____format____ge____get____getattr____getattr____getitem____getitem____getnewargs____getslice____getslice____gt____hash____hex____iadd____iand____idiv____idivmod____ifloordiv____ilshift____imod____imul____index____int____invert____ior____ipow____irshift____isub____iter____iternext____itruediv____ixor____le____len____long____lshift____lt____mod____mul____ne____neg____nonzero____not____oct____or____pos____pow____pow____radd____rand____rawdir____rdiv____rdivmod____reduce____reduce_ex____reduce_ex____repr____rfloordiv____rlshift____rmod____rmul____ror____rpow____rrshift____rshift____rsub____rtruediv____rxor____set____setattr____setattr____setitem____setitem____setitem____setslice____setslice____str____sub____tojava____truediv____trunc____unicode____xor___add_and_callextra_cmp_div_divmod_doget_doget_doset_eq_floordiv_ge_gt_iadd_iand_idiv_idivmod_ifloordiv_ilshift_imod_imul_in_ior_ipow_irshift_is_isnot_isub_itruediv_ixor_jcall_jcallexc_jthrow_le_lshift_lt_mod_mul_ne_notin_or_pow_rshift_sub_truediv_unsupportedop_xoradaptToCoerceTupleasDoubleasIndexasIndexasIntasIntasIterableasLongasLongasNameasNameasStringasStringasStringOrNullasStringOrNullbit_lengthconjugatedelDictdelTypedispatch__init__equalsfastGetClassfastGetDictfinalizegetDictgetJavaProxygetTypehashCodeimpAttrimplementsDescrDeleteimplementsDescrGetimplementsDescrSetinvokeinvokeinvokeinvokeinvokeinvokeisCallableisDataDescrisIndexisIntegerisMappingTypeisNumberTypeisSequenceTypemergeClassDictmergeDictAttrmergeListAttrnoAttributeErrorobject___subclasshook__readonlyAttributeErrorrunsupportedopMessagesetDictsetTypetoStringunsupportedopMessage

Field Detail

DatabaseErrorback to summary
public static PyObject DatabaseError

Field DatabaseError

DataErrorback to summary
public static PyObject DataError

Field DataError

datefactoryback to summary
public static DateFactory datefactory

Instance used to create date-like objects as per the API

Errorback to summary
public static PyObject Error

Field Error

IntegrityErrorback to summary
public static PyObject IntegrityError

Field IntegrityError

InterfaceErrorback to summary
public static PyObject InterfaceError

Field InterfaceError

InternalErrorback to summary
public static PyObject InternalError

Field InternalError

NotSupportedErrorback to summary
public static PyObject NotSupportedError

Field NotSupportedError

OperationalErrorback to summary
public static PyObject OperationalError

Field OperationalError

ProgrammingErrorback to summary
public static PyObject ProgrammingError

Field ProgrammingError

resourceBundleback to summary
private static ResourceBundle resourceBundle

The ResourceBundle with error messages and doc strings

Warningback to summary
public static PyObject Warning

Field Warning

Constructor Detail

zxJDBCback to summary
public zxJDBC()

Method Detail

_addConnectorsback to summary
protected static void _addConnectors(PyObject dict) throws PyException

Add all the possible connectors

_addSqlTypesback to summary
protected static void _addSqlTypes(PyObject dict) throws PyException

Add the types from java.sql.Types

_buildExceptionsback to summary
protected static void _buildExceptions(PyObject dict)

Create the exception classes and get their descriptions from the resource bundle.

buildClassback to summary
protected static PyObject buildClass(String classname, PyObject superclass)

Method buildClass

Returns:PyObject

PyObject

classDictInitback to summary
public static void classDictInit(PyObject dict)

Initializes the module.

getStringback to summary
public static String getString(String key)

Return the string associated with the key for the default resource bundle. It first checks for 'key.N' where N starts at 0 and increments by one. If any indexed key is found, the results of all the indexed values are concatenated with the line separator. If no indexed key is found, it defaults to checking the bundle by the key value alone.

Returns:String

String

getStringback to summary
public static String getString(String key, Object[] values)

Return a formatted string. The key is used to get the format and the values are passed, along with the format, to a MessageFormat who formats it appropriately.

Returns:String

String

makeExceptionback to summary
public static PyException makeException(String msg)

Return a newly instantiated PyException of the type Error.

Returns:PyException

PyException

makeExceptionback to summary
public static PyException makeException(PyObject type, String msg)

Return a newly instantiated PyException of the given type.

Returns:PyException

PyException

makeExceptionback to summary
public static PyException makeException(Throwable throwable)

Return a newly instantiated PyException of the type Error.

Returns:PyException

PyException

makeExceptionback to summary
public static PyException makeException(PyObject type, Throwable t)

Return a newly instantiated PyException of the given type.

Returns:PyException

PyException

makeExceptionback to summary
public static PyException makeException(PyObject type, Throwable t, int rowIndex)

Return a newly instantiated PyException of the given type.

Parameters
rowIndex:int

Row index where the error has happened. Useful for diagnosing.

Returns:PyException

PyException