| java.lang.Object org.python.core.PyObject com.ziclix.python.sql.PyConnection
PyConnection | public class PyConnection extends PyObject implements ClassDictInit(Code) | | A connection to the database.
author: brian zimmer author: last revised by $Author: cgroves $ version: $Revision: 3248 $ |
Constructor Summary | |
public | PyConnection(Connection connection) Create a PyConnection with the open connection. |
Method Summary | |
public PyObject | __findattr__(String name) Finds the attribute. | public void | __setattr__(String name, PyObject value) Sets the attribute. | void | add(PyStatement statement) | public static void | classDictInit(PyObject dict) | public void | close() Close the connection now (rather than whenever __del__ is called).
The connection will be unusable from this point forward; an Error
(or subclass) exception will be raised if any operation is attempted
with the connection. | public void | commit() Commit any pending transaction to the database. | boolean | contains(PyStatement statement) | public PyCursor | cursor() Return a new Cursor Object using the connection. | public PyCursor | cursor(boolean dynamicFetch) Return a new Cursor Object using the connection. | public PyCursor | cursor(boolean dynamicFetch, PyObject rsType, PyObject rsConcur) Return a new Cursor Object using the connection. | protected PyClass | getPyClass() | public PyObject | nativesql(PyObject nativeSQL) Converts the given SQL statement into the system's native SQL grammar. | void | remove(PyCursor cursor) Remove an open PyCursor. | public void | rollback() This method is optional since not all databases provide transaction
support.
In case a database does provide transactions this method causes the database
to roll back to the start of any pending transaction. | public String | toString() Produces a string representation of the object. |
__members__ | protected static PyList __members__(Code) | | Field __members__
|
__methods__ | protected static PyList __methods__(Code) | | Field __methods__
|
closed | protected boolean closed(Code) | | Field closed
|
supportsTransactions | protected boolean supportsTransactions(Code) | | Field supportsTransactions
|
__findattr__ | public PyObject __findattr__(String name)(Code) | | Finds the attribute.
Parameters: name - the name of the attribute of interest the value for the attribute of the specified name |
__setattr__ | public void __setattr__(String name, PyObject value)(Code) | | Sets the attribute.
Parameters: name - Parameters: value - |
add | void add(PyStatement statement)(Code) | | Method register
Parameters: statement - statement |
classDictInit | public static void classDictInit(PyObject dict)(Code) | | Method classDictInit
Parameters: dict - |
close | public void close()(Code) | | Close the connection now (rather than whenever __del__ is called).
The connection will be unusable from this point forward; an Error
(or subclass) exception will be raised if any operation is attempted
with the connection. The same applies to all cursor objects trying
to use the connection.
|
commit | public void commit()(Code) | | Commit any pending transaction to the database. Note that if the
database supports an auto-commit feature, this must be initially
off. An interface method may be provided to turn it back on.
Database modules that do not support transactions should implement
this method with void functionality.
|
contains | boolean contains(PyStatement statement)(Code) | | Method contains
Parameters: statement - statement boolean |
cursor | public PyCursor cursor()(Code) | | Return a new Cursor Object using the connection. If the database does not
provide a direct cursor concept, the module will have to emulate cursors
using other means to the extent needed by this specification.
a new cursor using this connection |
cursor | public PyCursor cursor(boolean dynamicFetch)(Code) | | Return a new Cursor Object using the connection. If the database does not
provide a direct cursor concept, the module will have to emulate cursors
using other means to the extent needed by this specification.
Parameters: dynamicFetch - if true, dynamically iterate the result a new cursor using this connection |
cursor | public PyCursor cursor(boolean dynamicFetch, PyObject rsType, PyObject rsConcur)(Code) | | Return a new Cursor Object using the connection. If the database does not
provide a direct cursor concept, the module will have to emulate cursors
using other means to the extent needed by this specification.
Parameters: dynamicFetch - if true, dynamically iterate the result Parameters: rsType - the type of the underlying ResultSet Parameters: rsConcur - the concurrency of the underlying ResultSet a new cursor using this connection |
getPyClass | protected PyClass getPyClass()(Code) | | Method getPyClass
PyClass |
nativesql | public PyObject nativesql(PyObject nativeSQL)(Code) | | Converts the given SQL statement into the system's native SQL grammar. A
driver may convert the JDBC sql grammar into its system's native SQL grammar
prior to sending it; this method returns the native form of the statement
that the driver would have sent.
Parameters: nativeSQL - the native form of this statement |
remove | void remove(PyCursor cursor)(Code) | | Remove an open PyCursor.
Parameters: cursor - |
rollback | public void rollback()(Code) | | This method is optional since not all databases provide transaction
support.
In case a database does provide transactions this method causes the database
to roll back to the start of any pending transaction. Closing a connection
without committing the changes first will cause an implicit rollback to be
performed.
|
toString | public String toString()(Code) | | Produces a string representation of the object.
string representation of the object. |
Methods inherited from org.python.core.PyObject | public PyObject __abs__()(Code)(Java Doc) public PyObject __add__(PyObject other)(Code)(Java Doc) public PyObject __and__(PyObject other)(Code)(Java Doc) public PyObject __call__(PyObject args, String keywords)(Code)(Java Doc) public PyObject __call__(PyObject arg1, PyObject args, String keywords)(Code)(Java Doc) public PyObject __call__(PyObject args)(Code)(Java Doc) public PyObject __call__()(Code)(Java Doc) public PyObject __call__(PyObject arg0)(Code)(Java Doc) public PyObject __call__(PyObject arg0, PyObject arg1)(Code)(Java Doc) public PyObject __call__(PyObject arg0, PyObject arg1, PyObject arg2)(Code)(Java Doc) public PyObject __call__(PyObject arg0, PyObject arg1, PyObject arg2, PyObject arg3)(Code)(Java Doc) public int __cmp__(PyObject other)(Code)(Java Doc) final public PyObject __coerce__(PyObject pyo)(Code)(Java Doc) public Object __coerce_ex__(PyObject o)(Code)(Java Doc) public PyComplex __complex__()(Code)(Java Doc) public boolean __contains__(PyObject o)(Code)(Java Doc) final public void __delattr__(PyString name)(Code)(Java Doc) public void __delattr__(String name)(Code)(Java Doc) public void __delete__(PyObject obj)(Code)(Java Doc) public void __delitem__(PyObject key)(Code)(Java Doc) public void __delitem__(String key)(Code)(Java Doc) public void __delslice__(PyObject s_start, PyObject s_stop, PyObject s_step)(Code)(Java Doc) public void __delslice__(PyObject start, PyObject stop)(Code)(Java Doc) public PyObject __dir__()(Code)(Java Doc) public PyObject __div__(PyObject other)(Code)(Java Doc) public PyObject __divmod__(PyObject other)(Code)(Java Doc) public PyObject __eq__(PyObject other)(Code)(Java Doc) final public PyObject __findattr__(PyString name)(Code)(Java Doc) public PyObject __findattr__(String name)(Code)(Java Doc) public PyObject __finditem__(PyObject key)(Code)(Java Doc) public PyObject __finditem__(int key)(Code)(Java Doc) public PyObject __finditem__(String key)(Code)(Java Doc) public PyFloat __float__()(Code)(Java Doc) public PyObject __floordiv__(PyObject other)(Code)(Java Doc) public PyObject __ge__(PyObject other)(Code)(Java Doc) public PyObject __get__(PyObject obj, PyObject type)(Code)(Java Doc) final public PyObject __getattr__(PyString name)(Code)(Java Doc) final public PyObject __getattr__(String name)(Code)(Java Doc) public PyObject __getitem__(int key)(Code)(Java Doc) public PyObject __getitem__(PyObject key)(Code)(Java Doc) public PyTuple __getnewargs__()(Code)(Java Doc) public PyObject __getslice__(PyObject s_start, PyObject s_stop, PyObject s_step)(Code)(Java Doc) public PyObject __getslice__(PyObject start, PyObject stop)(Code)(Java Doc) public PyObject __gt__(PyObject other)(Code)(Java Doc) final public PyInteger __hash__()(Code)(Java Doc) public PyString __hex__()(Code)(Java Doc) public PyObject __iadd__(PyObject other)(Code)(Java Doc) public PyObject __iand__(PyObject other)(Code)(Java Doc) public PyObject __idiv__(PyObject other)(Code)(Java Doc) public PyObject __idivmod__(PyObject other)(Code)(Java Doc) public PyObject __ifloordiv__(PyObject other)(Code)(Java Doc) public PyObject __ilshift__(PyObject other)(Code)(Java Doc) public PyObject __imod__(PyObject other)(Code)(Java Doc) public PyObject __imul__(PyObject other)(Code)(Java Doc) public PyObject __int__()(Code)(Java Doc) public PyObject __invert__()(Code)(Java Doc) public PyObject __ior__(PyObject other)(Code)(Java Doc) public PyObject __ipow__(PyObject other)(Code)(Java Doc) public PyObject __irshift__(PyObject other)(Code)(Java Doc) public PyObject __isub__(PyObject other)(Code)(Java Doc) public PyObject __iter__()(Code)(Java Doc) public PyObject __iternext__()(Code)(Java Doc) public PyObject __itruediv__(PyObject other)(Code)(Java Doc) public PyObject __ixor__(PyObject other)(Code)(Java Doc) public PyObject __le__(PyObject other)(Code)(Java Doc) public int __len__()(Code)(Java Doc) public PyLong __long__()(Code)(Java Doc) public PyObject __lshift__(PyObject other)(Code)(Java Doc) public PyObject __lt__(PyObject other)(Code)(Java Doc) public PyObject __mod__(PyObject other)(Code)(Java Doc) public PyObject __mul__(PyObject other)(Code)(Java Doc) public PyObject __ne__(PyObject other)(Code)(Java Doc) public PyObject __neg__()(Code)(Java Doc) public boolean __nonzero__()(Code)(Java Doc) public PyObject __not__()(Code)(Java Doc) public PyString __oct__()(Code)(Java Doc) public PyObject __or__(PyObject other)(Code)(Java Doc) public PyObject __pos__()(Code)(Java Doc) public PyObject __pow__(PyObject o2, PyObject o3)(Code)(Java Doc) public PyObject __pow__(PyObject other)(Code)(Java Doc) public PyObject __radd__(PyObject other)(Code)(Java Doc) public PyObject __rand__(PyObject other)(Code)(Java Doc) protected void __rawdir__(PyDictionary accum)(Code)(Java Doc) public PyObject __rdiv__(PyObject other)(Code)(Java Doc) public PyObject __rdivmod__(PyObject other)(Code)(Java Doc) public PyObject __reduce__()(Code)(Java Doc) public PyString __repr__()(Code)(Java Doc) public PyObject __rfloordiv__(PyObject other)(Code)(Java Doc) public PyObject __rlshift__(PyObject other)(Code)(Java Doc) public PyObject __rmod__(PyObject other)(Code)(Java Doc) public PyObject __rmul__(PyObject other)(Code)(Java Doc) public PyObject __ror__(PyObject other)(Code)(Java Doc) public PyObject __rpow__(PyObject other)(Code)(Java Doc) public PyObject __rrshift__(PyObject other)(Code)(Java Doc) public PyObject __rshift__(PyObject other)(Code)(Java Doc) public PyObject __rsub__(PyObject other)(Code)(Java Doc) public PyObject __rtruediv__(PyObject other)(Code)(Java Doc) public PyObject __rxor__(PyObject other)(Code)(Java Doc) public void __set__(PyObject obj, PyObject value)(Code)(Java Doc) final public void __setattr__(PyString name, PyObject value)(Code)(Java Doc) public void __setattr__(String name, PyObject value)(Code)(Java Doc) public void __setitem__(PyObject key, PyObject value)(Code)(Java Doc) public void __setitem__(String key, PyObject value)(Code)(Java Doc) public void __setitem__(int key, PyObject value)(Code)(Java Doc) public void __setslice__(PyObject s_start, PyObject s_stop, PyObject s_step, PyObject value)(Code)(Java Doc) public void __setslice__(PyObject start, PyObject stop, PyObject value)(Code)(Java Doc) public PyString __str__()(Code)(Java Doc) public PyObject __sub__(PyObject other)(Code)(Java Doc) public Object __tojava__(Class c)(Code)(Java Doc) public PyObject __truediv__(PyObject other)(Code)(Java Doc) public PyUnicode __unicode__()(Code)(Java Doc) public PyObject __xor__(PyObject other)(Code)(Java Doc) final public PyObject _add(PyObject o2)(Code)(Java Doc) final public PyObject _and(PyObject o2)(Code)(Java Doc) public PyObject _callextra(PyObject[] args, String[] keywords, PyObject starargs, PyObject kwargs)(Code)(Java Doc) final public int _cmp(PyObject o)(Code)(Java Doc) final public PyObject _div(PyObject o2)(Code)(Java Doc) final public PyObject _divmod(PyObject o2)(Code)(Java Doc) public PyObject _doget(PyObject container)(Code)(Java Doc) public PyObject _doget(PyObject container, PyObject wherefound)(Code)(Java Doc) public boolean _doset(PyObject container, PyObject value)(Code)(Java Doc) final public PyObject _eq(PyObject o)(Code)(Java Doc) final public PyObject _floordiv(PyObject o2)(Code)(Java Doc) final public PyObject _ge(PyObject o)(Code)(Java Doc) final public PyObject _gt(PyObject o)(Code)(Java Doc) final public PyObject _in(PyObject o)(Code)(Java Doc) public PyObject _is(PyObject o)(Code)(Java Doc) public PyObject _isnot(PyObject o)(Code)(Java Doc) public PyObject _jcall(Object[] args)(Code)(Java Doc) public PyObject _jcallexc(Object[] args) throws Throwable(Code)(Java Doc) public void _jthrow(Throwable t)(Code)(Java Doc) final public PyObject _le(PyObject o)(Code)(Java Doc) final public PyObject _lshift(PyObject o2)(Code)(Java Doc) final public PyObject _lt(PyObject o)(Code)(Java Doc) final public PyObject _mod(PyObject o2)(Code)(Java Doc) final public PyObject _mul(PyObject o2)(Code)(Java Doc) final public PyObject _ne(PyObject o)(Code)(Java Doc) final public PyObject _notin(PyObject o)(Code)(Java Doc) final public PyObject _or(PyObject o2)(Code)(Java Doc) final public PyObject _pow(PyObject o2)(Code)(Java Doc) final public PyObject _rshift(PyObject o2)(Code)(Java Doc) final public PyObject _sub(PyObject o2)(Code)(Java Doc) final public PyObject _truediv(PyObject o2)(Code)(Java Doc) final protected String _unsupportedop(String op, PyObject o2)(Code)(Java Doc) final public PyObject _xor(PyObject o2)(Code)(Java Doc) protected void addKeys(PyDictionary accum, String attr)(Code)(Java Doc) public int asInt(int index) throws ConversionException(Code)(Java Doc) public long asLong(int index) throws ConversionException(Code)(Java Doc) public String asName(int index) throws ConversionException(Code)(Java Doc) public String asString(int index) throws ConversionException(Code)(Java Doc) public String asStringOrNull(int index) throws ConversionException(Code)(Java Doc) public void delDict()(Code)(Java Doc) public void delType()(Code)(Java Doc) public void dispatch__init__(PyType type, PyObject[] args, String[] keywords)(Code)(Java Doc) public boolean equals(Object ob_other)(Code)(Java Doc) public PyObject fastGetClass()(Code)(Java Doc) public PyObject fastGetDict()(Code)(Java Doc) public PyObject getDict()(Code)(Java Doc) public PyObject getDoc()(Code)(Java Doc) public PyType getType()(Code)(Java Doc) public int hashCode()(Code)(Java Doc) protected PyObject impAttr(String name)(Code)(Java Doc) public boolean implementsDescrDelete()(Code)(Java Doc) public boolean implementsDescrSet()(Code)(Java Doc) public PyObject invoke(String name, PyObject[] args, String[] keywords)(Code)(Java Doc) public PyObject invoke(String name, PyObject[] args)(Code)(Java Doc) public PyObject invoke(String name)(Code)(Java Doc) public PyObject invoke(String name, PyObject arg1)(Code)(Java Doc) public PyObject invoke(String name, PyObject arg1, PyObject arg2)(Code)(Java Doc) public boolean isCallable()(Code)(Java Doc) public boolean isDataDescr()(Code)(Java Doc) public boolean isMappingType()(Code)(Java Doc) public boolean isNumberType()(Code)(Java Doc) public boolean isSequenceType()(Code)(Java Doc) public void noAttributeError(String name)(Code)(Java Doc) public void readonlyAttributeError(String name)(Code)(Java Doc) protected String runsupportedopMessage(String op, PyObject o2)(Code)(Java Doc) public String safeRepr() throws PyIgnoreMethodTag(Code)(Java Doc) public void setDict(PyObject newDict)(Code)(Java Doc) public void setType(PyType type)(Code)(Java Doc) public String toString()(Code)(Java Doc) public static void typeSetup(PyObject dict, PyType.Newstyle marker)(Code)(Java Doc) protected String unsupportedopMessage(String op, PyObject o2)(Code)(Java Doc)
|
|
|