Beispiel #1
0
        public object ProcessStatement(string sql)
        {
            string sqlStatementType = _generalParser.GetSqlStatementType(sql);

            switch (sqlStatementType)
            {
            case _select:
                return(RunQueryAndSubqueries(sql));

            case _insert:
                return(RunInsertStatement(sql));

            case _create:
                return(RunCreateTableStatement(sql));

            case _update:
                return(RunUpdateStatement(sql));
            }

            throw new Exception(ErrorMessages.Query_Must_Start_With);
        }