[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-6234":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":15,"stars90d":16,"forks30d":16,"starsTrendScore":18,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":23,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":34,"readmeContent":35,"aiSummary":36,"trendingCount":16,"starSnapshotCount":16,"syncStatus":37,"lastSyncTime":38,"discoverSource":39},6234,"wcdb","Tencent\u002Fwcdb","Tencent","WCDB is a cross-platform database framework developed by WeChat.","",null,"C",11498,1499,276,20,0,7,5,44.53,"Other",false,"master",true,[25,26,27,28,29,30,31,32,33],"android","database","ios","linux","macos","sqlcipher","sqlite","wechat","windows","2026-06-12 02:01:17","# WCDB\n\n[![PRs Welcome](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPRs-welcome-brightgreen.svg)](https:\u002F\u002Fgithub.com\u002FTencent\u002Fwcdb\u002Fpulls)\n[![Release Version](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FRelease-2.1.15-brightgreen.svg)](https:\u002F\u002Fgithub.com\u002FTencent\u002Fwcdb\u002Freleases)\n[![Language](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLanguage-%20C++%20%7C%20Java%20%7C%20Kotlin%20%7C%20Swift%20%7C%20Objc-brightgreen.svg)](https:\u002F\u002Fgithub.com\u002FTencent\u002Fwcdb\u002Fwiki)[![Platform](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPlatform-%20iOS%20%7C%20macOS%20%7C%20Android%20%7C%20Windows%20%7C%20Linux%20%7C%20OpenHarmony-brightgreen.svg)](https:\u002F\u002Fgithub.com\u002FTencent\u002Fwcdb\u002Fwiki)\n\n中文版本请参看[这里][wcdb-wiki]\n\nWCDB is an **efficient**, **complete**, **easy-to-use** mobile database framework used in the WeChat application. It's based on SQLite and SQLCipher, and supports five languages: C++, Java, Kotlin, Swift and Objective-C.\n\n# Feature\n\n## **Easy-to-use**\n\n* **ORM** (Object Relational Mapping): WCDB provides a flexible, easy-to-use ORM for creating tables, indices and constraints, as well as CRUD through C++\u002FJava\u002FKotlin\u002FSwift\u002FObjc objects.\n* **WINQ** (WCDB language integrated query): WINQ is a native data querying capability which frees developers from writing glue code to concatenate SQL query strings.\n\nWith ORM and WINQ, you can insert, update, query and delete objects from database in one line code: \n\n```c++\n\u002F\u002F C++\ndatabase.insertObjects\u003CSample>(Sample(1, \"text\"), myTable);\ndatabase.updateRow(\"text2\", WCDB_FIELD(Sample::content), myTable, WCDB_FIELD(Sample::id) == 1);\nauto objects = database.getAllObjects\u003CSample>(myTable, WCDB_FIELD(Sample::id) > 0);\ndatabase.deleteObjects(myTable, WCDB_FIELD(Sample::id) == 1);\n```\n\n```java\n\u002F\u002F Java\ndatabase.insertObject(new Sample(1, \"text\"), DBSample.allFields(), myTable);\ndatabase.updateValue(\"text2\", DBSample.content, myTable, DBSample.id.eq(1));\nList\u003CSample> objects = database.getAllObjects(DBSample.allFields(), myTable, DBSample.id.gt(0));\ndatabase.deleteObjects(myTable, DBSample.id.eq(1));\n```\n\n```kotlin\n\u002F\u002F Kotlin\ndatabase.insertObject\u003CSample>(Sample(1, \"text\"), DBSample.allFields(), myTable)\ndatabase.updateValue(\"text2\", DBSample.content, myTable, DBSample.id.eq(1))\nval objects = database.getAllObjects\u003CSample>(DBSample.allFields(), myTable, DBSample.id.gt(0))\ndatabase.deleteObjects(myTable, DBSample.id.eq(1))\n```\n\n```swift\n\u002F\u002F Swift\ntry database.insert(Sample(id:1, content:\"text\"), intoTable: myTable)\ntry database.update(table: myTable,\n                    on: Sample.Properties.content,\n                    with: \"text2\"\n                    where:Sample.Properties.id == 1)\nlet objects: [Sample] = try database.getObjects(fromTable: myTable,\n                                                where: Sample.Properties.id > 0)\ntry database.delete(fromTable: myTable where: Sample.Properties.id == 1)\n```\n\n```objective-c\n\u002F\u002F Objc\n[database insertObject:sample intoTable:myTable];\n[database updateTable:myTable\n          setProperty:Sample.content\n              toValue:@\"text2\"\n                where:Sample.id == 1];\nNSArray* objects = [database getObjectsOfClass:Sample.class\n                                     fromTable:myTable\n                                         where:Sample.id > 0];\n[database deleteFromTable:myTable where:Sample.id == 1];\n```\n\n## **Efficient**\n\nThrough the framework layer and sqlcipher source optimization, WCDB have more efficient performance.\n\n* **Multi-threaded concurrency**: WCDB supports concurrent read-read and read-write access via connection pooling.\n* **Deeply optimized**: WCDB has deeply optimized the source code and configuration of SQLite to adapt to the development scenarios of mobile terminals. At the same time, WCDB has also been optimized for common time-consuming scenarios, such as writing data in batches.\n\n## **Complete**\n\nWCDB summarizes common problems in practice to provide a more complete development experience for database development:\n\n* **Encryption Support**: WCDB supports database encryption via [SQLCipher][sqlcipher].\n* **Corruption recovery**: WCDB provides a built-in repair kit for database corruption recovery.\n* **Anti-injection**: WCDB provides a built-in protection from SQL injection.\n* **Database model upgrade**: The database model is bound to the class definition, so that the addition, deletion and modification of database fields are consistent with the definition of class variables.\n* **Full-text search**: WCDB provides an easy-to-use full-text search interface and includes tokenizers for multiple languages.\n* **Data Migration**: WCDB supports to migrate data from one databasse to another with simple configuration. And developers don't need to care about the intermediate status and progress of the migration.\n* **Data Compression**: WCDB supports to compress content via [Zstd][Zstd] within specific fields of a database table through a simple configuration. Once configured, the details of data compression and decompression become transparent to developers, and WCDB can automatically compress existing data.\n\n## **Compatibility**\n\nWCDB has interfaces in five languages: C++, Java, Kotlin, Swift, and Objc. Interfaces in different languages share the same underlying logic. The code structure of WCDB is shown in the figure below:\n\n\u003Cdiv align=center>\u003Cimg style=\"display:inline-block\" src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fwiki\u002FTencent\u002Fwcdb\u002Fassets\u002Fcommon\u002FCodeStructure-English.png\" width = 600\u002F>\u003C\u002Fdiv>\n\nUnder such architecture, WCDB in different languages can have the same interface structure and interface capabilities. In one project, you can write database code in different languages with one WCDB. Database logic in different languages will not conflict. Some global interfaces such as error monitoring can work on database logic in different languages at the same time. \n\n# Build and Install\n\nFollowing wikies contain the detailed instructions about building and installing of WCDB.\n\n* [Building and Installing of WCDB C++][wcdb-cpp-build-and-install]\n* [Building and Installing of WCDB Java\u002FKotlin][wcdb-java-build-and-install]\n* [Building and Installing of WCDB Swift][wcdb-swift-build-and-install]\n* [Building and Installing of WCDB Objc][wcdb-objc-build-and-install]\n\n# Tutorials\n\nTutorials of different languages can be found below:\n\n* [Tutorials for WCDB C++][wcdb-cpp-tutorials]\n* [Tutorials for WCDB Java\u002FKotlin][wcdb-java-tutorials]\n* [Tutorials for WCDB Swift][wcdb-swift-tutorials]\n* [Tutorials for WCDB Objc][wcdb-objc-tutorials]\n\n# Contributing\n\nIf you are interested in contributing, check out the [CONTRIBUTING.md], also join our [Tencent OpenSource Plan](https:\u002F\u002Fopensource.tencent.com\u002Fcontribution).\n\nWCDB 正式加入[TDS 腾讯端服务产品联盟](https:\u002F\u002Ftds-union.qq.com\u002F)，携手联盟其他成员，共同致力于构建开放共赢的大前端技术产品生态。\n\n# 信息公示\n\n* 开发者: 深圳市腾讯计算机系统有限公司\n\n* [WCDB 个人信息保护规则][wcdb-privacy]\n\n[wcdb-wiki]: https:\u002F\u002Fgithub.com\u002FTencent\u002Fwcdb\u002Fwiki\n[wcdb-docs-android]: https:\u002F\u002Ftencent.github.io\u002Fwcdb\u002Freferences\u002Fandroid\u002Findex.html\n[sqlcipher]:https:\u002F\u002Fwww.zetetic.net\u002Fsqlcipher\u002F\n[Zstd]:https:\u002F\u002Fgithub.com\u002Ffacebook\u002Fzstd\n[room]: https:\u002F\u002Fdeveloper.android.com\u002Ftopic\u002Flibraries\u002Farchitecture\u002Froom\n[room-codelabs]: https:\u002F\u002Fcodelabs.developers.google.com\u002Fcodelabs\u002Fandroid-room-with-a-view\n[wcdb-cpp-build-and-install]: https:\u002F\u002Fgithub.com\u002FTencent\u002Fwcdb\u002Fwiki\u002FC++-%E5%AE%89%E8%A3%85%E4%B8%8E%E5%85%BC%E5%AE%B9%E6%80%A7\n[wcdb-java-build-and-install]:https:\u002F\u002Fgithub.com\u002FTencent\u002Fwcdb\u002Fwiki\u002FJava%7CKotlin-%e5%ae%89%e8%a3%85%e4%b8%8e%e5%85%bc%e5%ae%b9%e6%80%a7\n[wcdb-objc-build-and-install]:https:\u002F\u002Fgithub.com\u002FTencent\u002Fwcdb\u002Fwiki\u002FObjc-%E5%AE%89%E8%A3%85%E4%B8%8E%E5%85%BC%E5%AE%B9%E6%80%A7\n[wcdb-swift-build-and-install]: https:\u002F\u002Fgithub.com\u002FTencent\u002Fwcdb\u002Fwiki\u002FSwift-%E5%AE%89%E8%A3%85%E4%B8%8E%E5%85%BC%E5%AE%B9%E6%80%A7\n[wcdb-cpp-tutorials]:https:\u002F\u002Fgithub.com\u002FTencent\u002Fwcdb\u002Fwiki\u002FC++-%E5%BF%AB%E9%80%9F%E5%85%A5%E9%97%A8\n[wcdb-java-tutorials]:https:\u002F\u002Fgithub.com\u002FTencent\u002Fwcdb\u002Fwiki\u002FJava%7CKotlin-%E5%BF%AB%E9%80%9F%E5%85%A5%E9%97%A8\n[wcdb-swift-tutorials]:https:\u002F\u002Fgithub.com\u002FTencent\u002Fwcdb\u002Fwiki\u002FSwift-%E5%BF%AB%E9%80%9F%E5%85%A5%E9%97%A8\n[wcdb-objc-tutorials]:https:\u002F\u002Fgithub.com\u002FTencent\u002Fwcdb\u002Fwiki\u002FObjc-%E5%BF%AB%E9%80%9F%E5%85%A5%E9%97%A8\n[Benchmark-iOS]: https:\u002F\u002Fgithub.com\u002FTencent\u002Fwcdb\u002Fwiki\u002FWCDB-iOS-benchmark\n[wcdb-privacy]: https:\u002F\u002Fsupport.weixin.qq.com\u002Fcgi-bin\u002Fmmsupportacctnodeweb-bin\u002Fpages\u002FGepveGs4q4eAgpoh\n\n","WCDB 是由微信团队开发的一款跨平台数据库框架。它基于 SQLite 和 SQLCipher，支持 C++、Java、Kotlin、Swift 和 Objective-C 五种编程语言，具备高效、完整和易用的特点。核心功能包括 ORM（对象关系映射）和 WINQ（集成查询语言），使开发者能够通过简单的代码实现数据的增删改查操作。ORM 提供了灵活的数据表创建及管理方式，而 WINQ 则允许使用原生语法进行复杂查询，无需手动拼接 SQL 语句。WCDB 适用于需要在多平台上统一数据库访问逻辑的应用场景，特别是对于追求高性能和安全性的移动应用开发项目。",2,"2026-06-11 03:06:02","top_language"]