summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/dblib.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/dblib.lua b/lib/dblib.lua
index b5d889f..5466334 100644
--- a/lib/dblib.lua
+++ b/lib/dblib.lua
@@ -545,6 +545,9 @@ _luadb = {
stmt = stmt .. " ORDER BY `" .. options.order.by .. "` " .. direction
end
if options.limit then
+ if type(options.limit) ~= "table" then
+ error("Wrong type for options.limit; should be a table.")
+ end
local start, size = 0, 30
if options.limit.start then
if type(options.limit.start) ~= "number" then