Provides common functionality for INSERT and UPSERT queries.
Hierarchy
- trait \Drupal\Core\Database\Query\InsertTrait
Related topics
- Database abstraction layer
- Allow the use of different database servers using the same code base.
File
- core/lib/Drupal/Core/Database/Query/InsertTrait.php, line 10
Namespace
Drupal\Core\Database\Query
Members
Name | Modifiers | Type | Description |
---|---|---|---|
InsertTrait::$defaultFields | protected | property | An array of fields that should be set to their database-defined defaults. |
InsertTrait::$insertFields | protected | property | An array of fields on which to insert. |
InsertTrait::$insertValues | protected | property | A nested array of values to insert. |
InsertTrait::$table | protected | property | The table on which to insert. |
InsertTrait::count | public | function | |
InsertTrait::fields | public | function | Adds a set of field->value pairs to be inserted. |
InsertTrait::getInsertPlaceholderFragment | protected | function | Returns the query placeholders for values that will be inserted. |
InsertTrait::useDefaults | public | function | Specifies fields for which the database defaults should be used. |
InsertTrait::values | public | function | Adds another set of values to the query to be inserted. |
Please login to continue.