Query.offset is not a function or query.where is not a function


query.offset is not a function

offset not working.

my code is :

const query = await Database.table(‘users’)

if (requestData[‘length’] > 0) {


you put await on the first line, so that the query already made

try this:

const query = Database.table(‘users’)

if (requestData[‘length’] > 0) {
const res = await query


ohk it`s working, thanks


can i use with like query.with(‘settings’). it`s posible?


if you want to use .with()
you may use Lucid with .query()
ref: https://adonisjs.com/docs/4.1/relationships#_eagerloading


const users = await User.query().with('settings').fetch()


ok i got it , thanks for help.