Loading...
Searching...
No Matches
Tutorial

These pages will attempt to guide one through the libmongo-client library, starting from the basic BSON building blocks, through the low level wire protocol API, until the highest level synchronous API.

The documentation assumes a reasonable amount of C knowledge, and basic familiarity with MongoDB concepts.

The example programs can be found in the `docs/tut/examples` directory in the source tree, along with a Makefile. Would one want to compile the examples, or modified versions of them by hand, then the following command should work:

    $ cc $(pkg-config --cflags libmongo-client) tut_bson_build.c $(pkg-config --libs libmongo-client) -o tut_bson_build

Contents:

- Working with BSON objects
  - Building BSON objects
  - Traversing BSON objects
- Working with the Mongo Sync API
  - Connecting to MongoDB
  - Inserting documents into MongoDB
  - Querying documents
  - Querying documents, part two
  - Creating collections
  - Creating indexes
  - Running custom commands
- A full-blown application
- JSON to BSON converter