{"id":15736115,"url":"https://github.com/xyz347/mongoxclient","last_synced_at":"2025-07-04T09:38:06.586Z","repository":{"id":104151179,"uuid":"155980081","full_name":"xyz347/mongoxclient","owner":"xyz347","description":"利用x2struct对mongo-cxx-driver的一个简单封装。可以像golang一样直接操作结构体。只有基本接口，还不是很完备。","archived":false,"fork":false,"pushed_at":"2023-06-18T01:08:20.000Z","size":757,"stargazers_count":4,"open_issues_count":0,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-01T07:42:26.391Z","etag":null,"topics":["cpp","golang","mongodb-driver","wrapper","x2struct"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xyz347.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-03T12:16:11.000Z","updated_at":"2024-03-19T03:08:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"864cb94a-c778-4845-a9cd-597c4b5e9ef4","html_url":"https://github.com/xyz347/mongoxclient","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/xyz347/mongoxclient","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyz347%2Fmongoxclient","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyz347%2Fmongoxclient/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyz347%2Fmongoxclient/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyz347%2Fmongoxclient/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xyz347","download_url":"https://codeload.github.com/xyz347/mongoxclient/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyz347%2Fmongoxclient/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263484397,"owners_count":23473753,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","golang","mongodb-driver","wrapper","x2struct"],"created_at":"2024-10-04T01:21:06.138Z","updated_at":"2025-07-04T09:38:06.561Z","avatar_url":"https://github.com/xyz347.png","language":"C++","readme":"# mongoxclient\n利用[xpack](https://github.com/xyz347/xpack)对mongo-cxx-driver的一个简单封装，可以像golang一样直接操作结构体。只有基本接口，还不是很完备。**需要C++11支持**\n\n-----\n## 范例\n范例请参考[main.cpp](test/main.cpp)，里面有各个接口的使用举例\n\n## xpack::BsonBuilder\n- 用于简化一些bson数据的构造，能用json来描述bson数据\n- 名字比较长，这里用using bb = xpack::BsonBuilder;举例\n- 简单用法是bb::En(string, args...)\n    - string是一个类似于json的字符串，里面用单引号代替双引号\n    - 里面用问号表示一个变量，问号后面可以加一个变量名称方便阅读，比如?uid\n    - args的数量应该和问号的数量一致，对应key的参数必须是std::string/const char[]类型\n    - 范例:`bb::En(\"{'_id':?}\", uid)`\n    - 对于比较复杂且会复用的builder，建议定义成static变量，后面调用Encode是线程安全的\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxyz347%2Fmongoxclient","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxyz347%2Fmongoxclient","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxyz347%2Fmongoxclient/lists"}