Tagged articles
WCDB
14 articles · Page 1 of 1
WeChat stores 1.3 billion users' chat records locally on devices using SQLite via its WCDB framework, avoiding EB-scale server costs while enabling instant search via FTS5 full-text indexing, with SQLCipher encryption and automatic sharding at 240MB per database file.
ACIDFTS5SQLCipher
0 likes · 16 min read

This article explains why WeChat stores chat records locally using SQLite instead of cloud databases, detailing the cost savings, privacy benefits, and performance advantages of embedded databases, along with WeChat's custom WCDB framework, FTS5 full-text search, encryption, and the trade-offs of local-only storage.
ACIDFTS5SQLCipher
0 likes · 16 min read

WCDB 2 introduces multi-language support (C++, Java, Kotlin), a rewritten SQL builder, fast backup and recovery with sub‑second times, incremental WAL‑based backup, automatic data migration, Zstandard compression, on‑the‑fly column addition, and performance enhancements such as an FTS5 optimizer and interruptible transactions, delivering a robust high‑performance mobile database solution.
Data CompressionSQL BuilderSQLite
0 likes · 47 min read

This article details the major upgrades of WCDB, including expanded language support, a redesigned Winq SQL builder, robust data backup and repair mechanisms, seamless data migration, on‑the‑fly compression, automatic column addition, and performance optimizations such as interruptible transactions and WAL header improvements.
CompressionDataBackupMulti-language
0 likes · 49 min read

This article describes the requirements, architecture, API design, database selection, retention policies, security measures, and performance optimizations of a new iOS log system that records business, network, and player logs, uses WCDB for storage, and employs active pull and encrypted chunked uploads to improve issue diagnosis.
LoggingSecurityWCDB
0 likes · 16 min read

An in‑depth look at SQLite’s Write‑Ahead Logging (WAL) mode and the asynchronous checkpoint optimization used in WeChat’s WCDB, covering implementation details, performance gains, A/B test results, and practical code examples for enabling these features on Android.
Asynchronous CheckpointSQLiteWAL
0 likes · 13 min read

The article introduces WCDB Swift, a pure‑Swift rewrite of Tencent's mobile database, detailing its model binding via Codable, language‑integrated queries, thread‑safe concurrency, encryption, full‑text search, and innovative use of Swift’s KeyPath and Mirror to achieve high performance and stability on iOS.
ORMSWIFTWCDB
0 likes · 10 min read

This article compares FMDB and WCDB, detailing smooth migration steps, benchmark results showing WCDB's superior write and multithreaded performance, reduced code complexity, built‑in encryption, statistics and repair tools, and provides practical guidance for developers considering a database switch.
Database MigrationFMDBSQLite
0 likes · 10 min read

This article explains how WCDB for Android simplifies encryption with SQLiteCipherSpec, enables seamless data migration, provides a custom FTS3/4 tokenizer with dynamic ICU loading, and offers log redirection and performance monitoring tools, plus an optimized cursor implementation for high‑performance mobile apps.
AndroidFTSWCDB
0 likes · 8 min read

This article chronicles the development of WCDB, WeChat’s open‑source mobile database, detailing its early challenges, performance bottlenecks, security risks, concurrency improvements, cross‑platform collaboration, and future roadmap for a more reliable and efficient data layer on iOS and Android.
AndroidMobile DatabaseSQL injection
0 likes · 14 min read

This article examines WCDB’s design principles for efficient, complete, and easy-to-use client-side databases, explains the pitfalls of SQL string concatenation such as code redundancy, debugging difficulty, and injection attacks, and describes how WCDB’s WINQ abstraction and ORM layer safely encapsulate SQLite syntax to enable concise, compile-time-checked queries.
C++ORMSQL injection
0 likes · 10 min read

This article chronicles the development of WCDB, Tencent WeChat's open‑source mobile database, detailing its early platform challenges, performance and security improvements, cross‑platform collaboration, and future plans to enhance usability, speed, and reliability.
AndroidMobile DatabaseSQLCipher
0 likes · 14 min read

WeChat’s WCDB component tackles pervasive SQLite corruption on mobile devices by combining dump‑based, backup, and B‑tree parsing recovery methods, achieving up to 78% success while supporting encrypted databases, large data volumes, and seamless user experience.
B+ TreeSQLiteWCDB
0 likes · 17 min read

This article introduces WCDB, the official WeChat mobile database component, covering its architecture, ORM macros, WINQ integrated query, multithreaded high‑concurrency support, corruption repair, and advanced usage such as as‑redirection, chainable calls, and custom field binding for iOS/Mac development.
ORMSQLiteWCDB
0 likes · 16 min read
