Class Engine
	
	
Basic Engine implementation using PDO as it's DBAPI layer
	 
	
		- 
Alchemy\engine\Engine			
			 implements 
				Alchemy\engine\IEngine
			
			
		
 
	
	
	
	Methods summary
	
		
			 public 
			
			
			
		 | 
		
		#
		__construct( Alchemy\dialect\Compiler $compiler, string $dsn, string $username = '', mixed $password = '' )
		
			
Object constructor. Opens a connection to the database using PDO 
		 
		
			
Object constructor. Opens a connection to the database using PDO 
				Parameters
				
					- $compiler
 
					string $dsn See PDO documentation for DSN reference 
					- $dsn
 
					string $username 
					- $username
 
					string $password 
					- $password
 
					
				  
		 
		  | 
	
	
		
			 public 
			
			
			
		 | 
		
		#
		beginTransaction( )
		
			
Start an atomic transaction on the database. These should generally not be
held open very long in order to prevent deadlocks 
		 
		
			
Start an atomic transaction on the database. These should generally not be
held open very long in order to prevent deadlocks 
				Implementation of
				
		 
		  | 
	
	
		
			 public 
			
			
			
		 | 
		
		#
		commitTransaction( )
		
			
Commit a transaction as complete 
		 
		
			
Commit a transaction as complete 
				Implementation of
				
		 
		  | 
	
	
		
			 protected 
			integer
			
			
		 | 
		
		#
		getBindParamType( object $obj )
		
			
Get the PDO bind-parameter type (default PARAM_STR) for an object 
		 
		
			
Get the PDO bind-parameter type (default PARAM_STR) for an object 
				Parameters
				
				Returns
				
					integer 
				 
		 
		  | 
	
	
		
			 protected 
			
			
			
		 | 
		
		#
		echoQuery( string $sql, mixed $params )
		
			
Log a SQL statement if echo is enabled 
		 
		
			
Log a SQL statement if echo is enabled 
				Parameters
				
		 
		  | 
	
	
		
			 public 
			Alchemy\engine\ResultSet
			
			
		 | 
		
		#
		query( Alchemy\core\query\IQuery $query )
		
			
Compile and run a SQL expression on the database 
		 
		
			
Compile and run a SQL expression on the database 
				Parameters
				
				Returns
				
				Implementation of
				
		 
		  | 
	
	
		
			 public 
			Alchemy\engine\ResultSet
			
			
		 | 
		
		#
		execute( string $sql, array $params = array() )
		
			
Execute raw SQL on the database connection 
		 
		
			
Execute raw SQL on the database connection 
				Parameters
				
					- $sql
 
					string $sql Statement string 
					- $params
 
					array $params Params to bind to statement 
				  
				Returns
				
				Implementation of
				
		 
		  | 
	
	
		
			 public 
			
			
			
		 | 
		
		#
		rollbackTransaction( )
		
			
Revert a pending transaction on the database 
		 
		
			
Revert a pending transaction on the database 
				Implementation of
				
		 
		  | 
	
	
		
			 public 
			
			
			
		 | 
		
		#
		setEcho( mixed $echoQueries )
		
			
Optionally enable echo'ing of SQL run on the RDBMS. 
		 
		
			
Optionally enable echo'ing of SQL run on the RDBMS. 
				Parameters
				
					- $echoQueries
 
					mixed $echoQueries False to disable. True to log to STDOUT. Callable to enable custom
logging 
				  
		 
		  |