private async Task addSubstitutionToConnection(SqliteConnection connection, Substitution addedSubstitution) { var command = connection.CreateCommand(); command.CommandText = $@"INSERT INTO ZUSERDICTIONARYENTRY (Z_ENT, Z_OPT, ZTIMESTAMP, ZPHRASE, ZSHORTCUT) VALUES (1, 1, 624393238, '{addedSubstitution.Word}', '{addedSubstitution.Shortcut}')"; await command.ExecuteNonQueryAsync(); }
private async Task updateSubstitutionToConnection(SqliteConnection connection, Substitution updatedSubstitution) { var command = connection.CreateCommand(); command.CommandText = $@"UPDATE ZUSERDICTIONARYENTRY SET ZPHRASE = '{updatedSubstitution.Word}' WHERE ZSHORTCUT = '{updatedSubstitution.Shortcut}'"; await command.ExecuteNonQueryAsync(); }
private async Task removeSubstitutionToConnection(SqliteConnection connection, Substitution removedSubstitution) { var command = connection.CreateCommand(); command.CommandText = $@"DELETE FROM ZUSERDICTIONARYENTRY WHERE ZSHORTCUT = '{removedSubstitution.Shortcut}'"; await command.ExecuteNonQueryAsync(); }