C# Class Mono.Data.Sqlite.SqliteCommand

Inheritance: System.Data.Common.DbCommand, ICloneable
显示文件 Open project: rubenv/tripod Class Usage Examples

Private Properties

Property Type Description
BuildNextCommand SqliteStatement
ClearCommands void
ClearDataReader void
GetStatement SqliteStatement
InitializeForReader void
SqliteCommand System

Public Methods

Method Description
Cancel ( ) : void

Not implemented

Clone ( ) : object

Clones a command, including all its parameters

CreateParameter ( ) : SqliteParameter

Create a new parameter

ExecuteNonQuery ( ) : int

Execute the command and return the number of rows inserted/updated affected by it.

ExecuteReader ( ) : SqliteDataReader

Overrides the default behavior of DbDataReader to return a specialized SqliteDataReader class

ExecuteReader ( CommandBehavior behavior ) : SqliteDataReader

Overrides the default behavior to return a SqliteDataReader specialization class

ExecuteScalar ( ) : object

Execute the command and return the first column of the first row of the resultset (if present), or null if no resultset was returned.

LastInsertRowID ( ) : long
Prepare ( ) : void

Does nothing. Commands are prepared as they are executed the first time, and kept in prepared state afterwards.

SqliteCommand ( ) : System

Default constructor

SqliteCommand ( SqliteConnection connection ) : System

Initializes the command and associates it with the specified connection.

SqliteCommand ( string commandText ) : System

Initializes the command with the given command text

SqliteCommand ( string commandText, SqliteConnection connection ) : System

Initializes the command with the given SQL command text and attach the command to the specified connection.

SqliteCommand ( string commandText, SqliteConnection connection, SqliteTransaction transaction ) : System

Initializes a command with the given SQL, connection and transaction

Protected Methods

Method Description
CreateDbParameter ( ) : DbParameter

Forwards to the local CreateParameter() function

Dispose ( bool disposing ) : void

Disposes of the command and clears all member variables

ExecuteDbDataReader ( CommandBehavior behavior ) : System.Data.Common.DbDataReader

Creates a new SqliteDataReader to execute/iterate the array of Sqlite prepared statements

Private Methods

Method Description
BuildNextCommand ( ) : SqliteStatement

Builds an array of prepared statements for each complete SQL statement in the command text

ClearCommands ( ) : void

Clears and destroys all statements currently prepared

ClearDataReader ( ) : void

Called by the SqliteDataReader when the data reader is closed.

GetStatement ( int index ) : SqliteStatement
InitializeForReader ( ) : void

This function ensures there are no active readers, that we have a valid connection, that the connection is open, that all statements are prepared and all parameters are assigned in preparation for allocating a data reader.

SqliteCommand ( SqliteCommand source ) : System

Method Details

Cancel() public method

Not implemented
public Cancel ( ) : void
return void

Clone() public method

Clones a command, including all its parameters
public Clone ( ) : object
return object

CreateDbParameter() protected method

Forwards to the local CreateParameter() function
protected CreateDbParameter ( ) : DbParameter
return System.Data.Common.DbParameter

CreateParameter() public method

Create a new parameter
public CreateParameter ( ) : SqliteParameter
return SqliteParameter

Dispose() protected method

Disposes of the command and clears all member variables
protected Dispose ( bool disposing ) : void
disposing bool Whether or not the class is being explicitly or implicitly disposed
return void

ExecuteDbDataReader() protected method

Creates a new SqliteDataReader to execute/iterate the array of Sqlite prepared statements
protected ExecuteDbDataReader ( CommandBehavior behavior ) : System.Data.Common.DbDataReader
behavior CommandBehavior The behavior the data reader should adopt
return System.Data.Common.DbDataReader

ExecuteNonQuery() public method

Execute the command and return the number of rows inserted/updated affected by it.
public ExecuteNonQuery ( ) : int
return int

ExecuteReader() public method

Overrides the default behavior of DbDataReader to return a specialized SqliteDataReader class
public ExecuteReader ( ) : SqliteDataReader
return SqliteDataReader

ExecuteReader() public method

Overrides the default behavior to return a SqliteDataReader specialization class
public ExecuteReader ( CommandBehavior behavior ) : SqliteDataReader
behavior CommandBehavior The flags to be associated with the reader
return SqliteDataReader

ExecuteScalar() public method

Execute the command and return the first column of the first row of the resultset (if present), or null if no resultset was returned.
public ExecuteScalar ( ) : object
return object

LastInsertRowID() public method

public LastInsertRowID ( ) : long
return long

Prepare() public method

Does nothing. Commands are prepared as they are executed the first time, and kept in prepared state afterwards.
public Prepare ( ) : void
return void

SqliteCommand() public method

Default constructor
public SqliteCommand ( ) : System
return System

SqliteCommand() public method

Initializes the command and associates it with the specified connection.
public SqliteCommand ( SqliteConnection connection ) : System
connection SqliteConnection The connection to associate with the command
return System

SqliteCommand() public method

Initializes the command with the given command text
public SqliteCommand ( string commandText ) : System
commandText string The SQL command text
return System

SqliteCommand() public method

Initializes the command with the given SQL command text and attach the command to the specified connection.
public SqliteCommand ( string commandText, SqliteConnection connection ) : System
commandText string The SQL command text
connection SqliteConnection The connection to associate with the command
return System

SqliteCommand() public method

Initializes a command with the given SQL, connection and transaction
public SqliteCommand ( string commandText, SqliteConnection connection, SqliteTransaction transaction ) : System
commandText string The SQL command text
connection SqliteConnection The connection to associate with the command
transaction SqliteTransaction The transaction the command should be associated with
return System