public override ScriptParser GetParser() { var parser = new SqlScriptParser(); parser.SetCommandsHandler( new UserCommandsHandler <SqlCommand, SqlDbType, SqlConnection, TKey, TValue, SqlDataReader>( _userCommandCreator, new SqlMetaDataCommandCreator <TKey, TValue>(_userCommandCreator))); return(parser); }
public void SqlScriptParser_ParseQueryType() { var parser = new SqlScriptParser(); var type = parser.ParseQueryType("order by"); Assert.AreEqual(ScriptType.OrderAsc, type); type = parser.ParseQueryType("order by desc"); Assert.AreEqual(ScriptType.OrderDesc, type); type = parser.ParseQueryType("order bsy desc"); Assert.AreEqual(ScriptType.Unknown, type); }