MarkLogic Connect
MarkLogic Connect Client API Collection
|
Provides a high level logical object representing all access to a single MarkLogic database. More...
#include <Connection.hpp>
Public Member Functions | |
MLCLIENT_API | Connection () |
Creates a Connection instance. More... | |
MLCLIENT_API | ~Connection () |
connection_configuration Connection configuration functions | |
MLCLIENT_API void | configure (const std::string &hostname, const std::string &port, const std::string &username, const std::string &password, const bool usessl=false) override |
MLCLIENT_API bool | connect () override |
Connects or tests the authentication in the connection. May not actually connect. More... | |
MLCLIENT_API void | disconnect () override |
Frees up resources held by the connection, until the next call to connect. More... | |
MLCLIENT_API void | setDatabaseName (const std::string &db) override |
Sets the name of the database to query/update. Defaults to Documents. More... | |
MLCLIENT_API std::string | getDatabaseName () override |
Returns the database name we're querying/updating. Defaults to Documents. More... | |
http_raw RAW HTTP commands | |
MLCLIENT_API Response * | doGet (const std::string &pathAndQuerystring) override |
Performs a HTTP GET Request against MarkLogic Server. More... | |
MLCLIENT_API Response * | doPut (const std::string &pathAndQuerystring, const IDocumentContent &payload) override |
Performs a HTTP PUT Request against MarkLogic Server. More... | |
MLCLIENT_API Response * | doPost (const std::string &pathAndQuerystring, const IDocumentContent &payload) override |
Performs a HTTP POST Request against MarkLogic Server. More... | |
MLCLIENT_API Response * | doDelete (const std::string &pathAndQueryString) override |
Performs a HTTP DELETE Request against MarkLogic Server. More... | |
wrap_rest Convenience wrapper function calls for common MarkLogic REST API calls. | |
MLCLIENT_API Response * | getDocument (const std::string &uri) override |
Retrieves a document from the server, at the given document URI (MarkLogic unique document ID) More... | |
virtual MLCLIENT_API Response * | getDocument (Document &inout_document) override |
Retrieves a document from the server, at the given document URI (MarkLogic unique document ID, within the Document object) More... | |
virtual MLCLIENT_API Response * | getDocumentContent (Document &inout_document) override |
Populates the content of the specified document (MUST have a uri). More... | |
virtual MLCLIENT_API Response * | getDocumentProperties (Document &inout_document) override |
Populates the properties of the specified document (MUST have a uri). More... | |
virtual MLCLIENT_API Response * | getDocumentPermissions (Document &inout_document) override |
Populates the permissions of the specified document (MUST have a uri). More... | |
MLCLIENT_API Response * | saveDocumentContent (const std::string &uri, const IDocumentContent &payload) override |
Saves a document to MarkLogic (either as new or an update), at the given document URI (MarkLogic unique document ID) More... | |
MLCLIENT_API Response * | saveDocuments (const DocumentSet &documents, const long startPosInclusive, const long endPosInclusive) override |
Saves a set of documents as a single batch to MarkLogic Server. More... | |
MLCLIENT_API Response * | saveDocument (const Document &doc) override |
Saves the specified document to MarkLogic Server. More... | |
MLCLIENT_API Response * | deleteDocument (const std::string &uri) override |
Deletes the specified document by URI. More... | |
MLCLIENT_API Response * | search (const SearchDescription &desc) override |
Performs a search against the MarkLogic database given the provided search query, text and options. More... | |
MLCLIENT_API Response * | searchExtension (const std::string &extensionName, const SearchDescription &desc) override |
Performs a search against a REST extension that is compatible with POST /v1/search (i.e. Connection::search) More... | |
MLCLIENT_API Response * | saveSearchOptions (const std::string &name, const IDocumentContent *optionsDoc) override |
Saves search options to the server. More... | |
MLCLIENT_API Response * | values (const std::string &valuesName, const std::string &optionsName) override |
Performs a values lookup in MarkLogic Server, returning the top values from the lexicon as per the search options configuration used. More... | |
MLCLIENT_API Response * | valuesExtension (const std::string &extensionName, const std::string &valuesName, const std::string &optionsName, const SearchDescription &desc) override |
Performs a values against a REST extension that is compatible with POST /v1/search (i.e. Connection::search) More... | |
MLCLIENT_API Response * | listRootCollections () override |
Lists the top level collections. I.e. ones starting without a / or ones starting with a / but not containing a / character See IConnection for details. More... | |
MLCLIENT_API Response * | listCollections (const std::string &parentCollection) override |
Lists the immediate child collections of the specified parent Collections. See IConnection for details. More... | |
![]() | |
MLCLIENT_API | IConnection ()=default |
Creates a Connection instance. More... | |
virtual | ~IConnection ()=default |
Provides a high level logical object representing all access to a single MarkLogic database.
Wraps all underlying TCP, HTTP and authentication provided by the internal API. Provides convenience methods that map 1:1 with MarkLogic Server's REST API.
MLCLIENT_API mlclient::Connection::Connection | ( | ) |
Creates a Connection instance.
Defaults connection to admin/admin, localhost, nossl, port 8002, and the Documents database.
MLCLIENT_API mlclient::Connection::~Connection | ( | ) |
Destroys a Connection instance.
|
overridevirtual |
Configures this connection, providing connection override information - host, port, username, password and SSL usage
See IConnection for details.
Implements mlclient::IConnection.
|
overridevirtual |
Connects or tests the authentication in the connection. May not actually connect.
See IConnection for details.
Implements mlclient::IConnection.
|
overridevirtual |
Deletes the specified document by URI.
See IConnection for details.
Implements mlclient::IConnection.
|
overridevirtual |
Frees up resources held by the connection, until the next call to connect.
See IConnection for details.
Implements mlclient::IConnection.
|
overridevirtual |
Performs a HTTP DELETE Request against MarkLogic Server.
See IConnection for details.
Implements mlclient::IConnection.
|
overridevirtual |
Performs a HTTP GET Request against MarkLogic Server.
See IConnection for details.
Implements mlclient::IConnection.
|
overridevirtual |
Performs a HTTP POST Request against MarkLogic Server.
See IConnection for details.
Implements mlclient::IConnection.
|
overridevirtual |
Performs a HTTP PUT Request against MarkLogic Server.
See IConnection for details.
Implements mlclient::IConnection.
|
overridevirtual |
Returns the database name we're querying/updating. Defaults to Documents.
See IConnection for details.
Implements mlclient::IConnection.
|
overridevirtual |
Retrieves a document from the server, at the given document URI (MarkLogic unique document ID)
See IConnection for details.
Implements mlclient::IConnection.
|
overridevirtual |
Retrieves a document from the server, at the given document URI (MarkLogic unique document ID, within the Document object)
See IConnection for details.
Implements mlclient::IConnection.
|
overridevirtual |
Populates the content of the specified document (MUST have a uri).
See IConnection for details.
Implements mlclient::IConnection.
|
overridevirtual |
Populates the permissions of the specified document (MUST have a uri).
See IConnection for details.
Implements mlclient::IConnection.
|
overridevirtual |
Populates the properties of the specified document (MUST have a uri).
See IConnection for details.
Implements mlclient::IConnection.
|
overridevirtual |
Lists the immediate child collections of the specified parent Collections. See IConnection for details.
Implements mlclient::IConnection.
|
overridevirtual |
Lists the top level collections. I.e. ones starting without a / or ones starting with a / but not containing a / character See IConnection for details.
Implements mlclient::IConnection.
Saves the specified document to MarkLogic Server.
See IConnection for details.
Implements mlclient::IConnection.
|
overridevirtual |
Saves a document to MarkLogic (either as new or an update), at the given document URI (MarkLogic unique document ID)
See IConnection for details.
Implements mlclient::IConnection.
|
overridevirtual |
Saves a set of documents as a single batch to MarkLogic Server.
See IConnection for details.
Implements mlclient::IConnection.
|
overridevirtual |
Saves search options to the server.
See IConnection for details.
Implements mlclient::IConnection.
|
overridevirtual |
Performs a search against the MarkLogic database given the provided search query, text and options.
See IConnection for details.
Implements mlclient::IConnection.
|
overridevirtual |
Performs a search against a REST extension that is compatible with POST /v1/search (i.e. Connection::search)
See IConnection for details.
Implements mlclient::IConnection.
|
overridevirtual |
Sets the name of the database to query/update. Defaults to Documents.
See IConnection for details.
Implements mlclient::IConnection.
|
overridevirtual |
Performs a values lookup in MarkLogic Server, returning the top values from the lexicon as per the search options configuration used.
See IConnection for details.
Implements mlclient::IConnection.
|
overridevirtual |
Performs a values against a REST extension that is compatible with POST /v1/search (i.e. Connection::search)
See IConnection for details.
Implements mlclient::IConnection.