public string submitQuerySQL(string sql, out DataTable answerSet) { SqlQuery rawQuery = new SqlQuery(sql); QueryType qType = rawQuery.ProcessType(); answerSet = null; switch (qType) { case QueryType.INSERT: var query = new SqlInsertQuery(sql); query.ProcessAndPopulateEachField(); var iHandler = new InsertQueryHandler(query, underlineDatabase); answerSet = iHandler.HandleInsertQuery(); break; case QueryType.SELECT: var squery = new SqlSelectQuery(sql); var sHandler = new SelectQueryHandler(squery, underlineDatabase); answerSet = sHandler.HandleSelectSqlQuery(); break; case QueryType.CREATE: var cquery = new SqlCreateTableQuery(sql); var handler = new CreateTableHandler(cquery, underlineDatabase); answerSet = handler.HandleCreateTableQuery(); break; default: break; } return("end of submitSQL function"); }
private void PreparePossibleTables(string tName) { SelectQueryHandler queryHandler = new SelectQueryHandler(null, _underlineDatabase); var tables = new List <string>(); tables.Add(tName); queryHandler.PrepareReleventTables(tables); }