GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Mango::Protocol(3) User Contributed Perl Documentation Mango::Protocol(3)

Mango::Protocol - The MongoDB wire protocol

  use Mango::Protocol;

  my $protocol = Mango::Protocol->new;
  my $bytes    = $protocol->query(1, 'foo', {}, 0, 10, {}, {});

Mango::Protocol is a minimalistic implementation of the MongoDB wire protocol.

Mango::Protocol inherits all methods from Mojo::Base and implements the following new ones.

  my $bytes = $protocol->build_get_more($id, $name, $return, $cursor);

Build message for "GET_MORE" operation.

  my $bytes = $protocol->build_kill_cursors($id, @ids);

Build message for "KILL_CURSORS" operation.

  my $bytes = $protocol->build_query($id, $name, $flags, $skip, $return,
    $query, $fields);

Build message for "QUERY" operation.

  my $err = $protocol->command_error($doc);

Check document for command error.

  my $id = $protocol->next_id(23);

Generate next id.

  my $reply = $protocol->parse_reply(\$str);

Extract and parse "reply" message.

  my $err = $protocol->query_failure($reply);

Check reply for query failure.

  my $err = $protocol->write_error($doc);

Check document for write error.

Mango, Mojolicious::Guides, <http://mojolicio.us>.
2018-03-17 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.