Class AbstractRunCommandStatement

    • Constructor Detail

      • AbstractRunCommandStatement

        public AbstractRunCommandStatement()
    • Method Detail

      • run

        public org.bson.Document run​(com.mongodb.client.MongoDatabase mongoDatabase)
      • checkResponse

        protected void checkResponse​(org.bson.Document responseDocument)
                              throws com.mongodb.MongoException
        Inspects response Document for any issues. For example the server responds with { "ok" : 1 } (success) even when run command fails to insert the document. The contents of the response is checked to see if the document was actually inserted For more information see the manual page
        Parameters:
        responseDocument - the response document
        Throws:
        com.mongodb.MongoException - a MongoException to be thrown
        See Also:
        Insert Output

        Check the response and throw an appropriate exception if the command was not successful

      • getRunCommandName

        public abstract String getRunCommandName()
        Returns the RunCommand command name.
        Returns:
        the run command as this is not used and not required for a generic RunCommandStatement
        See Also:
        Database Commands