/Drupal 8

trait InsertTrait

Provides common functionality for INSERT and UPSERT queries.


Related topics

Database abstraction layer
Allow the use of different database servers using the same code base.


core/lib/Drupal/Core/Database/Query/InsertTrait.php, line 10




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.

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.