NITCbase / nitcbase.github.io

The entire documentation on implementing the NITCbase project.
https://nitcbase.github.io/
MIT License
10 stars 6 forks source link

updated design of the block access layer #50

Closed clifordjoshy closed 1 year ago

clifordjoshy commented 1 year ago

The designs of this layer was unnecessarily verbose, especially for renameRelation and renameAttribute which is mostly just code. I have rewritten them to be better representative of the core algorithm. The new designs and the specific changes are mentioned below Additionally, the project method has been added and reset has been handled in the block access layer. these function calls have been updated throughout

linearSearch

search

renameAttribute

deleteRelation

project

clifordjoshy commented 1 year ago

TODO; commit the changes in the search function to the main repo before merging

clifordjoshy commented 1 year ago

Additional Suggestion

Instead of manually setting the search index to {-1, -1} before every linearSearch using the RelCacheTable, maybe we could create a method to reset the search index? it will make the code a lot more readable. And additionally, would also remove the need for the RST operator in BlockAccess::search(). However, it is not a core functionality of the layer. So, I'm not sure if it's a valid change?

clifordjoshy commented 1 year ago

Additional Suggestion

Instead of manually setting the search index to {-1, -1} before every linearSearch using the RelCacheTable, maybe we could create a method to reset the search index? it will make the code a lot more readable. And additionally, would also remove the need for the RST operator in BlockAccess::search(). However, it is not a core functionality of the layer. So, I'm not sure if it's a valid change?

has been handled in the last commit. rst and project have been moved to separate functions