Esempio n. 1
0
        // TODO: Create Command interface
        public void executeStatement(string strSql)
        {
            DeleteParts deleteParts = new DeleteParts(_database, strSql);

            if (MainClass.bDebug)
            {
                Console.WriteLine("DELETE: " + deleteParts.strDelete);
                Console.WriteLine("FROM: " + deleteParts.strFrom);
                Console.WriteLine("WHERE: " + deleteParts.strWhere);
            }

            _table = _database.getTableByName(deleteParts.strTableName);

            List<Comparison> lstWhereConditions = _createWhereConditions(deleteParts.strWhere);
            _deleteRows(lstWhereConditions);
        }
Esempio n. 2
0
        // TODO: Create Command interface
        public void executeStatement(string strSql)
        {
            DeleteParts deleteParts = new DeleteParts(_database, strSql);

            if (MainClass.bDebug)
            {
                Console.WriteLine("DELETE: " + deleteParts.strDelete);
                Console.WriteLine("FROM: " + deleteParts.strFrom);
                Console.WriteLine("WHERE: " + deleteParts.strWhere);
            }

            _table = _database.getTableByName(deleteParts.strTableName);

            List <Comparison> lstWhereConditions = _createWhereConditions(deleteParts.strWhere);

            _deleteRows(lstWhereConditions);
        }