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; }
/** * 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; }