Class Database_super_mysql

Description

Located in /sources/database/shared/mysql.php (line 21)


	
			
Direct descendents
Method Summary
void db_change_primary_key (ID_TEXT $table_name, array $new_key, array $db)
void db_create_index (ID_TEXT $table_name, ID_TEXT $index_name, string $_fields, array $db)
void db_create_table (ID_TEXT $table_name, array $fields, array $db)
string db_default_user ()
void db_drop_if_exists (ID_TEXT $table, array $db)
boolean db_empty_is_null ()
string db_encode_like (string $pattern)
string db_full_text_assemble (string $content, boolean $boolean)
integer db_get_first_id ()
boolean db_has_expression_ordering (array $db)
string db_string_equal_to (ID_TEXT $attribute, string $compare)
string db_string_not_equal_to (ID_TEXT $attribute, string $compare)
boolean using_innodb ()
Methods
can_arbitrary_groupby (line 29)

Find whether the database may run GROUP BY unfettered with restrictions on the SELECT'd fields having to be represented in it or aggregate functions

  • return: Whether it can
boolean can_arbitrary_groupby ()
db_change_primary_key (line 80)

Change the primary key of a table.

void db_change_primary_key (ID_TEXT $table_name, array $new_key, array $db)
  • ID_TEXT $table_name: The name of the table to create the index on
  • array $new_key: A list of fields to put in the new key
  • array $db: The DB connection to make on
db_close_connections (line 294)

Close the database connections. We don't really need to close them (will close at exit), just disassociate so we can refresh them.

void db_close_connections ()
db_create_index (line 62)

Create a table index.

void db_create_index (ID_TEXT $table_name, ID_TEXT $index_name, string $_fields, array $db)
  • ID_TEXT $table_name: The name of the table to create the index on
  • ID_TEXT $index_name: The index name (not really important at all)
  • string $_fields: Part of the SQL query: a comma-separated list of fields to use on the index
  • array $db: The DB connection to make on
db_create_table (line 167)

Create a new table.

void db_create_table (ID_TEXT $table_name, array $fields, array $db)
  • ID_TEXT $table_name: The table name
  • array $fields: A map of field names to ocPortal field types (with *#? encodings)
  • array $db: The DB connection to make on
db_default_password (line 49)

Get the default password for making db connections (used by the installer as a default).

  • return: The default password for db connections
string db_default_password ()
db_default_user (line 39)

Get the default user for making db connections (used by the installer as a default).

  • return: The default user for db connections
string db_default_user ()
db_drop_if_exists (line 264)

Delete a table.

void db_drop_if_exists (ID_TEXT $table, array $db)
  • ID_TEXT $table: The table name
  • array $db: The DB connection to delete on
db_empty_is_null (line 253)

This function is internal to the database system, allowing SQL statements to be build up appropriately. Some databases require IS NULL to be used to check for blank strings.

  • return: Whether a blank string IS NULL
boolean db_empty_is_null ()
db_encode_like (line 285)

Encode a LIKE string comparision fragement for the database system. The pattern is a mixture of characters and ? and % wilcard symbols.

  • return: The encoded pattern
string db_encode_like (string $pattern)
  • string $pattern: The pattern
db_full_text_assemble (line 93)

Assemble part of a WHERE clause for doing full-text search

  • return: Part of a WHERE clause for doing full-text search
string db_full_text_assemble (string $content, boolean $boolean)
  • string $content: Our match string
  • boolean $boolean: Whether to do a boolean full text search
db_get_first_id (line 113)

Get the ID of the first row in an auto-increment table (used whenever we need to reference the first).

  • return: First ID used
integer db_get_first_id ()
db_get_type_remap (line 123)

Get a map of ocPortal field types, to actual mySQL types.

  • return: The map
array db_get_type_remap ()
db_has_expression_ordering (line 243)

Find whether expression ordering support is present

  • return: Whether it is
boolean db_has_expression_ordering (array $db)
  • array $db: A DB connection
db_is_flat_file_simple (line 274)

Determine whether the database is a flat file database, and thus not have a meaningful connect username and password.

  • return: Whether the database is a flat file database
boolean db_is_flat_file_simple ()
db_string_equal_to (line 220)

Encode an SQL statement fragment for a conditional to see if two strings are equal.

  • return: The SQL
string db_string_equal_to (ID_TEXT $attribute, string $compare)
  • ID_TEXT $attribute: The attribute
  • string $compare: The comparison
db_string_not_equal_to (line 232)

Encode an SQL statement fragment for a conditional to see if two strings are not equal.

  • return: The SQL
string db_string_not_equal_to (ID_TEXT $attribute, string $compare)
  • ID_TEXT $attribute: The attribute
  • string $compare: The comparison
using_innodb (line 155)

Whether to use InnoDB for mySQL. Change this function by hand - official only MyISAM supported

  • return: Answer
boolean using_innodb ()

Documentation generated on Sun, 02 Jan 2011 23:18:28 +0000 by phpDocumentor 1.4.3