public function setUp() { $classes = array('Project' => array('table' => 'projects', 'props' => array('id' => array('id', 'int', array('pk' => true)), 'name' => array('name', 'varchar'))), 'Bug' => array('table' => 'bugs', 'props' => array('ID' => array('id', 'int', array('pk' => true)), 'Name' => array('name', 'varchar')), 'useGettersAndSetters' => true)); $this->session = $this->openSession($classes, true); $this->connection = $this->session->getConnection(); $this->connection->execute('CREATE TABLE bugs (id NUMERIC, name TEXT)'); }
public function setUp() { $classes = array('Project' => array('table' => 'projects', 'props' => array('id' => array('id', 'int', array('pk' => true)), 'name' => array('name', 'varchar'))), 'Bug' => array('table' => 'bugs', 'props' => array('ID' => array('id', 'int', array('pk' => true)), 'Name' => array('name', 'varchar')), 'discriminator' => array('type', 'varchar'), 'discriminator-value' => 'unknown', 'subclasses' => array('TechnicalBug' => array('discriminator-value' => 'technical', 'props' => array('errorcode' => array('errorcode', 'int')), 'useGettersAndSetters' => true), 'FunctionalBug' => array('discriminator-value' => 'functional', 'props' => array('steps' => array('steps', 'varchar')), 'useGettersAndSetters' => true)), 'useGettersAndSetters' => true)); $this->session = $this->openSession($classes, true); $this->connection = $this->session->getConnection(); $this->connection->execute('CREATE TABLE bugs (id NUMERIC, name TEXT, type TEXT, errorcode NUMERIC, steps TEXT)'); }
public function __construct(OutletSession $session) { $this->session = $session; $this->connection = $session->getConnection(); $this->config = $session->getConfig(); $this->queryParser = $session->getQueryParser(); }