$adjacent

Filter records where a column’s value is adjacent to the specified value. The $adjacent method is used to retrieve entries where the value in a given column is next to or close to a specified value, making it useful for queries involving ordered or sequential data, such as in date ranges or numerical sequences.

await Member.$search({
    $where: {
        username: {
            $adjacent: ['VIP','CEO']
        }
    }
});

Last updated