rpm  5.4.15
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
mongo.h File Reference
#include <bson.h>
Include dependency graph for mongo.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  mongo_header
 
struct  mongo_message
 
struct  mongo_reply_fields
 
struct  mongo_reply
 
struct  mongo_host_port
 
struct  mongo_write_concern
 
struct  mongo_replica_set
 
struct  mongo
 
struct  mongo_cursor
 

Macros

#define MONGO_MAJOR   0
 
#define MONGO_MINOR   7
 
#define MONGO_PATCH   0
 
#define MONGO_OK   0
 
#define MONGO_ERROR   -1
 
#define MONGO_DEFAULT_PORT   27017
 
#define MONGO_DEFAULT_MAX_BSON_SIZE   4 * 1024 * 1024
 
#define MONGO_ERR_LEN   128
 
#define MAXHOSTNAMELEN   256
 
#define rpmmgoUnlink(_mgo)   ((rpmmgo)rpmioUnlinkPoolItem((rpmioItem)(_mgo), __FUNCTION__, __FILE__, __LINE__))
 
#define rpmmgoLink(_mgo)   ((rpmmgo)rpmioLinkPoolItem((rpmioItem)(_mgo), __FUNCTION__, __FILE__, __LINE__))
 
#define rpmmgoFree(_mgo)   ((rpmmgo)rpmioFreePoolItem((rpmioItem)(_mgo), __FUNCTION__, __FILE__, __LINE__))
 

Typedefs

typedef struct rpmmgo_s * rpmmgo
 
typedef size_t SOCKET
 
typedef enum mongo_error_t mongo_error_t
 
typedef enum mongo_cursor_error_t mongo_cursor_error_t
 
typedef struct mongo_host_port mongo_host_port
 
typedef struct mongo_write_concern mongo_write_concern
 
typedef struct mongo mongo
 

Enumerations

enum  mongo_error_t {
  MONGO_CONN_SUCCESS = 0, MONGO_CONN_NO_SOCKET, MONGO_CONN_FAIL, MONGO_CONN_ADDR_FAIL,
  MONGO_CONN_NOT_MASTER, MONGO_CONN_BAD_SET_NAME, MONGO_CONN_NO_PRIMARY, MONGO_IO_ERROR,
  MONGO_SOCKET_ERROR, MONGO_READ_SIZE_ERROR, MONGO_COMMAND_FAILED, MONGO_WRITE_ERROR,
  MONGO_NS_INVALID, MONGO_BSON_INVALID, MONGO_BSON_NOT_FINISHED, MONGO_BSON_TOO_LARGE,
  MONGO_WRITE_CONCERN_INVALID
}
 
enum  mongo_cursor_error_t {
  MONGO_CURSOR_EXHAUSTED, MONGO_CURSOR_INVALID, MONGO_CURSOR_PENDING, MONGO_CURSOR_QUERY_FAIL,
  MONGO_CURSOR_BSON_ERROR
}
 
enum  mongo_cursor_flags { MONGO_CURSOR_MUST_FREE = 1, MONGO_CURSOR_QUERY_SENT = ( 1<<1 ) }
 
enum  mongo_index_opts { MONGO_INDEX_UNIQUE = ( 1<<0 ), MONGO_INDEX_DROP_DUPS = ( 1<<2 ), MONGO_INDEX_BACKGROUND = ( 1<<3 ), MONGO_INDEX_SPARSE = ( 1<<4 ) }
 
enum  mongo_update_opts { MONGO_UPDATE_UPSERT = 0x1, MONGO_UPDATE_MULTI = 0x2, MONGO_UPDATE_BASIC = 0x4 }
 
enum  mongo_insert_opts { MONGO_CONTINUE_ON_ERROR = 0x1 }
 
enum  mongo_cursor_opts {
  MONGO_TAILABLE = ( 1<<1 ), MONGO_SLAVE_OK = ( 1<<2 ), MONGO_NO_CURSOR_TIMEOUT = ( 1<<4 ), MONGO_AWAIT_DATA = ( 1<<5 ),
  MONGO_EXHAUST = ( 1<<6 ), MONGO_PARTIAL = ( 1<<7 )
}
 
enum  mongo_operations {
  MONGO_OP_MSG = 1000, MONGO_OP_UPDATE = 2001, MONGO_OP_INSERT = 2002, MONGO_OP_QUERY = 2004,
  MONGO_OP_GET_MORE = 2005, MONGO_OP_DELETE = 2006, MONGO_OP_KILL_CURSORS = 2007
}
 

Functions

 __declspec (dllimport) void mongo_init_sockets(void)
 Initialize sockets for Windows. More...
 
void mongo_parse_host (const char *host_string, mongo_host_port *host_port)
 Utility function for converting a host-port string to a mongo_host_port. More...
 
rpmmgo rpmmgoUnlink (rpmmgo mgo)
 Unreference a mongo wrapper instance. More...
 
rpmmgo rpmmgoLink (rpmmgo mgo)
 Reference a mongo wrapper instance. More...
 
rpmmgo rpmmgoFree (rpmmgo mgo)
 Destroy a mongo wrapper. More...
 
rpmmgo rpmmgoNew (const char *fn, int flags)
 Create and load a mongo wrapper. More...
 

Variables

int _rpmmgo_debug
 
rpmmgo _rpmmgoI
 
const char * host
 
const char int port
 
const char * name
 
const char * ns
 
int millis
 
mongo_write_concernwrite_concern
 
int w
 
int wtimeout
 
int j
 
int fsync
 
const char * mode
 
const char const bsondata
 
const char const bson
mongo_write_concern
custom_write_concern
 
const char const bson int num
 
const char const bson int
mongo_write_concern int 
flags
 
const char const bsoncond
 
const char const bson const bsonop
 
const char const bsonquery
 
const char const bson const bsonfields
 
const char const bson const
bson int 
limit
 
const char const bson const
bson int int 
skip
 
const char const bson const
bson int int int 
options
 
mongoconn
 
const char const bson const
bson bson
out
 
const char * db
 
const char const char * coll
 
const char const bsonkey
 
const char const char * field
 
const char const char * collection
 
const char const char int size
 
const char const char int int max
 
const char const bsoncommand
 
const char const char * cmd
 
const char const char int arg
 
const char const char * user
 
const char const char const char * pass
 
int i
 
mongo_error_t err
 
mongo_error_t const char * errstr
 
mongo_error_t const char int errorcode
 

Macro Definition Documentation

#define MAXHOSTNAMELEN   256

Definition at line 63 of file mongo.h.

Referenced by main(), mongo_client(), mongo_replica_set_add_node(), and mongo_replica_set_client().

#define MONGO_DEFAULT_MAX_BSON_SIZE   4 * 1024 * 1024

Definition at line 58 of file mongo.h.

Referenced by mongo_check_is_master(), mongo_init(), and mongo_replica_set_check_host().

#define MONGO_DEFAULT_PORT   27017

Definition at line 56 of file mongo.h.

Referenced by mongo_parse_host().

#define MONGO_ERR_LEN   128

Definition at line 60 of file mongo.h.

Referenced by __mongo_set_error(), and mongo_set_last_error().

#define MONGO_ERROR   -1
#define MONGO_MAJOR   0

Definition at line 49 of file mongo.h.

#define MONGO_MINOR   7

Definition at line 50 of file mongo.h.

#define MONGO_OK   0
#define MONGO_PATCH   0

Definition at line 51 of file mongo.h.

#define rpmmgoFree (   _mgo)    ((rpmmgo)rpmioFreePoolItem((rpmioItem)(_mgo), __FUNCTION__, __FILE__, __LINE__))

Definition at line 986 of file mongo.h.

#define rpmmgoLink (   _mgo)    ((rpmmgo)rpmioLinkPoolItem((rpmioItem)(_mgo), __FUNCTION__, __FILE__, __LINE__))

Definition at line 974 of file mongo.h.

#define rpmmgoUnlink (   _mgo)    ((rpmmgo)rpmioUnlinkPoolItem((rpmioItem)(_mgo), __FUNCTION__, __FILE__, __LINE__))

Definition at line 963 of file mongo.h.

Typedef Documentation

typedef struct mongo mongo
typedef struct rpmmgo_s* rpmmgo

Definition at line 27 of file mongo.h.

typedef size_t SOCKET

Definition at line 45 of file mongo.h.

Enumeration Type Documentation

Enumerator
MONGO_CURSOR_EXHAUSTED 

The cursor has no more results.

MONGO_CURSOR_INVALID 

The cursor has timed out or is not recognized.

MONGO_CURSOR_PENDING 

Tailable cursor still alive but no data.

MONGO_CURSOR_QUERY_FAIL 

The server returned an '$err' object, indicating query failure.

See conn->lasterrcode and conn->lasterrstr for details.

MONGO_CURSOR_BSON_ERROR 

Something is wrong with the BSON provided.

See conn->err for details.

Definition at line 87 of file mongo.h.

Enumerator
MONGO_CURSOR_MUST_FREE 

mongo_cursor_destroy should free cursor.

MONGO_CURSOR_QUERY_SENT 

Initial query has been sent.

Definition at line 97 of file mongo.h.

Enumerator
MONGO_TAILABLE 

Create a tailable cursor.

MONGO_SLAVE_OK 

Allow queries on a non-primary node.

MONGO_NO_CURSOR_TIMEOUT 

Disable cursor timeouts.

MONGO_AWAIT_DATA 

Momentarily block for more data.

MONGO_EXHAUST 

Stream in multiple 'more' packages.

MONGO_PARTIAL 

Allow reads even if a shard is down.

Definition at line 119 of file mongo.h.

Enumerator
MONGO_CONN_SUCCESS 

Connection success!

MONGO_CONN_NO_SOCKET 

Could not create a socket.

MONGO_CONN_FAIL 

An error occured while calling connect().

MONGO_CONN_ADDR_FAIL 

An error occured while calling getaddrinfo().

MONGO_CONN_NOT_MASTER 

Warning: connected to a non-master node (read-only).

MONGO_CONN_BAD_SET_NAME 

Given rs name doesn't match this replica set.

MONGO_CONN_NO_PRIMARY 

Can't find primary in replica set.

Connection closed.

MONGO_IO_ERROR 

An error occurred while reading or writing on the socket.

MONGO_SOCKET_ERROR 

Other socket error.

MONGO_READ_SIZE_ERROR 

The response is not the expected length.

MONGO_COMMAND_FAILED 

The command returned with 'ok' value of 0.

MONGO_WRITE_ERROR 

Write with given write_concern returned an error.

MONGO_NS_INVALID 

The name for the ns (database or collection) is invalid.

MONGO_BSON_INVALID 

BSON not valid for the specified op.

MONGO_BSON_NOT_FINISHED 

BSON object has not been finished.

MONGO_BSON_TOO_LARGE 

BSON object exceeds max BSON size.

MONGO_WRITE_CONCERN_INVALID 

Supplied write concern object is invalid.

Definition at line 66 of file mongo.h.

Enumerator
MONGO_INDEX_UNIQUE 
MONGO_INDEX_DROP_DUPS 
MONGO_INDEX_BACKGROUND 
MONGO_INDEX_SPARSE 

Definition at line 102 of file mongo.h.

Enumerator
MONGO_CONTINUE_ON_ERROR 

Definition at line 115 of file mongo.h.

Enumerator
MONGO_OP_MSG 
MONGO_OP_UPDATE 
MONGO_OP_INSERT 
MONGO_OP_QUERY 
MONGO_OP_GET_MORE 
MONGO_OP_DELETE 
MONGO_OP_KILL_CURSORS 

Definition at line 128 of file mongo.h.

Enumerator
MONGO_UPDATE_UPSERT 
MONGO_UPDATE_MULTI 
MONGO_UPDATE_BASIC 

Definition at line 109 of file mongo.h.

Function Documentation

__declspec ( dllimport  )

Initialize sockets for Windows.

Clear all errors stored on a mongo connection object.

Set an error on a mongo connection object.

Reset the error state for the connection.

Get the most recent error with the current connection.

Get the error for the last command with the current connection.

Check if the current server is a master.

Authenticate a user.

Add a database user.

Drop a collection.

Drop a database.

Run a command that accepts a simple string key and value.

Run a command that accepts a simple string key and integer value.

Run a command on a MongoDB server.

Create a capped collection.

Create an index with a single key.

Create a compound index.

Count the number of documents in a collection matching a query.

Find a single document in a MongoDB server.

Destroy a cursor object.

Iterate the cursor, returning the next item.

Return the current BSON object data as a const char*.

Set any of the available query options (e.g., MONGO_TAILABLE).

Set the number of documents to return.

Set the number of documents to skip.

Set the fields to return for this cursor.

Set the bson object specifying this cursor's query spec.

Initalize a new cursor object.

Find documents in a MongoDB server.

Free the write_concern object (specifically, the BSON that it owns).

Finish this write concern object by serializing the literal getlasterror command that will be sent to the server.

Initialize a mongo_write_concern object.

Remove a document from a MongoDB server.

Update a document in a MongoDB server.

Insert a batch of BSON documents into a MongoDB server.

Insert a BSON document into a MongoDB server.

The following functions set the attributes of the write_concern object.

The following functions get the attributes of the write_concern object.

Specify the write concern object that this connection should use by default for all writes (inserts, updates, and deletes).

Close any existing connection to the server and free all allocated memory associated with the conn object.

Close the current connection to the server.

Try reconnecting to the server using the existing connection settings.

Ensure that this connection is healthy by performing a round-trip to the server.

Set a timeout for operations on this connection.

DEPRECATED - use mongo_replica_set_client.

Connect to a replica set.

Utility function for validation database and collection names.

DEPRECATED - use mongo_replica_set_add_seed.

Add a seed node to the replica set connection object.

DEPRECATED - use mongo_replica_set_init.

Set up this connection object for connecting to a replica set.

DEPRECATED - use mongo_client.

Connect to a single MongoDB server.

Initialize a new mongo connection object.

You must initialize each mongo object using this function.

Note
When finished, you must pass this object to mongo_destroy( ).
Parameters
conna mongo connection object allocated on the stack or heap.
conna mongo object.
hosta numerical network address or a network hostname.
portthe port to connect to.
Returns
MONGO_OK or MONGO_ERROR on failure. On failure, a constant of type mongo_error_t will be set on the conn->err field.

Connect to a single MongoDB server.

Parameters
conna mongo object.
hosta numerical network address or a network hostname.
portthe port to connect to.
Returns
MONGO_OK or MONGO_ERROR on failure. On failure, a constant of type mongo_error_t will be set on the conn->err field.

To connect, pass the object to mongo_replica_set_client().

Parameters
conna mongo object.
namethe name of the replica set to connect to.

Set up this connection object for connecting to a replica set. To connect, pass the object to mongo_replset_connect().

Parameters
conna mongo object.
namethe name of the replica set to connect to.

You must specify at least one seed node before connecting to a replica set.

Parameters
conna mongo object.
hosta numerical network address or a network hostname.
portthe port to connect to.

Add a seed node to the replica set connection object.

You must specify at least one seed node before connecting to a replica set.

Parameters
conna mongo object.
hosta numerical network address or a network hostname.
portthe port to connect to.
conna mongo object.
Returns
MONGO_OK or MONGO_ERROR on failure. On failure, a constant of type mongo_conn_return_t will be set on the conn->err field.

Before passing a connection object to this function, you must already have called mongo_set_replica_set and mongo_replica_set_add_seed.

Parameters
conna mongo object.
Returns
MONGO_OK or MONGO_ERROR on failure. On failure, a constant of type mongo_conn_return_t will be set on the conn->err field.

Connect to a replica set.

Before passing a connection object to this function, you must already have called mongo_set_replset and mongo_replset_add_seed.

Parameters
conna mongo object.
Returns
MONGO_OK or MONGO_ERROR on failure. On failure, a constant of type mongo_conn_return_t will be set on the conn->err field.

This is a platform-specific feature, and only work on *nix system. You must also compile for linux to support this.

Parameters
conna mongo object.
millistimeout time in milliseconds.
Returns
MONGO_OK. On error, return MONGO_ERROR and set the conn->err field.
Parameters
conna mongo connection
Returns
MONGO_OK if connected; otherwise, MONGO_ERROR.

This function will disconnect the current socket. If you've authenticated, you'll need to re-authenticate after calling this function.

Parameters
conna mongo object.
Returns
MONGO_OK or MONGO_ERROR and set the conn->err field.

After calling this function, you may call mongo_reconnect with the same connection object.

Parameters
conna mongo object.

You must always call this function when finished with the connection object.

Parameters
conna mongo object.

This value can be overridden by passing a write_concern object to any write function.

Parameters
conna mongo object.
write_concernpointer to a write concern object.

This function will fail if the supplied BSON struct is not UTF-8 or if the keys are invalid for insert (contain '.' or start with '$').

The default write concern set on the conn object will be used.

Parameters
conna mongo object.
nsthe namespace.
datathe bson data.
custom_write_concerna write concern object that will override any write concern set on the conn object.
Returns
MONGO_OK or MONGO_ERROR. If the conn->err field is MONGO_BSON_INVALID, check the err field on the bson struct for the reason.

This function will fail if any of the documents to be inserted is invalid.

The default write concern set on the conn object will be used.

Parameters
conna mongo object.
nsthe namespace.
datathe bson data.
numthe number of documents in data.
custom_write_concerna write concern object that will override any write concern set on the conn object.
flagsflags on this batch insert. Currently, this value may be 0 or MONGO_CONTINUE_ON_ERROR, which will cause the batch insert to continue even if a given insert in the batch fails.
Returns
MONGO_OK or MONGO_ERROR.

The default write concern set on the conn object will be used.

Parameters
conna mongo object.
nsthe namespace.
condthe bson update query.
opthe bson update data.
flagsflags for the update.
custom_write_concerna write concern object that will override any write concern set on the conn object.
Returns
MONGO_OK or MONGO_ERROR with error stored in conn object.

The default write concern set on the conn object will be used.

Parameters
conna mongo object.
nsthe namespace.
condthe bson query.
custom_write_concerna write concern object that will override any write concern set on the conn object.
Returns
MONGO_OK or MONGO_ERROR with error stored in conn object.

Effectively zeroes out the struct.

You must call mongo_write_concern_destroy() to free the serialized BSON.

Parameters
conna mongo object.
nsthe namespace.
querythe bson query.
fieldsa bson document of fields to be returned.
limitthe maximum number of documents to return.
skipthe number of documents to skip.
optionsA bitfield containing cursor options.
Returns
A cursor object allocated on the heap or NULL if an error has occurred. For finer-grained error checking, use the cursor builder API instead.
Parameters
cursor
nsthe namespace, represented as the the database name and collection name separated by a dot. e.g., "test.users"

If your query is the empty bson object "{}", then you need not set this value.

Parameters
cursor
querya bson object representing the query spec. This may be either a simple query spec or a complex spec storing values for $query, $orderby, $hint, and/or $explain. See http://www.mongodb.org/display/DOCS/Mongo+Wire+Protocol for details.

If you want to return all fields, you need not set this value.

Parameters
cursor
fieldsa bson object representing the fields to return. See http://www.mongodb.org/display/DOCS/Retrieving+a+Subset+of+Fields.
cursor
skip
cursor
limit
cursor
optionsa bitfield storing query options. See mongo_cursor_bitfield_t for available constants.

This is useful for creating bson iterators with bson_iterator_init.

Parameters
cursorWhen successful, the returned object will be stored in cursor->current;
cursor
Returns
MONGO_OK. On error, returns MONGO_ERROR and sets cursor->err with a value of mongo_error_t.

When finished with a cursor, you must pass it to this function.

Parameters
cursorthe cursor to destroy.
Returns
MONGO_OK or an error code. On error, check cursor->conn->err for errors.
Parameters
conna mongo object.
nsthe namespace.
querythe bson query.
fieldsa bson document of the fields to be returned.
outa bson document in which to put the query result.
conna mongo object.
dbthe db name.
collthe collection name.
querythe BSON query.
Returns
the number of matching documents. If the command fails, MONGO_ERROR is returned.
Parameters
conna mongo object.
nsthe namespace.
keythe bson index key.
namethe optional name, use NULL to generate a default name.
optionsa bitfield for setting index options. Possibilities include MONGO_INDEX_UNIQUE, MONGO_INDEX_DROP_DUPS, MONGO_INDEX_BACKGROUND, and MONGO_INDEX_SPARSE.
outa bson document containing errors, if any.
Returns
MONGO_OK if index is created successfully; otherwise, MONGO_ERROR.
Note
May not return bson data when returning MONGO_ERROR, Use bson_has_data() on the returned 'out' for determining this.
Parameters
conna mongo object.
nsthe namespace.
fieldthe index key.
optionsindex options.
outa BSON document containing errors, if any.
Returns
true if the index was created.
Note
May not return bson data when returning MONGO_ERROR, Use bson_has_data() on the returned 'out' for determining this.
Parameters
conna mongo object.
nsthe namespace (e.g., "dbname.collectioname")
sizethe size of the capped collection in bytes.
maxthe max number of documents this collection is allowed to contain. If zero, this argument will be ignored and the server will use the collection's size to age document out. If using this option, ensure that the total size can contain this number of documents.
conna mongo object.
dbthe name of the database.
commandthe BSON command to run.
outthe BSON result of the command.
Returns
MONGO_OK if the command ran without error.
Parameters
conna mongo object.
dbthe name of the database.
cmdthe command to run.
argthe integer argument to the command.
outthe BSON result of the command.
Returns
MONGO_OK or an error code.
Parameters
conna mongo object.
dbthe name of the database.
cmdthe command to run.
argthe string argument to the command.
outthe BSON result of the command.
Returns
true if the command ran without error.
Parameters
conna mongo object.
dbthe name of the database to drop.
Returns
MONGO_OK or an error code.
Parameters
conna mongo object.
dbthe name of the database.
collectionthe name of the collection to drop.
outa BSON document containing the result of the command.
Returns
true if the collection drop was successful.
Parameters
conna mongo object.
dbthe database in which to add the user.
userthe user name
passthe user password
Returns
MONGO_OK or MONGO_ERROR.
Parameters
conna mongo object.
dbthe database to authenticate against.
userthe user name to authenticate.
passthe user's password.
Returns
MONGO_OK on sucess and MONGO_ERROR on failure.
Parameters
conna mongo object.
outa BSON result of the command.
Returns
true if the server is a master.
Parameters
conna mongo object.
dbthe name of the database.
outa BSON object containing the error details.
Returns
MONGO_OK if no error and MONGO_ERROR on error. On error, check the values of conn->lasterrcode and conn->lasterrstr for the error status.
Note
May not return bson data when returning MONGO_ERROR, Use bson_has_data() on the returned 'out' for determining this.
Parameters
conna mongo object.
dbthe name of the database.

Mostly for internal use.

Parameters
conna mongo connection object.
erra driver error code of mongo_error_t.
errstra string version of the error.
errorcodeCurrently errno or WSAGetLastError().
conna mongo connection object.
void mongo_parse_host ( const char *  host_string,
mongo_host_port host_port 
)

Utility function for converting a host-port string to a mongo_host_port.

Parameters
host_stringa string containing either a host or a host and port separated by a colon.
host_portthe mongo_host_port object to write the result to.

Definition at line 2253 of file mongo.c.

References mongo_host_port::host, len, MONGO_DEFAULT_PORT, and mongo_host_port::port.

Referenced by mongo_replica_set_check_seed().

rpmmgo rpmmgoFree ( rpmmgo  mgo)

Destroy a mongo wrapper.

Parameters
mgomongo wrapper
Returns
NULL on last dereference

Referenced by rpmioClean().

rpmmgo rpmmgoLink ( rpmmgo  mgo)

Reference a mongo wrapper instance.

Parameters
mgomongo wrapper
Returns
new mongo wrapper reference

Referenced by rpmmgoNew().

rpmmgo rpmmgoNew ( const char *  fn,
int  flags 
)

Create and load a mongo wrapper.

Parameters
fnmongo file
flagsmongo flags
Returns
new mongo wrapper

Definition at line 3576 of file mongo.c.

References rpmmgoGetPool(), rpmmgoLink(), and xstrdup().

rpmmgo rpmmgoUnlink ( rpmmgo  mgo)

Unreference a mongo wrapper instance.

Parameters
mgomongo wrapper
Returns
NULL on last dereference

Variable Documentation

int _rpmmgo_debug

Definition at line 42 of file mongo.c.

Referenced by rpmmgoGetPool().

rpmmgo _rpmmgoI

Definition at line 45 of file mongo.c.

Referenced by rpmioClean().

const char const char const char * arg
const char const char * cmd
const char const char* coll

Definition at line 697 of file mongo.h.

const char const char * collection

Definition at line 749 of file mongo.h.

const char const bson* command
const char const bson * cond

Definition at line 505 of file mongo.h.

mongo* conn

Definition at line 579 of file mongo.h.

Referenced by mongo_cursor_destroy(), and mongo_cursor_init().

const char const bson mongo_write_concern * custom_write_concern

Definition at line 463 of file mongo.h.

Referenced by mongo_choose_write_concern().

const char const bson ** data
const char * db
mongo_error_t const char int errorcode

Definition at line 922 of file mongo.h.

mongo_error_t const char* errstr
const char const char* field

Definition at line 734 of file mongo.h.

Referenced by cpioHeaderWrite(), handlePreambleTag(), and parseNoSource().

const char const bson const bson * fields

Definition at line 569 of file mongo.h.

Referenced by mongo_cursor_set_fields(), and mongo_read_response().

const char const bson const bson int flags
int fsync

Definition at line 439 of file mongo.h.

Referenced by extractRegular(), mongo_write_concern_set_fsync(), and writeFile().

const char * host

Definition at line 251 of file mongo.h.

Referenced by ftpLogin(), httpReq(), main(), and urlFind().

int i

Definition at line 906 of file mongo.h.

int j
const char const bson* key
int limit
const char const char int int max

Definition at line 749 of file mongo.h.

Referenced by fts_maxarglen(), and parse_options().

int millis

Definition at line 365 of file mongo.h.

const char* mode
const char const bson const char* name

Definition at line 273 of file mongo.h.

const char * ns
const char const bson int num
const char const bson const bson* op
const char const char int options
const char bson * out
const char const char const char * pass

Definition at line 828 of file mongo.h.

const char int port

Definition at line 251 of file mongo.h.

Referenced by ftpLogin(), ftpReq(), httpReq(), mongo_client(), mongo_replica_set_add_node(), and urlFind().

const char const char const bson * query
const char const char int size

Definition at line 749 of file mongo.h.

int skip

Definition at line 569 of file mongo.h.

Referenced by compare(), and mongo_cursor_set_skip().

const char const char * user

Definition at line 828 of file mongo.h.

Referenced by ftpLogin(), rpmgitCmdInit(), rpmhkpValidate(), rpmvfVerify(), and urlFind().

int w

Definition at line 436 of file mongo.h.

Referenced by decode_base62_golomb(), downsample_set(), and mongo_write_concern_set_w().

mongo_write_concern* write_concern
int wtimeout

Definition at line 437 of file mongo.h.

Referenced by mongo_write_concern_set_wtimeout().