db_merge

  1. drupal
    1. 7
Versions
7 db_merge($table, array $options = array())

Returns a new MergeQuery object for the active database.

Parameters

$table The table into which to merge.

$options An array of options to control how the query operates.

Return value

MergeQuery A new MergeQuery object for this connection.

Related topics

▾ 32 functions call db_merge()

actions_save in drupal/includes/actions.inc
Saves an action and its user-supplied parameter values to the database.
aggregator_refresh in drupal/modules/aggregator/aggregator.module
Checks a news feed for new items.
aggregator_remove in drupal/modules/aggregator/aggregator.module
Removes all items from a feed.
aggregator_save_category in drupal/modules/aggregator/aggregator.module
Add/edit/delete aggregator categories.
aggregator_save_item in drupal/modules/aggregator/aggregator.processor.inc
Add/edit/delete an aggregator item.
block_add_block_form_submit in drupal/modules/block/block.admin.inc
Form submission handler for the add block form.
block_admin_configure_submit in drupal/modules/block/block.admin.inc
Form submission handler for the block configuration form.
contact_update_7002 in drupal/modules/contact/contact.install
Enable the 'access user contact forms' for registered users by default.
dashboard_update in drupal/modules/dashboard/dashboard.module
Set the new weight of each region according to the drag-and-drop order.
DrupalDatabaseCache::set in drupal/includes/cache.inc
Store data in the persistent cache.
file_usage_add in drupal/includes/file.inc
Records that a module is using a file.
filter_format_save in drupal/modules/filter/filter.module
Save a text format object to the database.
hook_user_role_update in drupal/modules/user/user.api.php
Inform other modules that a user role has been updated.
menu_save in drupal/modules/menu/menu.module
Save a custom menu.
node_tag_new in drupal/modules/node/node.module
Update the 'last viewed' timestamp of the specified node for current user.
poll_update in drupal/modules/poll/poll.module
Implements hook_update().
profile_save_profile in drupal/modules/profile/profile.module
rdf_mapping_save in drupal/modules/rdf/rdf.module
Saves an RDF mapping to the database.
search_index in drupal/modules/search/search.module
Update the full-text search index for a particular item.
search_update_totals in drupal/modules/search/search.module
Updates the {search_total} database table.
shortcut_set_assign_user in drupal/modules/shortcut/shortcut.module
Assigns a user to a particular shortcut set.
statistics_exit in drupal/modules/statistics/statistics.module
Implements hook_exit().
system_update_7061 in drupal/modules/system/system.install
Migrate upload.module data to the newly created file field.
taxonomy_test_taxonomy_term_update in drupal/modules/simpletest/tests/taxonomy_test.module
Implements hook_taxonomy_term_update().
user_role_grant_permissions in drupal/modules/user/user.module
Grant permissions to a user role.
user_set_authmaps in drupal/modules/user/user.module
Save mappings of which external authentication module(s) authenticated a user. Maps external usernames to user ids in the users table.
variable_set in drupal/includes/bootstrap.inc
Sets a persistent variable.
_drupal_session_write in drupal/includes/session.inc
Session handler assigned by session_set_save_handler().
_registry_parse_files in drupal/includes/registry.inc
Parse all files that have changed since the registry was last built, and save their function and class listings.
_tracker_add in drupal/modules/tracker/tracker.module
Update indexing tables when a node is added, updated or commented on.
_update_7000_user_role_grant_permissions in drupal/modules/user/user.install
Utility function: grant a set of permissions to a role during update.
_update_cache_set in drupal/modules/update/update.module
Store data in the private update status cache table.

Code

drupal/includes/database/database.inc, line 2312

<?php
function db_merge($table, array $options = array()) {
  if (empty($options['target']) || $options['target'] == 'slave') {
    $options['target'] = 'default';
  }
  return Database::getConnection($options['target'])->merge($table, $options);
}
?>