Class mysql
MySQL storage driver.
The storage driver is internally based on the MySQL Improved (MySQLi) PHP extension and supports both numerical/associative index modes and cached or streaming query result fetching. Additionally, the character set and timezone can be set and are directly taken into account by the MySQL server.
- Core\Object implements Core\Chainable
 - 
			
			Core\Set
			
			 implements 
				Core\Accessor
			
			
		 - 
			
			Core\Storage
			
			
			
		 - 
			
Core\Storage\Driver\mysql			
			
			
		 
Package: Core\Storage
Since: 3.0
Requires: PHP 5.3, MySQLi
Version: 1.0
Located at Storage/Driver/mysql.inc.php
Methods summary
				 public 
				
				
				
			 | 
			|
				 public 
				
				
				
			 | 
			|
				 public 
				
				
				
			 | 
			|
				 public 
				string
				
				
			 | 
			
			#
			 backendVersion( )
			Returns the back-end version string. Some drivers use different layers for their backend storage (e.g. an interface library and a server) with different versions for each layer. The most basic layer, available and significant version is returned (e.g. the database server version). Returns the MySQL server version.  | 
		
				 public 
				string|false
				
				
			 | 
			|
				 public 
				string
				
				
			 | 
			
			#
			 clientVersion( )
			Returns the client version string. Some drivers use different layers for their back-end storage (e.g. an interface library and a server) with different versions for each layer. The highest layer, available and significant version is returned (e.g. the database client version). Returns the MySQL Improved client library version.  | 
		
				 public 
				
				
				
			 | 
			|
				 public 
				string
				
				
			 | 
			
			#
			 escape( string $value, boolean $addDelimiters = false )
			Escapes a binary string specific to the storage back-end for direct usage. When performing direct commands on the back-end engine, most storage systems require the user to escaped data sequences (e.g. SQL). Each data sequence used for direct commands should therefore be preprocessed by this method prior to sending the command. The string is escaped with respect to the currently active connection character set.  | 
		
				 public 
				Storage_Result
				
				
			 | 
			
			#
			 execute( mixed $statement, array $parameters = null )
			Executes an accessor node, prepared storage statement or direct back-end query.  | 
		
				 public 
				
			 | 
			|
				 public 
				
				
				
			 | 
			
			#
			 reset( )
			Closes and re-opens the MySQL database connection. To be used after environmental changes, e.g. a character set change. If no connection is open, no action is performed.  | 
		
				 public 
				
				
				
			 | 
			|
				 public static
				integer
				
				
			 | 
			
			#
			 unifyErrorCode( integer $code )
			Translates a MySQL-specific error code into the unified error codes used by Core Storage.  | 
		
Methods inherited from Core\Storage
Methods inherited from Core\Object
				__autocreateFactory(), 
				__call(), 
				__processParameters(), 
				__toString(), 
				attachMethod(), 
				chain(), 
				getValueForKey(), 
				getValueForKeyPath(), 
				getValueForUndefinedKey(), 
				hash(), 
				issetValueForKey(), 
				setValueForKey(), 
				setValueForKeyPath(), 
				setValueForUndefinedKey(), 
				uuid()
			
Constants summary
string | 
				
					
StorageModeParameter					
					Storage mode parameter name.  | 
				
					 
						#
						 
				'mode'
					 | 
			
string | 
				
					
FetchStorageMode					
					Fetching storage mode. Instructs MySQL to not cache query results but fetch a row on demand. This setting is useful to reduce the memory required to handle a result data set, but disables features such as the number of rows in unknown before completing the iteration on all rows.  | 
				
					 
						#
						 
				'fetch'
					 | 
			
string | 
				
					
StoreStorageMode					
					Cached storage mode. Instructs MySQL to cache the complete query result set. This is the default.  | 
				
					 
						#
						 
				'store'
					 | 
			
string | 
				
					
IndexModeParameter					
					Index mode parameter name.  | 
				
					 
						#
						 
				'index'
					 | 
			
string | 
				
					
NumericIndexMode					
					Index modes that uses numeric indices for result columns. Column names are ignored. Slightly reduces memory overhead.  | 
				
					 
						#
						 
				'numeric'
					 | 
			
string | 
				
					
AssociativeIndexMode					
					Index mode that uses associative indices for result columns. Indices are based on the table column name or selection expression. This is the default.  | 
				
					 
						#
						 
				'assoc'
					 | 
			
string | 
				
					
TimezoneParameter					
					Connection-local timezone parameter name.  | 
				
					 
						#
						 
				'timezone'
					 | 
			
Constants inherited from Core\Storage
Constants inherited from Core\Object
				AnyParameterType, 
				AutochainParameterType, 
				AutocreateParameterType, 
				BooleanParameterType, 
				CharParameterType, 
				EnumParameterType, 
				IntegerParameterType, 
				RealParameterType, 
				StringParameterType, 
				UserParameterType
			
Properties summary
				protected  
				array
			 | 
			
$_v_parameters
				 Cached driver configuration array.  | 
			|
				protected  
				array
			 | 
			
$_v_transactionStack
				 Nested transactions stack.  | 
			|
				protected  
				 | 
			
$_v_uri
				 Driver configuration URI. Required for re-connecting to the database.  | 
			|
				protected  
				 | 
			
$_link
				 Database connection link.  | 
			
Properties inherited from Core\Storage
Magic properties
				public  read-only
				array
			 | 
			
$parameters
				 Cached driver configuration array.  | 
		
				public  read-only
				 | 
			
$uri
				 Driver configuration URI.  | 
		
				public  read-only
				array
			 | 
			
$transactionStack
				 Stack of open (nested) transactions.  |