C# Class Mono.Data.Sqlite.SqliteCommand

Inheritance: System.Data.Common.DbCommand, ICloneable
Afficher le fichier Open project: rubenv/tripod Class Usage Examples

Private Properties

Свойство Type Description
BuildNextCommand SqliteStatement
ClearCommands void
ClearDataReader void
GetStatement SqliteStatement
InitializeForReader void
SqliteCommand System

Méthodes publiques

Méthode 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

Méthodes protégées

Méthode 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

Méthode 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 méthode

Not implemented
public Cancel ( ) : void
Résultat void

Clone() public méthode

Clones a command, including all its parameters
public Clone ( ) : object
Résultat object

CreateDbParameter() protected méthode

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

CreateParameter() public méthode

Create a new parameter
public CreateParameter ( ) : SqliteParameter
Résultat SqliteParameter

Dispose() protected méthode

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
Résultat void

ExecuteDbDataReader() protected méthode

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
Résultat System.Data.Common.DbDataReader

ExecuteNonQuery() public méthode

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

ExecuteReader() public méthode

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

ExecuteReader() public méthode

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
Résultat SqliteDataReader

ExecuteScalar() public méthode

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
Résultat object

LastInsertRowID() public méthode

public LastInsertRowID ( ) : long
Résultat long

Prepare() public méthode

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

SqliteCommand() public méthode

Default constructor
public SqliteCommand ( ) : System
Résultat System

SqliteCommand() public méthode

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

SqliteCommand() public méthode

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

SqliteCommand() public méthode

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
Résultat System

SqliteCommand() public méthode

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
Résultat System