internal void IndexTable() { if ((this._TableState & Enums.DatabaseTableState.Querable) != Enums.DatabaseTableState.Querable) //Check our bitwise flag of enums to make sure the table has not already been indexed { RelationalDatabase.ExecuteNonQuery(this._IndexCommand); this._TableState = this._TableState | Enums.DatabaseTableState.Querable; } }
internal void TruncateTable() { if ( (this._TableState & Enums.DatabaseTableState.Truncated) != Enums.DatabaseTableState.Truncated) //Check our bitwise flag of enums to make sure the table has not already been truncated { RelationalDatabase.ExecuteNonQuery(this._TruncateCommand); this._TableState = this._TableState | Enums.DatabaseTableState.Truncated; } }
//Constructor :) public WorkTableState(string sTableName, string sSchemaName = "dbo") { this._TableName = sTableName; this._SchemaName = sSchemaName; this._TableState = Enums.DatabaseTableState.Unknown; }