Skip to main content

in

in(column: string, params: Param[])

import { OP, Param } from 'cl-orm';

/**
* { condition: 'id IN (?, ?, ?)', params: [16, 20, 50] }
*/
OP.in('id', [16, 20, 50]);

in(column: string, subquery: string, params: Param[])

import { OP, Param } from 'cl-orm';

/**
* { condition: 'userId IN (SELECT id FROM users WHERE status IN (?, ?))', params: [0, 2] }
*/
OP.in('userId', 'SELECT id FROM users WHERE status IN (?, ?)', [0, 2]);