We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4e44862 commit fafdc37Copy full SHA for fafdc37
.lua/arango_model.lua
@@ -58,7 +58,7 @@ function ArangoModel:all(options)
58
59
local offset = options.per_page * (options.page - 1)
60
61
- self.data = Adb.primary:Aql(
+ local request = Adb.primary:Aql(
62
[[
63
FOR doc IN @@collection
64
]] .. table.concat(self.filters) .. [[
@@ -71,7 +71,10 @@ function ArangoModel:all(options)
71
["per_page"] = options.per_page,
72
["offset"] = offset
73
}, self.bindvars)
74
- ).result
+ )
75
+
76
+ self.data = request.result
77
78
return self
79
end
80
@@ -173,7 +176,7 @@ end
173
176
174
177
-- sorting
175
178
-function ArangoModel:sort(sort)
179
+function ArangoModel:order(sort)
180
self.sort = sort
181
182
0 commit comments