Commit 13b15dd
committed
parser: Refactor parsing and handling of constraints
This commit refactors the handling of constraints and continues the work
started in 43107ea. Instead of heavily
relying on runtime polymorphism with these changes we move towards more
compile-time polymorphism. Noticeable the constraint data types do not
have a type function any longer; instead they are differentiated by
their actual data type.
This has several benefits:
- More likely to catch errors at compile-time and therefore avoid them
at runtime.
- The program runs faster. This should be most noticeable for databases
with a very large amount of tables or other database objects.
- The code should be easier to read and maintain.
Additionally this should also prepare for even more refactoring in the
future.1 parent dd62577 commit 13b15dd
File tree
7 files changed
+1689
-1834
lines changed- src
- sql
- parser
7 files changed
+1689
-1834
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
289 | | - | |
| 289 | + | |
290 | 290 | | |
291 | 291 | | |
292 | 292 | | |
| |||
298 | 298 | | |
299 | 299 | | |
300 | 300 | | |
301 | | - | |
| 301 | + | |
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
| |||
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
310 | | - | |
311 | 310 | | |
312 | 311 | | |
313 | 312 | | |
| |||
902 | 901 | | |
903 | 902 | | |
904 | 903 | | |
905 | | - | |
| 904 | + | |
906 | 905 | | |
907 | | - | |
| 906 | + | |
908 | 907 | | |
909 | 908 | | |
910 | 909 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| |||
51 | 53 | | |
52 | 54 | | |
53 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
54 | 60 | | |
55 | 61 | | |
56 | 62 | | |
| |||
0 commit comments