tapac
12/27/2017, 10:00 PMdao.dependsOnTable.select {...}
with dao.searchQuery{...}
.
And ofc making query with order by and limit is much faster and effective than loading everything into memory, but don’t forget to add index to updated_at if you have large table.damian
12/27/2017, 10:07 PMsearchQuery
before, could you give me a pointer on how i could solve this with searchQuery
?tapac
12/27/2017, 11:21 PMsearchQuery
do the same: returns Query with slice on dependsOnTable. This function used when you use find/getById functions. in special cases someone could override that function to add additional conditions to every select, so using searchQuery directly instead of using depensOnTable is prefered.damian
12/27/2017, 11:28 PMdao.wrapRows(dao.searchQuery(op.build { row = myCondition }).orderBy()...
? i don't really know what the wrapRows
does, i think i haven't found a good documentation of this yet. i saw it in a project on github and its working, but no idea why.tapac
12/28/2017, 9:53 AMoshai
12/28/2017, 3:00 PMtapac
12/28/2017, 9:43 PM