Пример #1
0
 /**
  * @return bool|null
  */
 public function exists()
 {
     $sql = $this->grammar->compileExists($this);
     $results = $this->connection->select($sql, $this->getBindings(), !$this->useWritePdo);
     if (isset($results[0])) {
         $results = (array) $results[0];
         return (bool) $results['exists'];
     }
 }
Пример #2
0
 /**
  * @param string $table
  * @return array
  */
 public function getColumnListing($table)
 {
     $table = $this->connection->getTablePrefix() . $table;
     $results = $this->connection->select($this->grammar->compileColumnExists($table));
     return $this->connection->getPostProcessor()->processColumnListing($results);
 }