Skip to content
This repository was archived by the owner on Feb 5, 2024. It is now read-only.
This repository was archived by the owner on Feb 5, 2024. It is now read-only.

Open to PR for posting to _find? #84

Closed
@silverbackdan

Description

@silverbackdan

Before I submit a PR writing the function into CouchDBClient.php (which would be pretty simple) - would you be open to having this to quickly send a POST request to the database _find endpoint to run Mango queries?

I'd imagine something like:

    /**
     * Find a documents with a mango query
     *
     * @param array|string $query
     * @return HTTP\Response
     */
    public function findRequest($query)
    {
        if (!is_string($query) {
            $query = json_encode($query);
        }
        $findPath = '/' . $this->databaseName . '/_find';
        return $this->httpClient->request('POST', $findPath, $query);
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions