update method
- String command
Updates the database with the given command
.
Returns the number of rows affected by the update operation.
The command
parameter is the SQL command to be executed.
Example usage:
DatabaseService databaseService = DatabaseService();
await databaseService.update('UPDATE users SET name = "Adit Luhadia" WHERE id = 1');
Implementation
Future<int> update(String command) async {
return await _db.rawUpdate(command) as int;
}