Query Builder

  1. 1 privatemsg.api.php sql
  2. 7-1 privatemsg.api.php sql
  3. 7-2 privatemsg.api.php sql
  4. 6-2 privatemsg.api.php sql

Query builder and related hooks

Privatemsg uses SelectQuery combined with custom tags to allow to customize almost all SELECT queries. For more information about SelectQuery, see http://drupal.org/developing/api/database and http://drupal.org/node/310075.

Arguments to a given query is stored in the metadata, with numerical keys (arg_%d) according to the position of the argument.

File

./privatemsg.api.php, line 21
Privatemsg API Documentation

Functions

Name Locationsort descending Description
hook_query_privatemsg_autocomplete_alter ./privatemsg.api.php Query to search for autocomplete usernames.
hook_query_privatemsg_sql_list_alter ./privatemsg.api.php Display a list of threads.
hook_query_privatemsg_messages_alter ./privatemsg.api.php Query definition to load messages of one or multiple threads.
hook_query_privatemsg_participants_alter ./privatemsg.api.php Alter the query that loads the participants of a thread.
hook_query_privatemsg_unread_count_alter ./privatemsg.api.php Loads all unread messages of a user (only the count query is used).
hook_query_privatemsg_deleted_alter ./privatemsg.api.php Alter the query that loads deleted messages to flush them.
privatemsg_sql_list ./privatemsg.module Query definition to load a list of threads.
privatemsg_sql_messages ./privatemsg.module Query definition to load messages of one or multiple threads.
privatemsg_sql_participants ./privatemsg.module Load all participants of a thread.
privatemsg_sql_unread_count ./privatemsg.module Count threads with unread messages.
privatemsg_sql_autocomplete ./privatemsg.module Looks up autocomplete suggestions for users.
privatemsg_sql_deleted ./privatemsg.module Query Builder function to load all messages that should be flushed.
privatemsg_sql_settings ./privatemsg.module Query builder function to load user settings.
_privatemsg_assemble_query ./privatemsg.module Generates a query based on a query id.