/** * @return DBDataset */ public function getDbDataset() { if (is_null($this->_dbDataset)) { $this->_dbDataset = new DBDataset($this->_connection->getDbConnectionString()); } return $this->_dbDataset; }
public static function prepareEnvironment(ConnectionManagement $connection) { $database = $connection->getDatabase(); $newConnection = new ConnectionManagement(str_replace("/{$database}", "/", $connection->getDbConnectionString())); $dbDataset = new DBDataset($newConnection->getDbConnectionString()); $dbDataset->execSQL("CREATE SCHEMA IF NOT EXISTS `{$database}` DEFAULT CHARACTER SET utf8 ;"); }
public function __construct(ConnectionManagement $connMngt) { $strcnn = $connMngt->getDbConnectionString(); $postOptions = [PDO::ATTR_EMULATE_PREPARES => true]; parent::__construct($connMngt, $strcnn, [], $postOptions); }