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

public Class PyStatement

extends PyObject
implements Traverseproc
Class Inheritance
All Implemented Interfaces
org.python.core.Traverseproc
Imports
org.python.core.Visitproc, .codecs, .Py, .PyException, .PyList, .PyObject, .PyString, .PyUnicode, .Traverseproc, java.sql.CallableStatement, .PreparedStatement, .SQLException, .Statement

Class PyStatement
Author
brian zimmer

Field Summary

Modifier and TypeField and Description
protected static PyList
__members__

Field __members__

protected static PyList
__methods__

Field __methods__

private boolean
closed

Whether this statement is closed.

private Object
sql

The underlying sql, a String or a Procedure.

pack-priv Statement
statement

The underlying java.sql.Statement.

public static final int
STATEMENT_CALLABLE

Denotes a stored procedure call.

public static final int
STATEMENT_PREPARED

Denotes a PreparedStatement either explicitly created by the user, or from a cursor (due to the presence of bind parameters).

public static final int
STATEMENT_STATIC

Denotes a simple Statement with no parameters.

private int
style

One of the above styles.

Inherited from org.python.core.PyObject:
attributesgcMonitorGlobalobjtypeTYPE

Constructor Summary

AccessConstructor and Description
public
PyStatement(Statement statement, Object sql, int style)

Constructor PyStatement

public
PyStatement(Statement statement, Procedure procedure)

Constructor PyStatement

Method Summary

Modifier and TypeMethod and Description
public void
__del__()

Delete the statement.

public PyObject

Returns:

the attribute for the given name
__findattr_ex__
(String name)

Overrides org.python.core.PyObject.__findattr_ex__.

Gets the value of the attribute name.

public PyString
__str__()

Overrides org.python.core.PyObject.__str__.

Equivalent to the standard Python __str__ method.

public PyUnicode
public static void
classDictInit(PyObject dict)

Initializes the object's namespace.

public void
close()

Method close

public void
execute(PyCursor cursor, PyObject params, PyObject bindings)

Method execute

private void
prepare(PyCursor cursor, PyObject params, PyObject bindings)

Method prepare

public boolean
public String
toString()

Overrides org.python.core.PyObject.toString.

Returns a string representation of the object.

public int
traverse(Visitproc visit, Object arg)

Implements org.python.core.Traverseproc.traverse.

Traverses all directly contained PyObjects.

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____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____sub____tojava____truediv____trunc____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__readonlyAttributeErrorrunsupportedopMessagesetDictsetTypeunsupportedopMessage

Field Detail

__members__back to summary
protected static PyList __members__

Field __members__

__methods__back to summary
protected static PyList __methods__

Field __methods__

closedback to summary
private boolean closed

Whether this statement is closed.

sqlback to summary
private Object sql

The underlying sql, a String or a Procedure.

statementback to summary
pack-priv Statement statement

The underlying java.sql.Statement.

STATEMENT_CALLABLEback to summary
public static final int STATEMENT_CALLABLE

Denotes a stored procedure call.

STATEMENT_PREPAREDback to summary
public static final int STATEMENT_PREPARED

Denotes a PreparedStatement either explicitly created by the user, or from a cursor (due to the presence of bind parameters).

STATEMENT_STATICback to summary
public static final int STATEMENT_STATIC

Denotes a simple Statement with no parameters.

styleback to summary
private int style

One of the above styles.

Constructor Detail

PyStatementback to summary
public PyStatement(Statement statement, Object sql, int style)

Constructor PyStatement

PyStatementback to summary
public PyStatement(Statement statement, Procedure procedure)

Constructor PyStatement

Method Detail

__del__back to summary
public void __del__()

Delete the statement.

__findattr_ex__back to summary
public PyObject __findattr_ex__(String name)

Overrides org.python.core.PyObject.__findattr_ex__.

Gets the value of the attribute name.

Returns:PyObject

the attribute for the given name

Annotations
@Override

__str__back to summary
public PyString __str__()

Overrides org.python.core.PyObject.__str__.

Doc from org.python.core.PyObject.__str__.

Equivalent to the standard Python __str__ method. The default implementation (in PyObject) calls __repr__(), making it unnecessary to override __str__ in sub-classes of PyObject where both forms are the same. A common choice is to provide the same implementation to __str__ and toString, for consistency in the printed form of objects between Python and Java.

Annotations
@Override
__unicode__back to summary
public PyUnicode __unicode__()

Overrides org.python.core.PyObject.__unicode__.

Annotations
@Override
classDictInitback to summary
public static void classDictInit(PyObject dict)

Initializes the object's namespace.

closeback to summary
public void close()

Method close

executeback to summary
public void execute(PyCursor cursor, PyObject params, PyObject bindings) throws SQLException

Method execute

prepareback to summary
private void prepare(PyCursor cursor, PyObject params, PyObject bindings) throws SQLException

Method prepare

refersDirectlyToback to summary
public boolean refersDirectlyTo(PyObject ob)

Implements org.python.core.Traverseproc.refersDirectlyTo.

Doc from org.python.core.Traverseproc.refersDirectlyTo.

Optional operation. Should only be implemented if it is more efficient than calling traverse(Visitproc, Object) with a visitproc that just watches out for ob. Must return false if ob is null.

Annotations
@Override
toStringback to summary
public String toString()

Overrides org.python.core.PyObject.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override

traverseback to summary
public int traverse(Visitproc visit, Object arg)

Implements org.python.core.Traverseproc.traverse.

Doc from org.python.core.Traverseproc.traverse.

Traverses all directly contained PyObjects. Like in CPython, arg must be passed unmodified to visit as its second parameter. If Visitproc#visit(PyObject, Object) returns nonzero, this return value must be returned immediately by traverse. Visitproc#visit(PyObject, Object) must not be called with a null PyObject-argument.

Annotations
@Override