|
static | remove ($instance) |
| Deletes the object $instance from the database.
|
|
static | deleteAll ($modelName, $where, $params=[]) |
| Deletes all instances from $modelName matching the condition $where.
|
|
static | deleteAllChildren (object $instance) |
|
static | updateAll (string $modelName, array $values, string $condition, array $params) |
| Mass update for $modelName matching the condition $where, with an associative array of $values.
|
|
static | delete ($modelName, $ids) |
| Deletes all instances from $modelName corresponding to $ids.
|
|
static | deleteById ($modelName, $id) |
|
static | insert ($instance, $insertMany=false) |
| Inserts a new instance $instance into the database.
|
|
static | insertOrUpdateAllManyToMany ($instance) |
| Updates manyToMany members.
|
|
static | insertOrUpdateManyToMany ($instance, $member) |
| Updates the $member member of $instance annotated by a ManyToMany.
|
|
static | update ($instance, $updateMany=false) |
| Updates an existing $instance in the database.
|
|
static | updateGroup ($instances, $updateMany=false) |
| Updates an array of $instances in the database.
|
|
static | save ($instance, $updateMany=false) |
|
|
static | removeByKey_ ($className, $tableName, $keyAndValues) |
|
static | remove_ ($db, $tableName, $where, $params) |
|
Definition at line 24 of file DAOUpdatesTrait.php.
◆ delete()
static delete |
( |
|
$modelName, |
|
|
|
$ids |
|
) |
| |
|
static |
Deletes all instances from $modelName corresponding to $ids.
- Parameters
-
string | $modelName | |
array | int | $ids | |
- Returns
- int|boolean
Definition at line 177 of file DAOUpdatesTrait.php.
◆ deleteAll()
static deleteAll |
( |
|
$modelName, |
|
|
|
$where, |
|
|
|
$params = [] |
|
) |
| |
|
static |
Deletes all instances from $modelName matching the condition $where.
- Parameters
-
string | $modelName | |
string | $where | |
array | $params | |
- Returns
- int|boolean
Definition at line 93 of file DAOUpdatesTrait.php.
◆ deleteAllChildren()
static deleteAllChildren |
( |
object |
$instance | ) |
|
|
static |
◆ deleteById()
static deleteById |
( |
|
$modelName, |
|
|
|
$id |
|
) |
| |
|
static |
◆ deleteManyToManyChildren()
static deleteManyToManyChildren |
( |
object |
$instance, |
|
|
string |
$memberName |
|
) |
| |
|
staticprotected |
◆ deleteOneToManyChildren()
static deleteOneToManyChildren |
( |
object |
$instance, |
|
|
string |
$memberName |
|
) |
| |
|
staticprotected |
◆ insert()
static insert |
( |
|
$instance, |
|
|
|
$insertMany = false |
|
) |
| |
|
static |
Inserts a new instance $instance into the database.
- Parameters
-
object | $instance | the instance to insert |
boolean | $insertMany | if true, save instances related to $instance by a ManyToMany association |
Definition at line 204 of file DAOUpdatesTrait.php.
◆ insertOrUpdateAllManyToMany()
static insertOrUpdateAllManyToMany |
( |
|
$instance | ) |
|
|
static |
◆ insertOrUpdateManyToMany()
static insertOrUpdateManyToMany |
( |
|
$instance, |
|
|
|
$member |
|
) |
| |
|
static |
Updates the $member member of $instance annotated by a ManyToMany.
- Parameters
-
Object | $instance | |
String | $member | |
Definition at line 274 of file DAOUpdatesTrait.php.
◆ remove()
static remove |
( |
|
$instance | ) |
|
|
static |
Deletes the object $instance from the database.
- Parameters
-
object | $instance | instance à supprimer |
Definition at line 31 of file DAOUpdatesTrait.php.
◆ remove_()
static remove_ |
( |
|
$db, |
|
|
|
$tableName, |
|
|
|
$where, |
|
|
|
$params |
|
) |
| |
|
staticprivate |
- Parameters
-
\Ubiquity\db\Database | $db | |
string | $className | |
string | $tableName | |
string | $where | |
array | $params | |
- Returns
- boolean|int the number of rows that were modified or deleted by the SQL statement you issued
Definition at line 71 of file DAOUpdatesTrait.php.
◆ removeByKey_()
static removeByKey_ |
( |
|
$className, |
|
|
|
$tableName, |
|
|
|
$keyAndValues |
|
) |
| |
|
staticprivate |
- Parameters
-
string | $className | |
string | $tableName | |
array | $keyAndValues | |
- Returns
- int the number of rows that were modified or deleted by the SQL statement you issued
Definition at line 46 of file DAOUpdatesTrait.php.
◆ save()
static save |
( |
|
$instance, |
|
|
|
$updateMany = false |
|
) |
| |
|
static |
- Parameters
-
object | $instance | |
boolean | $updateMany | |
- Returns
- boolean|int
Definition at line 396 of file DAOUpdatesTrait.php.
◆ update()
static update |
( |
|
$instance, |
|
|
|
$updateMany = false |
|
) |
| |
|
static |
Updates an existing $instance in the database.
Be careful not to modify the primary key
- Parameters
-
object | $instance | instance to modify |
boolean | $updateMany | Adds or updates ManyToMany members |
Reimplemented in SDAO.
Definition at line 315 of file DAOUpdatesTrait.php.
◆ updateAll()
static updateAll |
( |
string |
$modelName, |
|
|
array |
$values, |
|
|
string |
$condition, |
|
|
array |
$params |
|
) |
| |
|
static |
Mass update for $modelName matching the condition $where, with an associative array of $values.
- Parameters
-
string | $modelName | |
array | $values | |
string | $condition | |
array | $params | |
Definition at line 149 of file DAOUpdatesTrait.php.
◆ updateGroup()
static updateGroup |
( |
|
$instances, |
|
|
|
$updateMany = false |
|
) |
| |
|
static |
Updates an array of $instances in the database.
Be careful not to modify the primary key
- Parameters
-
array | $instances | instances to modify |
boolean | $updateMany | Adds or updates ManyToMany members |
- Returns
- boolean
Definition at line 352 of file DAOUpdatesTrait.php.
The documentation for this class was generated from the following file:
- C:/Users/myadd/Documents/GitHub/ubiquity-doc-api/vendor/phpmv/ubiquity/src/Ubiquity/orm/traits/DAOUpdatesTrait.php