|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.python.core.PyObject
com.ziclix.python.sql.PyConnection
public class PyConnection
A connection to the database.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.python.core.PyObject |
---|
PyObject.ConversionException |
Field Summary |
---|
Fields inherited from class org.python.core.PyObject |
---|
TYPE |
Constructor Summary | |
---|---|
PyConnection(Connection connection)
Create a PyConnection with the open connection. |
Method Summary | |
---|---|
PyObject |
__enter__()
|
PyObject |
__enter__(ThreadState ts)
|
boolean |
__exit__(PyObject type,
PyObject value,
PyObject traceback)
|
boolean |
__exit__(ThreadState ts,
PyException exception)
|
PyObject |
__findattr_ex__(String name)
Finds the attribute. |
void |
__setattr__(String name,
PyObject value)
Sets the attribute. |
static void |
classDictInit(PyObject dict)
Method classDictInit |
void |
close()
Close the connection now (rather than whenever __del__ is called). |
void |
commit()
Commit any pending transaction to the database. |
PyCursor |
cursor()
Return a new Cursor Object using the connection. |
PyCursor |
cursor(boolean dynamicFetch)
Return a new Cursor Object using the connection. |
PyCursor |
cursor(boolean dynamicFetch,
PyObject rsType,
PyObject rsConcur)
Return a new Cursor Object using the connection. |
PyObject |
nativesql(PyObject nativeSQL)
Converts the given SQL statement into the system's native SQL grammar. |
void |
rollback()
This method is optional since not all databases provide transaction support. |
String |
toString()
Produces a string representation of the object. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PyConnection(Connection connection) throws SQLException
connection
-
SQLException
Method Detail |
---|
public String toString()
toString
in class PyObject
public static void classDictInit(PyObject dict)
dict
- public void __setattr__(String name, PyObject value)
__setattr__
in class PyObject
name
- value
- PyObject.__setattr__(PyString, PyObject)
public PyObject __findattr_ex__(String name)
__findattr_ex__
in class PyObject
name
- the name of the attribute of interest
public void close()
public void commit()
public void rollback()
public PyObject nativesql(PyObject nativeSQL)
nativeSQL
-
public PyCursor cursor()
public PyCursor cursor(boolean dynamicFetch)
dynamicFetch
- if true, dynamically iterate the result
public PyCursor cursor(boolean dynamicFetch, PyObject rsType, PyObject rsConcur)
dynamicFetch
- if true, dynamically iterate the resultrsType
- the type of the underlying ResultSetrsConcur
- the concurrency of the underlying ResultSet
public PyObject __enter__(ThreadState ts)
__enter__
in interface ContextManager
public PyObject __enter__()
public boolean __exit__(ThreadState ts, PyException exception)
__exit__
in interface ContextManager
public boolean __exit__(PyObject type, PyObject value, PyObject traceback)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |