Extend querybuilder

Hi,

is there any possibility to overwrite the QueryBuilder?

e.g. I’d like to use something like:
User.query().isPermitted(x===y).findOrFail()

or:
Database.table(‘users’).query().isPermitted(x===y).firstOrFail()

I found that in knex we can do that with Knex.QueryBuilder.extend(), but it didn’t work in adonis.

Thank you very much for your help