objective categorical abstract machine language personal data server
65
fork

Configure Feed

Select the types of activity you want to include in your feed.

Correctly handle empty cursor in listRecords

futurGH 9276173c a7d68336

+4 -4
+4 -4
pegasus/lib/user_store.ml
··· 176 176 [%rapper 177 177 get_many 178 178 {sql| SELECT @string{path}, @CID{cid}, @Blob{data}, @string{since} FROM records 179 - WHERE path LIKE %string{collection}/% 180 - AND since < %string{cursor} 179 + WHERE path LIKE concat(%string{collection}, '/', '%') 180 + AND (since < %string{cursor} OR %string{cursor} = '') 181 181 ORDER BY since DESC LIMIT %int{limit} 182 182 |sql}] 183 183 ··· 185 185 [%rapper 186 186 get_many 187 187 {sql| SELECT @string{path}, @CID{cid}, @Blob{data}, @string{since} FROM records 188 - WHERE path LIKE %string{collection}/% 189 - AND since > %string{cursor} 188 + WHERE path LIKE concat(%string{collection}, '/', '%') 189 + AND (since > %string{cursor} OR %string{cursor} = '') 190 190 ORDER BY since ASC LIMIT %int{limit} 191 191 |sql}] 192 192