phpDocumentor GalleryCore
Storage
[ class tree: GalleryCore ] [ index: GalleryCore ] [ all elements ]

Class: MySqlStorage

Source Location: /modules/core/classes/GalleryStorage.class

Class MySqlStorage

Class Overview

MySQL extension of the GalleryStorage class.

This object implements the hooks for saving and restoring objects in a MySQL database.

Located in /modules/core/classes/GalleryStorage.class [line 1678]

GalleryStorage
   |
   --MySqlStorage

Methods

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From GalleryStorage

GalleryStorage::$_columnPrefix
GalleryStorage::$_database
GalleryStorage::$_db
GalleryStorage::$_entityInfoCache
GalleryStorage::$_extras
GalleryStorage::$_hostname
GalleryStorage::$_isEmptyAllowedForNotNullColumn
GalleryStorage::$_isTransactional
GalleryStorage::$_nonTransactionalDb
GalleryStorage::$_password
GalleryStorage::$_schema
GalleryStorage::$_tablePrefix
GalleryStorage::$_type
GalleryStorage::$_usePersistentConnections
GalleryStorage::$_username

Inherited From GalleryStorage

GalleryStorage::GalleryStorage()
GalleryStorage::acquireReadLock()
Acquire read locks on the given items
GalleryStorage::acquireWriteLock()
Acquire write locks on the given items
GalleryStorage::addMapEntry()
Add a new entry to a map
GalleryStorage::beginTransaction()
Begin a new transaction, if the storage layer supports them.
GalleryStorage::checkPoint()
Mark a storage checkpoint, which will commit pending transactions and perform any future tied-tasks
GalleryStorage::cleanStore()
Clean out and reset the persistent store for this strategy.
GalleryStorage::commitTransaction()
Commit our transaction, if the storage layer supports them.
GalleryStorage::configureStore()
Configure the persistent store for this strategy, for the given module.
GalleryStorage::configureStoreCleanup()
Perform any cleanup necessary after installing or upgrading the given module.
GalleryStorage::convertBitsToInt()
Convert value from a database bit column into an integer
GalleryStorage::convertIntToBits()
Convert an integer into something that the database will accept into a bit column
GalleryStorage::decodeBlob()
Decode a blob of binary data into a form that's safe for a varchar column
GalleryStorage::deleteEntity()
Delete the GalleryEntity
GalleryStorage::describeEntity()
Describe the members, modules and parent of an entity
GalleryStorage::describeMap()
Describe all the members of a map
GalleryStorage::encodeBlob()
Encode a blob of binary data into a form that's safe for a varchar column
GalleryStorage::execute()
Execute a database statement
GalleryStorage::extractClasses()
Extracts the class names from a given query
GalleryStorage::getAdoDbType()
Return the type of this database (ADOdb driver name)
GalleryStorage::getAffectedRows()
Return the number of rows that were affected by the last UPDATE/DELETE. Note that MySQL treats this a little differently than other databases; if you do an UPDATE operation and nothing is actually changed (eg. in the situation where the SET clauses in your UPDATE match the existing values) then mysql will return 0 affected rows.
GalleryStorage::getDatabaseExporter()
This method gets a Gallery Database Exporter object.
GalleryStorage::getDatabaseImporter()
This method gets a Gallery Database Importer object.
GalleryStorage::getFunctionSql()
Return a customized function for this database platform
GalleryStorage::getMapEntry()
Get entries in a map that match a criteria and return selected fields
GalleryStorage::getProfilingHtml()
Return storage profiling information in HTML format
GalleryStorage::getTableVersions()
Examine the schema table and return the version of all the Gallery tables
GalleryStorage::getUniqueId()
Get a new, unique id
GalleryStorage::isInstalled()
Return true if enough of this storage system is installed that there'll be a conflict if you try to do another install.
GalleryStorage::isTransactional()
Is the database transactional?
GalleryStorage::loadEntities()
Load the GalleryEntities with the ids specified
GalleryStorage::moveIdsBetweenLocks()
Move ids between locks.
GalleryStorage::newEntity()
Create a new GalleryEntity
GalleryStorage::newLockId()
Generate a new lock id.
GalleryStorage::optimize()
Optimize the database.
GalleryStorage::refreshEntity()
Refresh a GalleryEntity from the database if it has changed
GalleryStorage::refreshLocks()
Refresh all the locks that we hold so that they aren't accidentally considered expired
GalleryStorage::releaseLocks()
Release the given locks.
GalleryStorage::removeAllMapEntries()
Remove ALL entries from a map. Use with caution!
GalleryStorage::removeIdsFromLock()
Remove ids from a lock.
GalleryStorage::removeMapEntry()
Remove entries from a map
GalleryStorage::rollbackTransaction()
Rollback our transaction, if the storage layer supports them.
GalleryStorage::saveEntity()
Save the changes to the GalleryEntity
GalleryStorage::search()
Search the persistent store for the target values matching the given criteria
GalleryStorage::setDebug()
Set Adodb debug mode.
GalleryStorage::unconfigureStore()
Uninstall the database schema for the given module
GalleryStorage::updateMapEntry()
Update entries in a map
GalleryStorage::updateTableInfo()
Load the Maps.inc and Entities.inc into the schema table for the specified module
GalleryStorage::validateConnection()
Test whether the current connection and non transactional connection are still valid. If the connections are not valid then reconnect the connection.
GalleryStorage::_executeSqlFile()
Execute a given SQL file against the database. Prefix table and column names as necessary.
GalleryStorage::_getConnection()
Connect to the database
GalleryStorage::_getEntityOrMapInfo()
Retrieve the entity or map information from the Schema table. If tryAllModules is false then only consider plugins that are active.
GalleryStorage::_getExtras()
Get the reference to our GalleryStorageExtras instance where we put less frequently used code (most code that's used to modify the database).
GalleryStorage::_getOptimizeStatements()
Get sql to optimize a table
GalleryStorage::_getSqlReplacements()
Return database specific syntax to replace in schema SQL
GalleryStorage::_getWhereSql()
Accepts a $mapInfo pair and $match value to add match information to supplied array.
GalleryStorage::_guaranteeTransaction()
Begin transaction if not already in one.
GalleryStorage::_normalizeValue()
Cast the value to the proper member type when interacting with the database. Optionally also perform a UTF-8-safe truncation for strings.
GalleryStorage::_setConnectionSettings()
Set runtime settings for the given database connection.
GalleryStorage::_traceStart()
Start tracing. If Gallery is in debug, this method will begin storing all output and routing it into Gallery's debug system.
GalleryStorage::_traceStop()
Stop tracing. If Gallery is in debug, this will method will stop tracing.
GalleryStorage::_translateColumnName()
Translate a potentially unsafe column name into a safe one
GalleryStorage::_translateQuery()
Translate all table and column names from [Entity::member] notation to table.column notation.
GalleryStorage::_translateTableName()
Translate a potentially unsafe table name into a safe one by adding a prefix or suffix to avoid conflicting with a reserved word.
GalleryStorage::_truncateString()
Perform a UTF-8-safe truncation of the string to a size

[ Top ]
Method Summary
MySqlStorage   MySqlStorage()  
void   decodeBlob()  
void   encodeBlob()  
void   getFunctionSql()  
string   getType()   Return the type of this database
void   getUniqueId()  
string   getVersion()   Get database version.
void   _getOptimizeStatements()  
void   _getSqlReplacements()  
void   _setConnectionSettings()  
void   _truncateString()   Truncate UTF-8 strings either to given character or to byte length depending on the MySQL version.

[ Top ]
Methods
Constructor MySqlStorage  [line 1680]

  MySqlStorage MySqlStorage( $config  )

Parameters:
   $config: 


[ Top ]
decodeBlob  [line 1836]

  void decodeBlob( $blob  )

Parameters:
   $blob: 

API Tags:
See:  GalleryStorage::decodeBlob


Redefinition of:
GalleryStorage::decodeBlob()
Decode a blob of binary data into a form that's safe for a varchar column

[ Top ]
encodeBlob  [line 1821]

  void encodeBlob( $blob  )

Parameters:
   $blob: 

API Tags:
See:  GalleryStorage::encodeBlob


Redefinition of:
GalleryStorage::encodeBlob()
Encode a blob of binary data into a form that's safe for a varchar column

[ Top ]
getFunctionSql  [line 1739]

  void getFunctionSql( $functionName, $args  )

Parameters:
   $functionName: 
   $args: 

API Tags:
See:  GalleryStorage::getFunctionsSql


Redefinition of:
GalleryStorage::getFunctionSql()
Return a customized function for this database platform

[ Top ]
getType  [line 1691]

  string getType( )

Return the type of this database



[ Top ]
getUniqueId  [line 1872]

  void getUniqueId( [ $sequence = DATABASE_SEQUENCE_ID]  )

Parameters:
   $sequence: 

API Tags:
See:  GalleryStorage::getUniqueId


Redefinition of:
GalleryStorage::getUniqueId()
Get a new, unique id

[ Top ]
getVersion  [line 1851]

  string getVersion( )

Get database version.


API Tags:
Return:  version


[ Top ]
_getOptimizeStatements  [line 1865]

  void _getOptimizeStatements( )


API Tags:
See:  GalleryStorage::_getOptimizeStatements


Redefinition of:
GalleryStorage::_getOptimizeStatements()
Get sql to optimize a table

[ Top ]
_getSqlReplacements  [line 1718]

  void _getSqlReplacements( )


API Tags:
See:  GalleryStorage::_getSqlReplacements


Redefinition of:
GalleryStorage::_getSqlReplacements()
Return database specific syntax to replace in schema SQL

[ Top ]
_setConnectionSettings  [line 1698]

  void _setConnectionSettings( &$db  )

Parameters:
   &$db: 

API Tags:
See:  GalleryStorage::_setConnectionSettings


Redefinition of:
GalleryStorage::_setConnectionSettings()
Set runtime settings for the given database connection.

[ Top ]
_truncateString  [line 1888]

  void _truncateString( $value, $size, [ $lengthInBytes = false]  )

Truncate UTF-8 strings either to given character or to byte length depending on the MySQL version.

Parameters:
   $value: 
   $size: 
   $lengthInBytes: 

API Tags:
See:  GalleryStorage::_truncateString


Redefinition of:
GalleryStorage::_truncateString()
Perform a UTF-8-safe truncation of the string to a size

[ Top ]

Documentation generated on Fri, 08 Oct 2010 05:04:34 -0700 by phpDocumentor 1.3.0RC6