/** * @param ConnectionInterface $connection * @param atring $schema * @param string $prefix */ public function __construct(ConnectionInterface $connection, $schema, $prefix = '') { $this->connection = $connection; $this->prefix = $prefix; $result = $this->connection->select("SELECT * FROM sqlite_master WHERE name = '{$this->table}' AND type = 'table'"); if (0 == count($result)) { // Create the caches table $this->connection->statement($schema); } }