mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-02-09 21:28:30 -06:00
This commit does a lot of refactoring. But most noticeably it changes
two things:
1) Instead of saving all objects (tables, views, indices, triggers) of a
schema in a common map, we now store tables/views, indices and
triggers in three separate maps. This has a number of benefits:
- It resembles more closely how SQLite stores its data internally and
therefore achieves greater compatability e.g. for databases with a
view and a trigger with the same name.
- It reduces the need for runtime polymorphism. This makes the code
run a bit faster.
- By working with explicit types more often more error checking can
be done at compile time, making the code less error prone.
- The code becomes a lot clearer to read.
2) By making View inherit form Table, views are now a sort of tables.
This has the following benefits:
- This is a again how SQLite stores views internally which again
should increase compatibility a bit.
- We mostly treat views and tables the same anyway and with these
changes we can unify the code for them even more.
13 KiB
13 KiB