示例#1
0
 public function listCollections($databaseName = '')
 {
     $data = 'LIST COLLECTIONS';
     if ($databaseName !== false) {
         $data .= ' FROM ' . $databaseName;
     }
     $this->connection->query = $data;
     $this->connection->method = 'POST';
     $this->connection->multiple = true;
     $this->connection->action = '';
     $response = DataLayer::execute($this->connection, true);
     $this->connection->resetSelf();
     return $response;
 }
 public function describe()
 {
     $data = 'DESCRIBE COLLECTION ' . $this->connection->db;
     $this->connection->query = $data;
     $this->connection->method = 'POST';
     $this->connection->multiple = true;
     $this->connection->action = '';
     $response = DataLayer::execute($this->connection, true);
     $this->connection->resetSelf();
     return $response;
 }
示例#3
0
 /**
  * Pass query Params to Transport Layer for execution.
  *
  * @param  \stdClass $connection
  * @return mixed
  */
 public static function sendQuery(ConnectionInterface $connection)
 {
     $response = DataLayer::execute($connection);
     $connection->resetSelf();
     return $response;
 }