Refactoring of LocalDatabase::find, cursor_find (wip)