Overview

Namespaces

  • Alchemy
    • core
      • query
      • schema
    • dialect
    • engine
    • orm
    • tests
    • util
      • promise
  • PHP

Classes

  • Engine
  • ResultSet

Interfaces

  • IEngine
  • IResultSet
  • Overview
  • Namespace
  • Class
  • Tree
 1: <?php
 2: 
 3: namespace Alchemy\engine;
 4: use Alchemy\core\query\IQuery;
 5: 
 6: 
 7: /**
 8:  * All Engine implementations should implement this interface
 9:  */
10: interface IEngine {
11: 
12:     /**
13:      * Start an atomic transaction on the database. These should
14:      * generally not be held open very long in order to prevent
15:      * deadlocks
16:      */
17:     public function beginTransaction();
18: 
19: 
20:     /**
21:      * Commit a transaction as complete
22:      */
23:     public function commitTransaction();
24: 
25: 
26:     /**
27:      * Compile and run a SQL expression on the database
28:      *
29:      * @param Query Query to compile
30:      * @return ResultSet
31:      */
32:     public function query(IQuery $query);
33: 
34: 
35:     /**
36:      * Execute raw SQL on the database connection
37:      *
38:      * @param string $sql Statement string
39:      * @param array $params Params to bind to statement
40:      * @return ResultSet
41:      */
42:     public function execute($sql, $params = array());
43: 
44: 
45:     /**
46:      * Revert a pending transaction on the database
47:      */
48:     public function rollbackTransaction();
49: }
50: 
API documentation generated by ApiGen 2.8.0