Hello Scott,
Yes you are right, you have to call find all document by paging method until you get the last 100 records. Please find below code snippet for find documents by paging:
local dbName = "<Your_DataBase_Name>"
local collectionName = "<Your_Collection_Name>"
local max = 5
local offset = 0
local App42CallBack = {}
App42API:initialize("API_KEY","SECRET_KEY")
local storageService = App42API:buildStorageService()
storageService:findAllDocumentsByPaging(dbName, collectionName,max,offset,App42CallBack)
function App42CallBack:onSuccess(object)
print("dbName is "..object:getDbName())
for i=1,table.getn(object:getJsonDocList()) do
print("DocId is "..object:getJsonDocList()[i]:getDocId())
print("CreatedAt is "..object:getJsonDocList()[i]:getCreatedAt())
end
end
function App42CallBack:onException(exception)
print("Message is : "..exception:getMessage())
print("App Error code is : "..exception:getAppErrorCode())
print("Http Error code is "..exception:getHttpErrorCode())
print("Detail is : "..exception:getDetails())
end
regards,
Himanshu Sharma