Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Speed up lookup of :closql-tables slots
1) Enforce the use of `id' as the name of the rows used for joining. 2) Use the name of the row used in the `where' clause matches the value of the `closql-primary-key' slot. 3) Order by `id'. Do this because determining the slots again every time `oref' is used on such a slot, was very expensive. This is less flexible than what we had before, but that is okay because: a) This matches how Forge actually uses these slots, expect that it uses a different order for some of the slots. b) In an earlier commit we made lookup of indirect slots more flexible. The behavior can now be overridden completely for any indirect slot, by implementing a `closql-dref' method. I've considered these two alternatives (amongst others): A) Specify the names of the rows using the value of the `closql-tables' slot property. This became very complicated because one had to think around three corners, which gave raise to the idea that... B) ... if we have specify so many details anyway, we might as well use an appropriate dsl, i.e., SQL. Or in other words, do not provide any default behavior whatsoever, and instead require a dedicated `closql-dref' method for each `closql-tables' slot. Instead this commit implements the reasonable compromise.
- Loading branch information