C# Класс Mono.Data.Sqlite.SqliteCommand

Наследование: System.Data.Common.DbCommand, ICloneable
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
BuildNextCommand SqliteStatement
ClearCommands void
ClearDataReader void
GetStatement SqliteStatement
InitializeForReader void
SqliteCommand System

Открытые методы

Метод Описание
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

Защищенные методы

Метод Описание
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

Приватные методы

Метод Описание
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

Описание методов

Cancel() публичный Метод

Not implemented
public Cancel ( ) : void
Результат void

Clone() публичный Метод

Clones a command, including all its parameters
public Clone ( ) : object
Результат object

CreateDbParameter() защищенный Метод

Forwards to the local CreateParameter() function
protected CreateDbParameter ( ) : DbParameter
Результат System.Data.Common.DbParameter

CreateParameter() публичный Метод

Create a new parameter
public CreateParameter ( ) : SqliteParameter
Результат SqliteParameter

Dispose() защищенный Метод

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
Результат void

ExecuteDbDataReader() защищенный Метод

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
Результат System.Data.Common.DbDataReader

ExecuteNonQuery() публичный Метод

Execute the command and return the number of rows inserted/updated affected by it.
public ExecuteNonQuery ( ) : int
Результат int

ExecuteReader() публичный Метод

Overrides the default behavior of DbDataReader to return a specialized SqliteDataReader class
public ExecuteReader ( ) : SqliteDataReader
Результат SqliteDataReader

ExecuteReader() публичный Метод

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
Результат SqliteDataReader

ExecuteScalar() публичный Метод

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
Результат object

LastInsertRowID() публичный Метод

public LastInsertRowID ( ) : long
Результат long

Prepare() публичный Метод

Does nothing. Commands are prepared as they are executed the first time, and kept in prepared state afterwards.
public Prepare ( ) : void
Результат void

SqliteCommand() публичный Метод

Default constructor
public SqliteCommand ( ) : System
Результат System

SqliteCommand() публичный Метод

Initializes the command and associates it with the specified connection.
public SqliteCommand ( SqliteConnection connection ) : System
connection SqliteConnection The connection to associate with the command
Результат System

SqliteCommand() публичный Метод

Initializes the command with the given command text
public SqliteCommand ( string commandText ) : System
commandText string The SQL command text
Результат System

SqliteCommand() публичный Метод

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
Результат System

SqliteCommand() публичный Метод

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
Результат System