class Merge

Same name in this branch
  1. 9 core/modules/sqlite/src/Driver/Database/sqlite/Merge.php \Drupal\sqlite\Driver\Database\sqlite\Merge
  2. 9 core/modules/mysql/src/Driver/Database/mysql/Merge.php \Drupal\mysql\Driver\Database\mysql\Merge
  3. 9 core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysql/Merge.php \Drupal\driver_test\Driver\Database\DrivertestMysql\Merge
  4. 9 core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysqlDeprecatedVersion/Merge.php \Drupal\driver_test\Driver\Database\DrivertestMysqlDeprecatedVersion\Merge
  5. 9 core/tests/fixtures/database_drivers/module/corefake/src/Driver/Database/corefakeWithAllCustomClasses/Merge.php \Drupal\corefake\Driver\Database\corefakeWithAllCustomClasses\Merge
  6. 9 core/lib/Drupal/Core/Database/Query/Merge.php \Drupal\Core\Database\Query\Merge
Same name in other branches
  1. 8.9.x core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysql/Merge.php \Drupal\driver_test\Driver\Database\DrivertestMysql\Merge
  2. 8.9.x core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestPgsql/Merge.php \Drupal\driver_test\Driver\Database\DrivertestPgsql\Merge
  3. 8.9.x core/lib/Drupal/Core/Database/Driver/sqlite/Merge.php \Drupal\Core\Database\Driver\sqlite\Merge
  4. 8.9.x core/lib/Drupal/Core/Database/Driver/mysql/Merge.php \Drupal\Core\Database\Driver\mysql\Merge
  5. 8.9.x core/lib/Drupal/Core/Database/Driver/pgsql/Merge.php \Drupal\Core\Database\Driver\pgsql\Merge
  6. 8.9.x core/lib/Drupal/Core/Database/Query/Merge.php \Drupal\Core\Database\Query\Merge
  7. 10 core/modules/sqlite/src/Driver/Database/sqlite/Merge.php \Drupal\sqlite\Driver\Database\sqlite\Merge
  8. 10 core/modules/mysql/src/Driver/Database/mysql/Merge.php \Drupal\mysql\Driver\Database\mysql\Merge
  9. 10 core/modules/pgsql/src/Driver/Database/pgsql/Merge.php \Drupal\pgsql\Driver\Database\pgsql\Merge
  10. 10 core/tests/fixtures/database_drivers/module/core_fake/src/Driver/Database/CoreFakeWithAllCustomClasses/Merge.php \Drupal\core_fake\Driver\Database\CoreFakeWithAllCustomClasses\Merge
  11. 10 core/lib/Drupal/Core/Database/Query/Merge.php \Drupal\Core\Database\Query\Merge
  12. 11.x core/modules/sqlite/src/Driver/Database/sqlite/Merge.php \Drupal\sqlite\Driver\Database\sqlite\Merge
  13. 11.x core/modules/mysql/src/Driver/Database/mysql/Merge.php \Drupal\mysql\Driver\Database\mysql\Merge
  14. 11.x core/modules/pgsql/src/Driver/Database/pgsql/Merge.php \Drupal\pgsql\Driver\Database\pgsql\Merge
  15. 11.x core/tests/fixtures/database_drivers/module/core_fake/src/Driver/Database/CoreFakeWithAllCustomClasses/Merge.php \Drupal\core_fake\Driver\Database\CoreFakeWithAllCustomClasses\Merge
  16. 11.x core/lib/Drupal/Core/Database/Query/Merge.php \Drupal\Core\Database\Query\Merge

PostgreSQL implementation of \Drupal\Core\Database\Query\Merge.

Hierarchy

Expanded class hierarchy of Merge

3 string references to 'Merge'
Connection::getDriverClass in core/lib/Drupal/Core/Database/Connection.php
Gets the driver-specific override class if any for the specified class.
Connection::merge in core/lib/Drupal/Core/Database/Connection.php
Prepares and returns a MERGE query object.
ConnectionTest::providerGetDriverClass in core/tests/Drupal/Tests/Core/Database/ConnectionTest.php
Data provider for testGetDriverClass().

File

core/modules/pgsql/src/Driver/Database/pgsql/Merge.php, line 10

Namespace

Drupal\pgsql\Driver\Database\pgsql
View source
class Merge extends QueryMerge {
    
    /**
     * {@inheritdoc}
     */
    public function __construct(Connection $connection, string $table, array $options = []) {
        // @todo Remove the __construct in Drupal 11.
        // @see https://www.drupal.org/project/drupal/issues/3256524
        parent::__construct($connection, $table, $options);
        unset($this->queryOptions['return']);
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title Overrides
Merge::$conditionTable protected property The table or subquery to be used for the condition.
Merge::$defaultFields protected property An array of fields which should be set to their database-defined defaults.
Merge::$expressionFields protected property Array of fields to update to an expression in case of a duplicate record.
Merge::$insertFields protected property An array of fields on which to insert.
Merge::$insertValues protected property An array of values to be inserted.
Merge::$needsUpdate protected property Flag indicating whether an UPDATE is necessary.
Merge::$table protected property The table to be used for INSERT and UPDATE.
Merge::$updateFields protected property An array of fields that will be updated.
Merge::conditionTable protected function Sets the table or subquery to be used for the condition.
Merge::execute public function Executes the merge database query. Overrides Query::execute
Merge::expression public function Specifies fields to be updated as an expression.
Merge::fields public function Sets common field-value pairs in the INSERT and UPDATE query parts.
Merge::insertFields public function Adds a set of field->value pairs to be inserted.
Merge::key public function Sets a single key field to be used as condition for this query.
Merge::keys public function Sets the key fields to be used as conditions for this query.
Merge::STATUS_INSERT constant Returned by execute() if an INSERT query has been executed.
Merge::STATUS_UPDATE constant Returned by execute() if an UPDATE query has been executed.
Merge::updateFields public function Adds a set of field->value pairs to be updated.
Merge::useDefaults public function Specifies fields for which the database-defaults should be used.
Merge::__construct public function Constructs a Merge object. Overrides Merge::__construct
Merge::__toString public function Implements PHP magic __toString method to convert the query to a string. Overrides Query::__toString
Query::$comments protected property An array of comments that can be prepended to a query.
Query::$connection protected property The connection object on which to run this query.
Query::$connectionKey protected property The key of the connection object.
Query::$connectionTarget protected property The target of the connection object.
Query::$nextPlaceholder protected property The placeholder counter.
Query::$queryOptions protected property The query options to pass on to the connection object.
Query::$uniqueIdentifier protected property A unique identifier for this query object.
Query::comment public function Adds a comment to the query.
Query::getComments public function Returns a reference to the comments array for the query.
Query::getConnection public function Gets the database connection to be used for the query.
Query::nextPlaceholder public function Gets the next placeholder value for this query object. Overrides PlaceholderInterface::nextPlaceholder
Query::uniqueIdentifier public function Returns a unique identifier for this object. Overrides PlaceholderInterface::uniqueIdentifier
Query::__clone public function Implements the magic __clone function. 1
Query::__sleep public function Implements the magic __sleep function to disconnect from the database.
Query::__wakeup public function Implements the magic __wakeup function to reconnect to the database.
QueryConditionTrait::$condition protected property The condition object for this query.
QueryConditionTrait::alwaysFalse public function
QueryConditionTrait::andConditionGroup public function
QueryConditionTrait::arguments public function 1
QueryConditionTrait::compile public function 1
QueryConditionTrait::compiled public function 1
QueryConditionTrait::condition public function
QueryConditionTrait::conditionGroupFactory public function
QueryConditionTrait::conditions public function
QueryConditionTrait::exists public function
QueryConditionTrait::isNotNull public function
QueryConditionTrait::isNull public function
QueryConditionTrait::notExists public function
QueryConditionTrait::orConditionGroup public function
QueryConditionTrait::where public function

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.