Ubiquity 2.5.2
php rapid development framework
Loading...
Searching...
No Matches
DAOBulkUpdatesTrait Class Reference

Ubiquity\orm\traits$DAOBulkUpdatesTrait This class is part of Ubiquity. More...

+ Inheritance diagram for DAOBulkUpdatesTrait:

Static Public Member Functions

static toInsert ($instance)
 Adds an instance in the bulk list of objects to insert.
 
static toInserts (array $instances)
 Adds an array of instances in the bulk list of objects to insert.
 
static flushInserts ()
 Executes all waiting insert operations.
 
static toUpdate ($instance)
 Adds an instance in the bulk list of objects to update.
 
static toUpdates (array $instances)
 Adds an array of instances in the bulk list of objects to update.
 
static updateGroups ($count=5)
 
static insertGroups ($count=5)
 
static deleteGroups ($count=5)
 
static flushUpdates ()
 Executes all waiting update operations.
 
static toDelete ($instance)
 Adds an instance in the bulk list of objects to delete.
 
static toDeletes (array $instances)
 Adds an array of instances in the bulk list of objects to delete.
 
static flushDeletes ()
 Executes all waiting delete operations.
 
static flush ()
 Executes all waiting operations (inserts, updates, deletes)
 
static clearBulks (?array $operations=null, ?array $classes=null)
 Clear bulk and clear instances waiting for operations.
 
static countInstancesBulk (string $class, string $operation='update')
 Return the count of instances waiting for flushing in a bulk.
 

Static Protected Member Functions

static getBulk ($class, $operation='update')
 
static toOperation ($instance, string $operation)
 
static toOperations (array $instances, string $operation)
 

Static Protected Attributes

static $bulks = [ 'insert' => [ ],'update' => [ ],'delete' => [ ] ]
 

Detailed Description

Ubiquity\orm\traits$DAOBulkUpdatesTrait This class is part of Ubiquity.

Author
jcheron myadd.nosp@m.ress.nosp@m.mail@.nosp@m.gmai.nosp@m.l.com
Version
1.0.4

Definition at line 13 of file DAOBulkUpdatesTrait.php.

Member Function Documentation

◆ clearBulks()

static clearBulks ( ?array  $operations = null,
?array  $classes = null 
)
static

Clear bulk and clear instances waiting for operations.

Parameters
array$operations
array$classes

Definition at line 165 of file DAOBulkUpdatesTrait.php.

◆ countInstancesBulk()

static countInstancesBulk ( string  $class,
string  $operation = 'update' 
)
static

Return the count of instances waiting for flushing in a bulk.

Parameters
string$class
string$operation
Returns
int

Definition at line 184 of file DAOBulkUpdatesTrait.php.

◆ deleteGroups()

static deleteGroups (   $count = 5)
static

Definition at line 101 of file DAOBulkUpdatesTrait.php.

◆ flush()

static flush ( )
static

Executes all waiting operations (inserts, updates, deletes)

Definition at line 151 of file DAOBulkUpdatesTrait.php.

◆ flushDeletes()

static flushDeletes ( )
static

Executes all waiting delete operations.

Definition at line 141 of file DAOBulkUpdatesTrait.php.

◆ flushInserts()

static flushInserts ( )
static

Executes all waiting insert operations.

Definition at line 60 of file DAOBulkUpdatesTrait.php.

◆ flushUpdates()

static flushUpdates ( )
static

Executes all waiting update operations.

Definition at line 111 of file DAOBulkUpdatesTrait.php.

◆ getBulk()

static getBulk (   $class,
  $operation = 'update' 
)
staticprotected

Definition at line 16 of file DAOBulkUpdatesTrait.php.

◆ insertGroups()

static insertGroups (   $count = 5)
static

Definition at line 94 of file DAOBulkUpdatesTrait.php.

◆ toDelete()

static toDelete (   $instance)
static

Adds an instance in the bulk list of objects to delete.

Call flush to commit the operation

Parameters
object$instance

Definition at line 124 of file DAOBulkUpdatesTrait.php.

◆ toDeletes()

static toDeletes ( array  $instances)
static

Adds an array of instances in the bulk list of objects to delete.

Call flush to commit the operation

Parameters
array$instances

Definition at line 134 of file DAOBulkUpdatesTrait.php.

◆ toInsert()

static toInsert (   $instance)
static

Adds an instance in the bulk list of objects to insert.

Call flush to commit the operation

Parameters
object$instance

Definition at line 43 of file DAOBulkUpdatesTrait.php.

◆ toInserts()

static toInserts ( array  $instances)
static

Adds an array of instances in the bulk list of objects to insert.

Call flush to commit the operation

Parameters
array$instances

Definition at line 53 of file DAOBulkUpdatesTrait.php.

◆ toOperation()

static toOperation (   $instance,
string  $operation 
)
staticprotected

Definition at line 24 of file DAOBulkUpdatesTrait.php.

◆ toOperations()

static toOperations ( array  $instances,
string  $operation 
)
staticprotected

Definition at line 29 of file DAOBulkUpdatesTrait.php.

◆ toUpdate()

static toUpdate (   $instance)
static

Adds an instance in the bulk list of objects to update.

Call flush to commit the operation

Parameters
object$instance

Definition at line 73 of file DAOBulkUpdatesTrait.php.

◆ toUpdates()

static toUpdates ( array  $instances)
static

Adds an array of instances in the bulk list of objects to update.

Call flush to commit the operation

Parameters
array$instances

Definition at line 83 of file DAOBulkUpdatesTrait.php.

◆ updateGroups()

static updateGroups (   $count = 5)
static

Definition at line 87 of file DAOBulkUpdatesTrait.php.

Field Documentation

◆ $bulks

$bulks = [ 'insert' => [ ],'update' => [ ],'delete' => [ ] ]
staticprotected

Definition at line 14 of file DAOBulkUpdatesTrait.php.


The documentation for this class was generated from the following file: