# MongoDB C Driver
This is a very basic MongoDB C driver. The goal is to be super strict for ultimate portability,
no dependencies, and generic embeddability.
Until the 1.0 release, this driver should be considered alpha. Keep in mind that the API will be in flux until then.
Please post tickets and improvements to [JIRA](http://jira.mongodb.org/browse/CDRIVER).
You'll need [JSON-C](http://oss.metaparadigm.com/json-c/) to compile all the unit tests, but it's not required for the main libraries.
# Building
First checkout the version you want to build. For example, to build version 0.3, run:
git checkout v0.3
Then follow the build steps below.
## Building with scons:
scons # this will produce libbson.a and libmongoc.a
scons --c99 # this will use c99 mode in gcc (recommended)
## Building with gcc:
gcc --std=c99 -Isrc src/*.c YOUR_APP.c # No -Ddefines are needed in c99 mode on little endien
## Running the tests
Make sure that you're running mongod on localhost on the default port (27017). The replica set
test assumes a replica set with at least three nodes running on localhost and starting at port
(30000).
To compile and run the tests:
scons test
You may optionally specify a remote server:
scons test --test-server=123.4.5.67
You may also specify an alternate starting port for the replica set members:
scons test --test-server=123.4.5.67 --seed-start-port=40000
## Building with MSVC:
TODO
# Custom defines
(Note: you must use the same flags to compile all apps and libs):
MONGO_BIG_ENDIAN This must be defined if on a big endian architecture
one of these (defaults to unsigned char if neither is defined):
MONGO_HAVE_BOOL Define this if your compiler has a plain 'bool' type
MONGO_HAVE_STDBOOL Define this if you must include <stdbool.h> to get 'bool'
one of these (required if not using c99):
MONGO_HAVE_STDINT Define this if you have <stdint.h> for int64_t
MONGO_HAVE_UNISTD Define this if you have <unistd.h> for int64_t
MONGO_USE__INT64 Define this if '__int64' is your compiler's 64bit type (MSVC)
MONGO_USE_LONG_LONG_INT Define this if 'long long int' is your compiler's 64bit type
# Error Handling
The driver uses an exception system based on cexcept. If you would like to gracefully
handle errors, take a look at src/mongo_except.h. It is currently only used for
network failures, but more errors will be used in the future.
# TODO
building on windows
more documentation
checking for $err in query results
query helper for sort and hint
explain and profiler helpers
safe-mode modifications (maybe)
cached ensure_index (maybe)
# CREDITS
Gergely Nagy - Non-null-terminated string support.
Josh Rotenberg - Initial Doxygen setup and a significant chunk of documentation.
# LICENSE
Unless otherwise specified in a source file, sources in this
repository are published under the terms of the Apache License version
2.0, a copy of which is in this repository as APACHE-2.0.txt.
没有合适的资源?快使用搜索试试~ 我知道了~
Nginx-gridfs编译nginx新版可用版本
5星 · 超过95%的资源 需积分: 0 10 下载量 115 浏览量
2014-05-30
14:14:15
上传
评论
收藏 71KB GZ 举报
温馨提示
共42个文件
c:20个
h:8个
py:2个
mongogridfs项目的官方https://github.com/mdirolf/nginx-gridfs,编译后一直有问题,后来找到一篇文章解决了此问题,感谢上传者 sasoritattoo
资源推荐
资源详情
资源评论
收起资源包目录
nginx-gridfs.tar.gz (42个子文件)
nginx-gridfs
README.rst 5KB
.gitmodules 103B
config 304B
LICENSE 29KB
mongo-c-driver
docs
.gitignore 13B
doxygen.h 2KB
HISTORY.md 363B
test
cpptest.cpp 1KB
errors.c 2KB
gridfs.c 6KB
auth.c 628B
update.c 3KB
examples.c 2KB
endian_swap.c 697B
simple.c 3KB
sizes.c 460B
all_types.c 8KB
test.h 405B
resize.c 1KB
json.c 5KB
count_delete.c 2KB
replica_set.c 2KB
benchmark.c 11KB
SConstruct 4KB
buildscripts
__init__.py 0B
docs.py 891B
src
md5.h 3KB
bson.h 22KB
gridfs.h 10KB
gridfs.c 21KB
mongo.h 13KB
platform_hacks.h 3KB
numbers.c 8KB
bson.c 21KB
md5.c 12KB
mongo_except.h 5KB
mongo.c 30KB
APACHE-2.0.txt 11KB
doxygenConfig 11KB
README.md 3KB
.gitignore 31B
ngx_http_gridfs_module.c 33KB
共 42 条
- 1
资源评论
- 墨玉飞蝗石新2014-09-18编译成功,但是不知道具体原因,如果能给出之前找到的解决方法最好
- buxue0072015-04-17可以看看,自己研究下
阿哈ah
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功