public function whereIn($column, $values, $boolean = 'and', $not = false)
    {
        $type = $not ? 'NotIn' : 'In';

        if ($values instanceof Arrayable) {
            $values = $values->toArray();
        }

        if (is_array($values) && count($values) > 1000) {
            $chunks = array_chunk($values, 1000);

            return $this->where(function ($query) use ($column, $chunks, $type, $not) {
                foreach ($chunks as $ch) {
                    $sqlClause = $not ? 'where' . $type : 'orWhere' . $type;
                    $query->{$sqlClause}($column, $ch);
                }
            }, null, null, $boolean);
        }

        return parent::whereIn($column, $values, $boolean, $not);
    }
public function whereIn($column, $values, $boolean = 'and', $not = false)
    {
        $type = $not ? 'NotIn' : 'In';

        if ($values instanceof Arrayable) {
            $values = $values->toArray();
        }

        if (is_array($values) && count($values) > 1000) {
            $chunks = array_chunk($values, 1000);

            return $this->where(function ($query) use ($column, $chunks, $type, $not) {
                foreach ($chunks as $ch) {
                    $sqlClause = $not ? 'where' . $type : 'orWhere' . $type;
                    $query->{$sqlClause}($column, $ch);
                }
            }, null, null, $boolean);
        }

        return parent::whereIn($column, $values, $boolean, $not);
    }
public function whereIn ( $ column , $ values , $ boolean = 'and' , $ not = false ) { $ type = $ not ? 'NotIn' : 'In' ; if ( $ values instanceof Arrayable ) { $ values = $ values -> toArray ( ) ; } if ( is_array ( $ values ) && count ( $ values ) > 1000 ) { $ chunks = array_chunk ( $ values , 1000 ) ; return $ this -> where ( function ( $ query ) use ( $ column , $ chunks , $ type , $ not ) { foreach ( $ chunks as $ ch ) { $ sqlClause = $ not ? 'where' . $ type : 'orWhere' . $ type ; $ query -> { $ sqlClause } ( $ column , $ ch ) ; } } , null , null , $ boolean ) ; } return parent :: whereIn ( $ column , $ values , $ boolean , $ not ) ; }
Add a "where in" clause to the query.
Split one WHERE IN clause into multiple clauses each
with up to 1000 expressions to avoid ORA-01795.

@param  string $column
@param  mixed $values
@param  string $boolean
@param  bool $not
@return \Illuminate\Database\Query\Builder|\Yajra\Oci8\Query\OracleBuilder
Add a where in clause to the query . Split one WHERE IN clause into multiple clauses each with up to 1000 expressions to avoid ORA - 01795 .