title: Flutter SQFLite DatabaseException with rawDelete
body: <p>So, I am using  <a href="https://pub.dev/packages/sqflite#-readme-tab-" rel="nofollow noreferrer">sqflite</a> in my app for a long time. And everything is working fine except rawDelete.</p>
  
  <pre><code>  deleteDone(int listType) async { 
      int check = 0;
      var dbClient = await db;
      var toDelete = await dbClient.rawDelete(
          'SELECT * FROM $tableName WHERE $colType = $listType AND $colDone = $check');
    }
  
  // other important part of the code:
  
    final String tableName = "listTable";
    final String colId = "id";
    final String colTaskName = "name";
    final String colType = "type";
    final String colDone = "done";
  
  Future&lt;Database&gt; initDb() async {
      Directory documentDirectory = await getApplicationDocumentsDirectory();
      String path = join(documentDirectory.path, "todo.db");
      var ourDb = await openDatabase(path, version: 1, onCreate: _onCreate);
      return ourDb;
    }
  
    void _onCreate(Database db, int version) async {
      await db.execute(
          "CREATE TABLE listTable (id INTEGER PRIMARY KEY, name TEXT, type TEXT, done TEXT)");
    }
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>[ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: DatabaseException(unknown error (code 0 SQLITE_OK): Queries can be performed using SQLiteDatabase query or rawQuery methods only.) sql 'SELECT * FROM listTable WHERE type = 0 AND done = 0' args []}
  </code></pre>
  
  <p>Here's the debug log error:</p>
  
  <pre><code>V/DartMessenger(25865): Received message from Dart over channel 'com.tekartik.sqflite'
  V/DartMessenger(25865): Deferring to registered handler to process message.
  V/DartMessenger(25865): Received message from Dart over channel 'com.tekartik.sqflite'
  V/DartMessenger(25865): Deferring to registered handler to process message.
  E/flutter (25865): [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: DatabaseException(unknown error (code 0 SQLITE_OK): Queries can be performed using SQLiteDatabase query or rawQuery methods only.) sql 'SELECT * FROM listTable WHERE type = 0 AND done = 0' args []}
  E/flutter (25865): #0      wrapDatabaseException 
  package:sqflite/src/exception_impl.dart:11
  E/flutter (25865): &lt;asynchronous suspension&gt;
  E/flutter (25865): #1      SqfliteDatabaseFactoryImpl.wrapDatabaseException 
  package:sqflite/src/factory_impl.dart:29
  E/flutter (25865): #2      _SqfliteDatabaseBase&amp;Object&amp;SqfliteDatabaseMixin.safeInvokeMethod 
  package:sqflite/src/database_mixin.dart:184
  E/flutter (25865): #3      _SqfliteDatabaseBase&amp;Object&amp;SqfliteDatabaseMixin.txnRawUpdate.&lt;anonymous closure&gt; 
  package:sqflite/src/database_mixin.dart:380
  E/flutter (25865): #4      _SqfliteDatabaseBase&amp;Object&amp;SqfliteDatabaseMixin.txnSynchronized.&lt;anonymous closure&gt; 
  package:sqflite/src/database_mixin.dart:300
  E/flutter (25865): #5      BasicLock.synchronized 
  package:synchronized/src/basic_lock.dart:31
  E/flutter (25865): &lt;asynchronous suspension&gt;
  E/flutter (25865): #6      _SqfliteDatabaseBase&amp;Object&amp;SqfliteDatabaseMixin.txnSynchronized 
  package:sqflite/src/database_mixin.dart:296
  E/flutter (25865): &lt;asynchronous suspension&gt;
  E/flutter (25865): #7      _SqfliteDatabaseBase&amp;Object&amp;SqfliteDatabaseMixin.txnWriteSynchronized 
  E/flutter (25865): #8      _SqfliteDatabaseBase&amp;Object&amp;SqfliteDatabaseMixin.txnRawUpdate 
  package:sqflite/src/database_mixin.dart:379
  E/flutter (25865): #9      _SqfliteDatabaseBase&amp;Object&amp;SqfliteDatabaseMixin&amp;SqfliteDatabaseExecutorMixin.rawUpdate 
  package:sqflite/src/database_mixin.dart:124
  E/flutter (25865): #10     _SqfliteDatabaseBase&amp;Object&amp;SqfliteDatabaseMixin&amp;SqfliteDatabaseExecutorMixin.rawDelete 
  package:sqflite/src/database_mixin.dart:157
  E/flutter (25865): #11     DatabaseHelper.deleteDone 
  package:mentor101/…/data/todo_db.dart:126
  E/flutter (25865): &lt;asynchronous suspension&gt;
  E/flutter (25865): #12     TodoModel.deleteDoneTasks 
  package:mentor101/…/model/todo_model.dart:90
  E/flutter (25865): #13     TodoState.todoBottomActions.&lt;anonymous closure&gt; 
  package:mentor101/…/ui/todos.dart:242
  E/flutter (25865): #14     _InkResponseState._handleTap 
  package:flutter/…/material/ink_well.dart:635
  E/flutter (25865): #15     _InkResponseState.build.&lt;anonymous closure&gt; 
  package:flutter/…/material/ink_well.dart:711
  E/flutter (25865): #16     GestureRecognizer.invokeCallback 
  package:flutter/…/gestures/recognizer.dart:182
  E/flutter (25865): #17     TapGestureRecognizer._checkUp 
  package:flutter/…/gestures/tap.dart:365
  E/flutter (25865): #18     TapGestureRecognizer.acceptGesture 
  package:flutter/…/gestures/tap.dart:312
  E/flutter (25865): #19     GestureArenaManager.sweep 
  package:flutter/…/gestures/arena.dart:156
  E/flutter (25865): #20     _WidgetsFlutterBinding&amp;BindingBase&amp;GestureBinding.handleEvent 
  package:flutter/…/gestures/binding.dart:222
  E/flutter (25865): #21     _WidgetsFlutterBinding&amp;BindingBase&amp;GestureBinding.dispatchEvent 
  package:flutter/…/gestures/binding.dart:198
  E/flutter (25865): #22     _WidgetsFlutterBinding&amp;BindingBase&amp;GestureBinding._handlePointerEvent 
  package:flutter/…/gestures/binding.dart:156
  E/flutter (25865): #23     _WidgetsFlutterBinding&amp;BindingBase&amp;GestureBinding._flushPointerEventQueue 
  package:flutter/…/gestures/binding.dart:102
  E/flutter (25865): #24     _WidgetsFlutterBinding&amp;BindingBase&amp;GestureBinding._handlePointerDataPacket 
  package:flutter/…/gestures/binding.dart:86
  E/flutter (25865): #25     _rootRunUnary  (dart:async/zone.dart:1136:13)
  E/flutter (25865): #26     _CustomZone.runUnary  (dart:async/zone.dart:1029:19)
  E/flutter (25865): #27     _CustomZone.runUnaryGuarded  (dart:async/zone.dart:931:7)
  E/flutter (25865): #28     _invoke1  (dart:ui/hooks.dart:250:10)
  E/flutter (25865): #29     _dispatchPointerDataPacket  (dart:ui/hooks.dart:159:5)
  E/flutter (25865):
  I/flutter (25865): list: [Instance of 'Task', Instance of 'Task', Instance of 'Task']
  </code></pre>
  
  <p>I didn't think anything is wrong with database as all other CRUD
  operations working fine. This same query works fine with rawQuery but
  didn't work with rawDelete. I have checked the argument listType and
  check and both gives right value but nothing gets deleted from list.</p>