Part #1: Complete implementation of updateQuery method:
1. Count and print the number of rows updated at the end of the updateQuery method in the format – “5 row(s) updated.”.
2. Implement feature to handle where clause (i.e., the whereColIdx parameter is not -1) with 3 different conditions (‘=’, ‘<>’, and ‘like’) in a query, as in “update test.csv set raters=3 where title like ‘The’;”. See SQLAirBase::matches helper method. For this feature you only print rows with column-values (i.e., value in column indicated by whereColIdx) that match the given condition. See SQLAirBase::matches helper method. Note that given a row, you can get value via row.at(whereColIdx).
3. Of course, you can use the selectQuery method to help guide your implementation.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
27 | 28 | 29 | 30 | 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |