Exemple #1
0
 protected static function createConnection($name)
 {
     $config = array('driver' => 'sqlite', 'database' => ':memory:', 'prefix' => '');
     $pdo = new PDO('sqlite::memory:');
     $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
     $connection = new SQLiteConnection($pdo, $name, '', $config);
     $connection->setFetchMode(PDO::FETCH_CLASS);
     return $connection;
 }
Exemple #2
0
 /**
  * Set the default fetch mode for the connection.
  *
  * @param int $fetchMode
  * @return int 
  * @static 
  */
 public static function setFetchMode($fetchMode)
 {
     //Method inherited from \Illuminate\Database\Connection
     return \Illuminate\Database\SQLiteConnection::setFetchMode($fetchMode);
 }
Exemple #3
0
 /**
  * Set the default fetch mode for the connection, and optional arguments for the given fetch mode.
  *
  * @param int $fetchMode
  * @param mixed $fetchArgument
  * @param array $fetchConstructorArgument
  * @return int 
  * @static 
  */
 public static function setFetchMode($fetchMode, $fetchArgument = null, $fetchConstructorArgument = array())
 {
     //Method inherited from \Illuminate\Database\Connection
     return \Illuminate\Database\SQLiteConnection::setFetchMode($fetchMode, $fetchArgument, $fetchConstructorArgument);
 }