Additional top-level class in compilation unit: ConnectionFunc.
| Modifier and Type | Field and Description |
|---|---|
| protected static PyList | __members__
Field __members__ |
| protected static PyList | __methods__
Field __methods__ |
| protected boolean | closed
True if closed. |
| protected Connection | connection
The underlying java.sql.Connection. |
| private Set | cursors
Underlying cursors. |
| private Set | statements
Underlying statements. |
| protected boolean | supportsMultipleResultSets
Whether multiple ResultSets are supported. |
| protected boolean | supportsTransactions
Whether transactions are supported. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public PyObject | |
| public PyObject | |
| public boolean | |
| public boolean | |
| public PyObject | Returns: the value for the attribute of the specified namethe name of the attribute of interest name)Overrides org. Finds the attribute. |
| public void | __setattr__(String name, PyObject value)
Overrides org. Sets the attribute. |
| pack-priv void | |
| public static void | |
| public void | |
| public void | |
| pack-priv boolean | |
| public PyCursor | |
| public PyCursor | Returns: a new cursor using this connectionif true, dynamically iterate the result dynamicFetch)Return a new Cursor Object using the connection. |
| public PyCursor | |
| public PyObject | |
| public boolean | refersDirectlyTo(PyObject ob)
Implements org. Optional operation. |
| pack-priv void | |
| public void | |
| public String | Returns: string representation of the object.Overrides org. Produces a string representation of the object. |
| public int | traverse(Visitproc visit, Object arg)
Implements org. Traverses all directly contained |
| __members__ | back to summary |
|---|---|
| protected static PyList __members__ Field __members__ | |
| __methods__ | back to summary |
|---|---|
| protected static PyList __methods__ Field __methods__ | |
| closed | back to summary |
|---|---|
| protected boolean closed True if closed. | |
| connection | back to summary |
|---|---|
| protected Connection connection The underlying java.sql.Connection. | |
| cursors | back to summary |
|---|---|
| private Set<PyCursor> cursors Underlying cursors. | |
| statements | back to summary |
|---|---|
| private Set<PyStatement> statements Underlying statements. | |
| supportsMultipleResultSets | back to summary |
|---|---|
| protected boolean supportsMultipleResultSets Whether multiple ResultSets are supported. | |
| supportsTransactions | back to summary |
|---|---|
| protected boolean supportsTransactions Whether transactions are supported. | |
| PyConnection | back to summary |
|---|---|
| public PyConnection(Connection connection) throws SQLException Create a PyConnection with the open connection. | |
| __enter__ | back to summary |
|---|---|
| public PyObject __enter__(ThreadState ts) Implements org. | |
| __enter__ | back to summary |
|---|---|
| public PyObject __enter__() | |
| __exit__ | back to summary |
|---|---|
| public boolean __exit__(ThreadState ts, PyException exception) Implements org. | |
| __exit__ | back to summary |
|---|---|
| public boolean __exit__(PyObject type, PyObject value, PyObject traceback) | |
| __findattr_ex__ | back to summary |
|---|---|
| public PyObject __findattr_ex__(String name) Overrides org. Finds the attribute. | |
| __setattr__ | back to summary |
|---|---|
| public void __setattr__(String name, PyObject value) Overrides org. Sets the attribute.
| |
| add | back to summary |
|---|---|
| pack-priv void add(PyStatement statement) Method register
| |
| classDictInit | back to summary |
|---|---|
| public static void classDictInit(PyObject dict) Method classDictInit | |
| close | back to summary |
|---|---|
| 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. The same applies to all cursor objects trying to use the connection. | |
| commit | back to summary |
|---|---|
| public void commit() 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 | back to summary |
|---|---|
| pack-priv boolean contains(PyStatement statement) Method contains
| |
| cursor | back to summary |
|---|---|
| public PyCursor cursor() 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.
| |
| cursor | back to summary |
|---|---|
| public PyCursor cursor(boolean dynamicFetch) 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.
| |
| cursor | back to summary |
|---|---|
| public PyCursor cursor(boolean dynamicFetch, PyObject rsType, PyObject rsConcur) 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 | |
| nativesql | back to summary |
|---|---|
| public PyObject nativesql(PyObject nativeSQL) 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.
| |
| refersDirectlyTo | back to summary |
|---|---|
| public boolean refersDirectlyTo(PyObject ob) Implements org. Doc from org. Optional operation.
Should only be implemented if it is more efficient
than calling
| |
| remove | back to summary |
|---|---|
| pack-priv void remove(PyCursor cursor) Remove an open PyCursor. | |
| rollback | back to summary |
|---|---|
| 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. Closing a connection without committing the changes first will cause an implicit rollback to be performed. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides org. Produces a string representation of the object. | |
| traverse | back to summary |
|---|---|
| public int traverse(Visitproc visit, Object arg) Implements org. Doc from org. Traverses all directly contained
| |