C# Class MySql.Data.MySqlClient.MySqlScript

Provides a class capable of executing a SQL script containing multiple SQL statements including CREATE PROCEDURE statements that require changing the delimiter
Mostra file Open project: 2014-sed-team3/term-project Class Usage Examples

Public Methods

Method Description
Execute ( ) : int

Executes this instance.

ExecuteAsync ( ) : Task

Async version of Execute

MySqlScript ( ) : MySql.Data.Common

Initializes a new instance of the MySqlScript class.

MySqlScript ( MySqlConnection connection ) : MySql.Data.Common

Initializes a new instance of the MySqlScript class.

MySqlScript ( MySqlConnection connection, string query ) : MySql.Data.Common

Initializes a new instance of the MySqlScript class.

MySqlScript ( string query ) : MySql.Data.Common

Initializes a new instance of the MySqlScript class.

Private Methods

Method Description
AdjustDelimiterEnd ( MySqlTokenizer tokenizer ) : void
BreakIntoStatements ( bool ansiQuotes, bool noBackslashEscapes ) : List
BreakScriptIntoLines ( ) : List
FindLineNumber ( int position, List lineNumbers ) : int
OnQueryExecuted ( ScriptStatement statement ) : void
OnScriptCompleted ( ) : void
OnScriptError ( Exception ex ) : bool

Method Details

Execute() public method

Executes this instance.
public Execute ( ) : int
return int

ExecuteAsync() public method

Async version of Execute
public ExecuteAsync ( ) : Task
return Task

MySqlScript() public method

Initializes a new instance of the MySqlScript class.
public MySqlScript ( ) : MySql.Data.Common
return MySql.Data.Common

MySqlScript() public method

Initializes a new instance of the MySqlScript class.
public MySqlScript ( MySqlConnection connection ) : MySql.Data.Common
connection MySqlConnection The connection.
return MySql.Data.Common

MySqlScript() public method

Initializes a new instance of the MySqlScript class.
public MySqlScript ( MySqlConnection connection, string query ) : MySql.Data.Common
connection MySqlConnection The connection.
query string The query.
return MySql.Data.Common

MySqlScript() public method

Initializes a new instance of the MySqlScript class.
public MySqlScript ( string query ) : MySql.Data.Common
query string The query.
return MySql.Data.Common