Definition at line 30 of file VersionController.cs.
bool Ntp.Data.Schema.VersionController.CheckTable |
( |
| ) |
|
|
inlineprivate |
Definition at line 91 of file VersionController.cs.
References e.
93 IDbConnection connection = null;
100 command.Connection = connection;
103 log.SqlExecute(command.CommandText);
104 var reader = command.ExecuteReader();
105 return reader.Read();
109 log.VersionTableCreateError(e);
114 if (connection != null && connection.State == ConnectionState.Open)
string PrepareCheckTableSql(string table)
readonly ISqlFactory factory
IDbConnection CreateConnection()
IDbCommand CreateCommand()
void Ntp.Data.Schema.VersionController.CreateTable |
( |
| ) |
|
|
inlineprivate |
Definition at line 119 of file VersionController.cs.
References e.
121 IDbConnection connection = null;
128 command.Connection = connection;
131 log.SqlExecute(command.CommandText);
132 command.ExecuteNonQuery();
136 log.VersionTableCreateError(e);
140 if (connection != null && connection.State == ConnectionState.Open)
144 log.VersionTableCreated();
readonly ISqlFactory factory
IDbConnection CreateConnection()
IDbCommand CreateCommand()
int Ntp.Data.Schema.VersionController.FindCurrentVersion |
( |
| ) |
|
|
inline |
void Ntp.Data.Schema.VersionController.InsertTable |
( |
| ) |
|
|
inlineprivate |
Definition at line 147 of file VersionController.cs.
References e.
149 IDbConnection connection = null;
156 command.Connection = connection;
159 log.SqlExecute(command.CommandText);
160 command.ExecuteNonQuery();
164 log.VersionTableInsertError(e);
168 if (connection != null && connection.State == ConnectionState.Open)
readonly ISqlFactory factory
IDbConnection CreateConnection()
IDbCommand CreateCommand()
int Ntp.Data.Schema.VersionController.SelectVersion |
( |
| ) |
|
|
inlineprivate |
Definition at line 173 of file VersionController.cs.
References e.
175 IDbConnection connection = null;
182 command.Connection = connection;
185 log.SqlExecute(command.CommandText);
186 var result = command.ExecuteScalar();
187 return Convert.ToInt32(result);
191 log.VersionTableFetchError(e);
196 if (connection != null && connection.State == ConnectionState.Open)
readonly ISqlFactory factory
IDbConnection CreateConnection()
IDbCommand CreateCommand()
void Ntp.Data.Schema.VersionController.SetCurrentVersion |
( |
IVersionChanges |
version | ) |
|
|
inline |
Definition at line 55 of file VersionController.cs.
References e, Ntp.Data.Schema.IVersionChanges.VersionNumber, and Ntp.Data.Schema.IVersionChanges.VersionText.
59 log.VersionTableParamError();
63 IDbConnection connection = null;
70 command.Connection = connection;
74 log.SqlExecute(command.CommandText, command.Parameters);
75 command.ExecuteNonQuery();
79 log.VersionTableUpdateError(e);
83 if (connection != null && connection.State == ConnectionState.Open)
readonly ISqlFactory factory
IDbConnection CreateConnection()
IDbDataParameter CreateParameter(string name, object value)
IDbCommand CreateCommand()
const string Ntp.Data.Schema.VersionController.CreateSql = "CREATE TABLE version (number INT NOT NULL PRIMARY KEY);" |
|
private |
readonly ISqlFactory Ntp.Data.Schema.VersionController.factory |
|
private |
const string Ntp.Data.Schema.VersionController.InsertSql = "INSERT INTO version (number) VALUES (0);" |
|
private |
readonly LogBase Ntp.Data.Schema.VersionController.log |
|
private |
const string Ntp.Data.Schema.VersionController.SelectSql = "SELECT number FROM version;" |
|
private |
const string Ntp.Data.Schema.VersionController.UpdateSql = "UPDATE version SET number=@number;" |
|
private |
The documentation for this class was generated from the following file: