Toggle navigation
Hot Examples
ES
EN
RU
DE
FR
ES
PT
IT
JP
ZH
KO
PHP
PHP
C#
Java
Go
C++
Python
JS
TS
Buscar
Inicio
App
Traits
SupportsDeleteWhereIDsNotIn
PHP Trait App\Traits\SupportsDeleteWhereIDsNotIn
MySQL and PostgreSQL seem to have a limit of 2^16-1 (65535) elements in an IN statement. This trait provides a method as a workaround to this limitation.
Mostrar archivo
Open project: phanan/koel
Public Methods
Method
Description
deleteByChunk
(
array
$ids
,
string
$key
= 'id',
integer
$chunkSize
= 65535 )
Delete records chunk by chunk.
deleteWhereIDsNotIn
(
array
$ids
,
string
$key
= 'id' ) :
mixed
Deletes all records whose IDs are not in an array.
Method Details
deleteByChunk()
public
static
method
Delete records chunk by chunk.
public
static
deleteByChunk
(
array
$ids
,
string
$key
= 'id',
integer
$chunkSize
= 65535 )
$ids
array
The array of record IDs to delete
$key
string
Name of the primary key
$chunkSize
integer
Size of each chunk. Defaults to 2^16-1 (65535)
deleteWhereIDsNotIn()
public
static
method
Deletes all records whose IDs are not in an array.
public
static
deleteWhereIDsNotIn
(
array
$ids
,
string
$key
= 'id' ) :
mixed
$ids
array
The array of IDs.
$key
string
Name of the primary key.
return
mixed