|
| 1 | +# Changelog# |
| 2 | +## 2020-12-05 ## |
| 3 | + |
| 4 | +* Fixed method `Table.__return_query` so now querying by `tbl.query({"name": "Bob"})` works correctly. Expanded capability (read bellow). Backward compatibility left. **Note**: Value strings are Case Sensitive! |
| 5 | +* Make compatible with full python (windows, linux). |
| 6 | +* Table creattion method inherit `rows_per_page` and `max_rows` from database schema settings. |
| 7 | +* Do not increase `tbl.current_row` counter if data has not passed validation yet. |
| 8 | +* New method `tbl.vacuum()` to optimize pagefiles. Worth to use after some data has been deleted. |
| 9 | +* updated method `Table.__return_query` so now is possible to search by multiple keys and values. Imagine following **persons_table** data: |
| 10 | + | fname | lname | age | |
| 11 | + |---|---|---| |
| 12 | + | John | Smith | 37 | |
| 13 | + | Nicole | Smith | *None* | |
| 14 | + | Kim | Smith| 7 | |
| 15 | + | John | Lee | *None* | |
| 16 | + | Nicole | Lee | 32 | |
| 17 | + | Bart | Lee | 3 | |
| 18 | + We want to get John and Nicole Smiths, but dont want all Smiths and no Lees. Following query `tbl.query({"fname":["John", "Nicole"], "lname": "Smith"})` and here is the result: |
| 19 | + ``` python |
| 20 | + [{'fname': 'John', 'lname': 'Smith', 'age': 34}, |
| 21 | + {'fname': 'Nicole', 'lname': 'Smith', 'age': None}] |
| 22 | + ``` |
| 23 | + You may add any number of search parameter in your query and all of them will be `AND`. In sql definition upper search query represent following SQL: |
| 24 | + ```sql |
| 25 | + select * from persons_table where fname in ("John", "Nicole") and lname = "Smith" |
| 26 | + ``` |
| 27 | +* Changed `__insert_modify_data_file` so writing to files would be more efficient and faster in exchange in reliability if something unexpected happens. |
| 28 | +* Annotated all function's parameters |
| 29 | +* Fixed `tests/test.py` file to correcttly calculatee current row in `check_current_row()` function |
| 30 | + |
| 31 | +`test/test.py` and `device_test.py` passed succesfully on |
| 32 | +> MicroPython v1.9.4-2922-gce1dfde98-dirty on 2020-11-26; ESP32 module with ESP32 |
0 commit comments