Dela via


IStatement Interface

Definition

The object used for executing a static SQL statement and returning the results it produces.

[Android.Runtime.Register("java/sql/Statement", "", "Java.Sql.IStatementInvoker")]
public interface IStatement : IDisposable, Java.Interop.IJavaPeerable, Java.Sql.IWrapper
[<Android.Runtime.Register("java/sql/Statement", "", "Java.Sql.IStatementInvoker")>]
type IStatement = interface
    interface IWrapper
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
Derived
Attributes
Implements

Remarks

The object used for executing a static SQL statement and returning the results it produces.

By default, only one ResultSet object per Statement object can be open at the same time. Therefore, if the reading of one ResultSet object is interleaved with the reading of another, each must have been generated by different Statement objects. All execution methods in the Statement interface implicitly close a statment's current ResultSet object if an open one exists.

Java documentation for java.sql.Statement.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Fields

CloseAllResults

The constant indicating that all ResultSet objects that have previously been kept open should be closed when calling getMoreResults.

CloseCurrentResult

The constant indicating that the current ResultSet object should be closed when calling getMoreResults.

ExecuteFailed

The constant indicating that an error occured while executing a batch statement.

KeepCurrentResult

The constant indicating that the current ResultSet object should not be closed when calling getMoreResults.

NoGeneratedKeys

The constant indicating that generated keys should not be made available for retrieval.

ReturnGeneratedKeys

The constant indicating that generated keys should be made available for retrieval.

SuccessNoInfo

The constant indicating that a batch statement executed successfully but that no count of the number of rows it affected is available.

Properties

Connection

Gets the Connection object which created this statement.

FetchDirection

Gets the default direction for fetching rows for ResultSets generated from this statement.

FetchSize

Gets the default number of rows for a fetch for the ResultSet objects returned from this statement.

GeneratedKeys

Returns auto generated keys created by executing this statement.

Handle

Gets the JNI value of the underlying Android object.

(Inherited from IJavaObject)
IsClosed

Returns true if this statement has been closed, false otherwise.

JniIdentityHashCode

Returns the value of java.lang.System.identityHashCode() for the wrapped instance.

(Inherited from IJavaPeerable)
JniManagedPeerState

State of the managed peer.

(Inherited from IJavaPeerable)
JniPeerMembers

Member access and invocation support.

(Inherited from IJavaPeerable)
MaxFieldSize

Gets the maximum number of bytes which can be returned as values from character and binary type columns in a ResultSet derived from this statement.

MaxRows

Gets the maximum number of rows that a ResultSet can contain when produced from this statement.

MoreResults

Moves to this statement's next result.

PeerReference

Returns a JniObjectReference of the wrapped Java object instance.

(Inherited from IJavaPeerable)
Poolable

Returns true if this statement is poolable, false otherwise.

QueryTimeout

Gets the timeout value for the statement's execution time.

ResultSet

Gets the current result.

ResultSetConcurrency

Gets the concurrency setting for ResultSet objects generated by this statement.

ResultSetHoldability

Gets the cursor hold setting for ResultSet objects generated by this statement.

ResultSetType

Gets the ResultSet type setting for ResultSets derived from this statement.

UpdateCount

Gets an update count for the current result if it is not a ResultSet.

Warnings

Retrieves the first SQLWarning reported by calls on this statement.

Methods

AddBatch(String)

Adds the given SQL command to the current list of commmands for this Statement object.

Cancel()

Cancels this Statement object if both the DBMS and driver support aborting an SQL statement.

ClearBatch()

Empties this Statement object's current list of SQL commands.

ClearWarnings()

Clears all the warnings reported on this Statement object.

Close()

Releases this Statement object's database and JDBC resources immediately instead of waiting for this to happen when it is automatically closed.

Disposed()

Called when the instance has been disposed.

(Inherited from IJavaPeerable)
DisposeUnlessReferenced()

If there are no outstanding references to this instance, then calls Dispose(); otherwise, does nothing.

(Inherited from IJavaPeerable)
Execute(String, Int32)

Executes the given SQL statement, which may return multiple results, and signals the driver that any auto-generated keys should be made available for retrieval.

Execute(String, Int32[])

Executes the given SQL statement, which may return multiple results, and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval.

Execute(String, String[])

Executes the given SQL statement, which may return multiple results, and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval.

Execute(String)

Executes the given SQL statement, which may return multiple results.

ExecuteBatch()

Submits a batch of commands to the database for execution and if all commands execute successfully, returns an array of update counts.

ExecuteQuery(String)

Executes the given SQL statement, which returns a single ResultSet object.

ExecuteUpdate(String, Int32)

Executes the given SQL statement and signals the driver with the given flag about whether the auto-generated keys produced by this Statement object should be made available for retrieval.

ExecuteUpdate(String, Int32[])

Executes the given SQL statement and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval.

ExecuteUpdate(String, String[])

Executes the given SQL statement and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval.

ExecuteUpdate(String)

Executes the given SQL statement, which may be an INSERT, UPDATE, or DELETE statement or an SQL statement that returns nothing, such as an SQL DDL statement.

Finalized()

Called when the instance has been finalized.

(Inherited from IJavaPeerable)
GetMoreResults(Int32)

Moves to this Statement object's next result, deals with any current ResultSet object(s) according to the instructions specified by the given flag, and returns true if the next result is a ResultSet object.

IsWrapperFor(Class)

Returns true if this either implements the interface argument or is directly or indirectly a wrapper for an object that does.

(Inherited from IWrapper)
SetCursorName(String)

Sets the SQL cursor name to the given String, which will be used by subsequent Statement object execute methods.

SetEscapeProcessing(Boolean)

Sets escape processing on or off.

SetJniIdentityHashCode(Int32)

Set the value returned by JniIdentityHashCode.

(Inherited from IJavaPeerable)
SetJniManagedPeerState(JniManagedPeerStates) (Inherited from IJavaPeerable)
SetPeerReference(JniObjectReference)

Set the value returned by PeerReference.

(Inherited from IJavaPeerable)
UnregisterFromRuntime()

Unregister this instance so that the runtime will not return it from future Java.Interop.JniRuntime+JniValueManager.PeekValue invocations.

(Inherited from IJavaPeerable)
Unwrap(Class)

Returns an object that implements the given interface to allow access to non-standard methods, or standard methods not exposed by the proxy.

(Inherited from IWrapper)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to