Answers for "knex like query"

0

knex like query

const getResults = (options) => {
    let query = knex('table');
    if (options.where) {
        query = query.where('franchisee_name', 'like', '%jackmarker%');
    }

    if (options.other) {
        query = query.where('company', 'like', '%marker%');
    }

    return query.select();
};
Posted by: Guest on May-15-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language