WCDB is a cross-platform database framework developed by WeChat.

Overview

WCDB

PRs Welcome Release Version WeChat Approved iOS WeChat Approved Android Platform

中文版本请参看这里

WCDB is an efficient, complete, easy-to-use mobile database framework used in the WeChat application. It's currently available on iOS, macOS and Android.

WCDB for iOS/macOS

Features

  • Easy-to-use. Through WCDB, you can get objects from database in one line code.

    • WINQ (WCDB language integrated query): WINQ is a native data querying capability which frees developers from writing glue code to concatenate SQL query strings.

    • ORM (Object Relational Mapping): WCDB provides a flexible, easy-to-use ORM for creating tables, indices and constraints, as well as CRUD through ObjC objects.

      [database getObjectsOfClass:WCTSampleConvenient.class
                        fromTable:tableName
                            where:WCTSampleConvenient.intValue>=10
                            limit:20];
  • Efficient. Through the framework layer and sqlcipher source optimization, WCDB have more efficient performance.

    • Multi-threaded concurrency: WCDB supports concurrent read-read and read-write access via connection pooling.
    • Batch Write Performance Test. For more benchmark data, please refer to our benchmark.
  • Complete.

    • Encryption Support: WCDB supports database encryption via SQLCipher.
    • Corruption recovery: WCDB provides a built-in repair kit for database corruption recovery.
    • Anti-injection: WCDB provides a built-in protection from SQL injection.

Getting Started

Prerequisites

  • Apps using WCDB can target: iOS 7 or later, macOS 10.9 or later.
  • Xcode 8.0 or later required.
  • Objective-C++ required.

Installation

  • Via Cocoapods:
    1. Install CocoaPods.
    2. Run pod repo update to make CocoaPods aware of the latest available WCDB versions.
    3. In your Podfile, add pod 'WCDB' to your app target.
    4. From the command line, run pod install.
    5. Use the .xcworkspace file generated by CocoaPods to work on your project.
    6. Add #import <WCDB/WCDB.h> at the top of your Objective-C++ source files and start your WCDB journey.
    7. Since WCDB is an Objective-C++ framework, for those files in your project that includes WCDB, you should rename their extension .m to .mm.
  • Via Carthage:
    1. Install Carthage.
    2. Add github "Tencent/WCDB" to your Cartfile.
    3. Run carthage update.
    4. Drag WCDB.framework from the appropriate platform directory in Carthage/Build/ to the Linked Binary and Libraries section of your Xcode project’s Build Phases settings.
    5. On your application targets' Build Phases settings tab, click the "+" icon and choose New Run Script Phase. Create a Run Script with carthage copy-frameworks and add the paths to the frameworks under Input Files: $(SRCROOT)/Carthage/Build/iOS/WCDB.framework or $(SRCROOT)/Carthage/Build/Mac/WCDB.framework.
    6. Add #import <WCDB/WCDB.h> at the top of your Objective-C++ source files and start your WCDB journey.
    7. Since WCDB is an Objective-C++ framework, for those files in your project that includes WCDB, you should rename their extension .m to .mm.
  • Via Dynamic Framework: Note that Dynamic frameworks are not compatible with iOS 7. See “Static Framework” for iOS 7 support.
    1. Getting source code from git repository and update the submodule of sqlcipher.
      • git clone https://github.com/Tencent/wcdb.git
      • cd wcdb
      • git submodule update --init sqlcipher
    2. Drag WCDB.xcodeproj in wcdb/apple/ into your project.
    3. Add WCDB.framework to the Enbedded Binaries section of your Xcode project's General settings. Note that there are two frameworks here and the dynamic one should be chosen. You can check it at Build Phases->Target Dependencies. The right one is WCDB while `WCDB iOS Static is used for static lib.
    4. Add #import <WCDB/WCDB.h> at the top of your Objective-C++ source files and start your WCDB journey.
    5. Since WCDB is an Objective-C++ framework, for those files in your project that includes WCDB, you should rename their extension .m to .mm.
  • Via Static Framework:
    1. Getting source code from git repository and update the submodule of sqlcipher.
      • git clone https://github.com/Tencent/wcdb.git
      • cd wcdb
      • git submodule update --init sqlcipher
    2. Drag WCDB.xcodeproj in wcdb/apple/ into your project.
    3. Add WCDB iOS Static to the Target Dependencies section of your Xcode project's Build Phases settings.
    4. Add WCDB.frameworklibz.tbd to the Linked Binary and Libraries section of your Xcode project's Build Phases settings. Note that there are two WCDB.framework, you should choose the one from WCDB iOS Static target.
    5. Add -all_load and -ObjC to the Other Linker Flags section of your Xcode project's Build Settings.
    6. Add #import <WCDB/WCDB.h> at the top of your Objective-C++ source files and start your WCDB journey.
    7. Since WCDB is an Objective-C++ framework, for those files in your project that includes WCDB, you should rename their extension .m to .mm.

Tutorials

Tutorials can be found here.

Documentations

  • Documentations can be found on our Wiki.
  • API references for iOS/macOS can be found here.
  • Performance data can be found on our benchmark.

WCDB for Android

Features

  • Database encryption via SQLCipher.
  • ORM/persistence solution via Room from Android Architecture Components.
  • Concurrent access via connection pooling from modern Android framework.
  • Repair toolkit for database corruption recovery.
  • Database backup and recovery utility optimized for small backup size.
  • Log redirection and various tracing facilities.
  • API 14 (Android 4.0) and above are supported.

Getting Started

To include WCDB to your project, choose either way: import via Maven or via AAR package.

Import via Maven

To import WCDB via Maven repositories, add the following lines to build.gradle on your app module:

dependencies {
    compile 'com.tencent.wcdb:wcdb-android:1.0.8'
    // Replace "1.0.8" to any available version.
}

This will cause Gradle to download AAR package from JCenter while building your application.

If you want to use Room persistence library, you need to add the Google Maven repository to build.gradle to your root project.

allprojects {
    repositories {
        jcenter()
        google()    // Add this line
    }
}

Also add dependencies to module build.gradle.

dependencies {
    compile 'com.tencent.wcdb:room:1.0.8'
    // Replace "1.0.8" to any available version.

    annotationProcessor 'android.arch.persistence.room:compiler:1.1.1'
    // Don't forget to include Room annotation compiler from Google.
}

Import Prebuilt AAR Package

  1. Download AAR package from release page.   2. Import the AAR as new module. In Android Studio, select File -> New -> New Module... menu and choose "Import JAR/AAR Package".   3. Add a dependency on the new module. This can be done using File -> Project Structure... in Android Studio, or by adding following code to application's build.gradle:

dependencies {
    // Change "wcdb" to the actual module name specified in step 2.
    compile project(':wcdb')
}

Migrate from Plain-text SQLite Databases

WCDB has interfaces very similar to Android SQLite Database APIs. To migrate you application from AOSP API, change import path from android.database.* to com.tencent.wcdb.*, and android.database.sqlite.* to com.tencent.wcdb.database.*. After import path update, your application links to WCDB instead of AOSP API.

To open or create an encrypted database, use with-password versions of SQLiteDatabase.openOrCreateDatabase(), SQLiteOpenHelper.getWritableDatabase(), or Context.openOrCreateDatabase().

Note: WCDB uses byte[] for password instead of String in SQLCipher Android Binding.

String password = "MyPassword";
SQLiteDatabase db = SQLiteDatabase.openOrCreateDatabase("/path/to/database", password.getBytes(), 
        null, null);

See sample-encryptdb for sample for transferring data between plain-text and encrypted databases.

Use WCDB with Room

To use WCDB with Room library, follow the Room instructions. The only code to change is specifying WCDBOpenHelperFactory when getting instance of the database.

SQLiteCipherSpec cipherSpec = new SQLiteCipherSpec()
        .setPageSize(4096)
        .setKDFIteration(64000);

WCDBOpenHelperFactory factory = new WCDBOpenHelperFactory()
        .passphrase("passphrase".getBytes())  // passphrase to the database, remove this line for plain-text
        .cipherSpec(cipherSpec)               // cipher to use, remove for default settings
        .writeAheadLoggingEnabled(true)       // enable WAL mode, remove if not needed
        .asyncCheckpointEnabled(true);        // enable asynchronous checkpoint, remove if not needed

AppDatabase db = Room.databaseBuilder(this, AppDatabase.class, "app-db")
                .allowMainThreadQueries()
                .openHelperFactory(factory)   // specify WCDBOpenHelperFactory when opening database
                .build();

See sample-persistence for samples using Room library with WCDB. See sample-room-with-a-view for samples using Room library with WCDB and other architecture components from Google.

sample-room-with-a-view comes from Google's CodeLabs with modification of just a few rows. Search for [WCDB] keyword for the modification.

See here for the original tutorial.

Corruption Recovery

See sample-repairdb for instructions how to recover corrupted databases using RepairKit.

Redirect Log Output

By default, WCDB prints its log message to system logcat. You may want to change this behavior in order to, for example, save logs for troubleshooting. WCDB can redirect all of its log outputs to user-defined routine using Log.setLogger(LogCallback) method.

Build from Sources

Build WCDB Android with Prebuilt Dependencies

WCDB itself can be built apart from its dependencies using Gradle or Android Studio. To build WCDB Android library, run Gradle on android directory:

$ cd android
$ ./gradlew build

Building WCDB requires Android NDK installed. If Gradle failed to find your SDK and/or NDK, you may need to create a file named local.properties on the android directory with content:

sdk.dir=path/to/sdk
ndk.dir=path/to/ndk

Android Studio will do this for you when the project is imported.

Build Dependencies from Sources

WCDB depends on OpenSSL crypto library and SQLCipher. You can rebuild all dependencies if you wish. In this case, a working C compiler on the host system, Perl 5, Tcl and a bash environment is needed to be installed on your system.

To build dependencies, checkout all submodules, set ANDROID_NDK_ROOT environment variable to your NDK path, then run build-depends-android.sh:

$ export ANDROID_NDK_ROOT=/path/to/ndk
$ ./build-depends-android.sh

This will build OpenSSL crypto library and generate SQLCipher amalgamation sources and place them to proper locations suitable for WCDB library building.

Documentations

  • Documentations can be found on our Wiki.
  • API references for Android can be found here.

Contributing

If you are interested in contributing, check out the [CONTRIBUTING.md], also join our Tencent OpenSource Plan.

Comments
  • Xcode 9.3 Support?

    Xcode 9.3 Support?

    The language of WCDB

    Swift

    The version of WCDB

    v1.0.6

    The platform of WCDB

    iOS

    The installation of WCDB

    Cocoapods

    What's the issue?

    When I use Xcode 9.2 everything works, but after updating to Xcode 9.3, I can't compile it. See the chart for specific errors

    enhancement 
    opened by aidevjoe 68
  • library routine called out of sequence

    library routine called out of sequence

    The language of WCDB

    e.g. Objective-C, Swift or Java

    Objective-C

    The version of WCDB

    e.g. v1.0.5

    v1.0.7

    The platform of WCDB

    e.g. iOS, macOS or Android

    iOS

    The installation of WCDB

    e.g. Cocoapods, Carthage, Maven, AAR Package or Git clone

    Cocoapods

    What's the issue?

    Post the outputs or screenshots for errors.

    Explain what you want by example or code in English.

    fc50a5a3-88df-40d6-9a04-832ffe41307f

    when we use the WCDB.framework & sqlcipher.framework, we find the fmdb library method report a error with "library routine called out of sequence.".but when we use the source pod,the project run normally.

    this is demo

    "WCDBDemo-Framework.zip" is demo with WCDB.framework & sqlcipher.framework. "WCDBDemo-SCCode.zip" is demo with the source pod.

    question stale 
    opened by FrankyShy 40
  • 通过事务批量插入无效

    通过事务批量插入无效

    The language of WCDB

    e.g. Objective-C, Swift or Java

    The version of WCDB

    e.g. v1.0.5

    The platform of WCDB

    e.g. iOS, macOS or Android

    The installation of WCDB

    e.g. Cocoapods, Carthage, Maven, AAR Package or Git clone

    What's the issue?

    Post the outputs or screenshots for errors.

    Explain what you want by example or code in English.

    [transaction begin]; [transaction insertObjects:mArr.copy into:@"new_usr"]; [transaction commit]; 事务批量使用这种形式貌似没成功,使用block是ok的,why

    question Objective-C 
    opened by Will-ZJ 30
  • cocoapods导入问题

    cocoapods导入问题

    The language of WCDB

    objc

    The version of WCDB

    e.g. v1.0.7.5

    The platform of WCDB

    ios

    The installation of WCDB

    cocoapods

    What's the issue?

    Analyzing dependencies Downloading dependencies Using AFNetworking (3.2.1) Installing SQLiteRepairKit (1.2.2)

    [!] Error installing SQLiteRepairKit [!] /usr/bin/git clone https://github.com/Tencent/wcdb.git /var/folders/pz/kb0qzscs25l6_qnx262fgtw40000gn/T/d20190829-31516-mdj9du --template= --single-branch --depth 1 --branch v1.0.8.2

    Cloning into '/var/folders/pz/kb0qzscs25l6_qnx262fgtw40000gn/T/d20190829-31516-mdj9du'... error: RPC failed; curl 56 LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54 fatal: the remote end hung up unexpectedly fatal: early EOF fatal: index-pack failed

    question 
    opened by wdq123550 26
  • I follow the wiki “Via Static Framework”,but still has error blow,some body help??

    I follow the wiki “Via Static Framework”,but still has error blow,some body help??

    The language of WCDB

    Objective-C

    The platform of WCDB

    iOS (Xcoed 10.1)

    The installation of WCDB

    Via Static Framework

    What's the issue?

    Undefined symbols for architecture x86_64: "_sqlcipher_codec_ctx_get_data", referenced from: _sqliterkCryptoDecode in WCDB(sqliterk_crypto.o) "_sqlcipher_codec_key_derive", referenced from: _sqliterkCryptoDecode in WCDB(sqliterk_crypto.o) "_sqlcipher_codec_ctx_set_pagesize", referenced from: _sqliterkCryptoSetCipher in WCDB(sqliterk_crypto.o) "_sqlcipher_codec_ctx_init", referenced from: _sqliterkCryptoSetCipher in WCDB(sqliterk_crypto.o) "_sqlcipher_page_cipher", referenced from: _sqliterkCryptoDecode in WCDB(sqliterk_crypto.o) "_sqlcipher_codec_ctx_get_reservesize", referenced from: _sqliterkCryptoSetCipher in WCDB(sqliterk_crypto.o) "_sqlcipher_activate", referenced from: _sqliterkCryptoSetCipher in WCDB(sqliterk_crypto.o) "_sqlcipher_codec_ctx_set_cipher", referenced from: _sqliterkCryptoSetCipher in WCDB(sqliterk_crypto.o) "_sqlcipher_codec_ctx_set_use_hmac", referenced from: _sqliterkCryptoSetCipher in WCDB(sqliterk_crypto.o) "_sqlcipher_codec_ctx_set_kdf_iter", referenced from: _sqliterkCryptoSetCipher in WCDB(sqliterk_crypto.o) "_sqlcipher_deactivate", referenced from: _sqliterkCryptoSetCipher in WCDB(sqliterk_crypto.o) _sqliterkCryptoFreeCodec in WCDB(sqliterk_crypto.o) "_sqlcipher_codec_ctx_get_pagesize", referenced from: _sqliterkCryptoSetCipher in WCDB(sqliterk_crypto.o) _sqliterkCryptoDecode in WCDB(sqliterk_crypto.o) "_sqlcipher_codec_ctx_free", referenced from: _sqliterkCryptoSetCipher in WCDB(sqliterk_crypto.o) _sqliterkCryptoFreeCodec in WCDB(sqliterk_crypto.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

    question stale Objective-C 
    opened by dolway 23
  • WCTTokenizerNameWCDB is nil

    WCTTokenizerNameWCDB is nil

    The language of WCDB

    Objective-C

    The version of WCDB

    v1.0.5

    The platform of WCDB

    iOS

    The installation of WCDB

    Cocoapods

    What's the issue?

    There are many TFS Class similar to WCTSampleFTSData in my project. I tried to do the same thing with demo, but the project crashed at startup. The information is as follows. Could it be that WCTTokenizerNameWCDB is nil causing?

    wechatimg512

    bug 
    opened by Graphicooooone 23
  • Could fix  a crash bug ?

    Could fix a crash bug ?

    The language of WCDB

    Objective-C

    The version of WCDB

    v1.0.6

    The platform of WCDB

    iOS

    The installation of WCDB

    Cocoapods

    What's the issue?

    crash stack from Bugly, how to resolve it ? thanks!

    2018-04-27 11 28 17

    stale 
    opened by tigerandy163com 17
  • Install WCDB via Carthage, but build failed

    Install WCDB via Carthage, but build failed

    The language of WCDB

    Swift

    The version of WCDB

    v1.0.8

    The platform of WCDB

    iOS

    The installation of WCDB

    Carthage

    What's the issue?

    Follow the docs here, the result is:

    2019-01-10 6 45 08
    *** Fetching WCDB
    *** Checking out WCDB at "v1.0.8"
    *** xcodebuild output can be found in /var/folders/rr/xgdjh1jd35bdrqzf5xd6c8r00000gn/T/carthage-xcodebuild.2mGEEl.log
    *** Downloading WCDB.framework binary at "WCDB 1.0.8"
    *** Building scheme "WCDB" in WCDB.xcworkspace
    Build Failed
    	Task failed with exit code 65:
    	/usr/bin/xcrun xcodebuild -workspace /private/var/www/xcz-ios/Carthage/Checkouts/WCDB/WCDB.xcworkspace -scheme WCDB -configuration Release -derivedDataPath /Users/hustlzp/Library/Caches/org.carthage.CarthageKit/DerivedData/10.1_10B61/WCDB/v1.0.8 ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -archivePath /var/folders/rr/xgdjh1jd35bdrqzf5xd6c8r00000gn/T/WCDB SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO STRIP_INSTALLED_PRODUCT=NO (launched in /var/www/xcz-ios/Carthage/Checkouts/WCDB)
    
    This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/rr/xgdjh1jd35bdrqzf5xd6c8r00000gn/T/carthage-xcodebuild.2mGEEl.log
    

    And the congent of the log is:

    ** ARCHIVE FAILED **
    
    
    The following build commands failed:
    	Ld /Users/hustlzp/Library/Caches/org.carthage.CarthageKit/DerivedData/10.1_10B61/WCDB/v1.0.8/Build/Intermediates.noindex/ArchiveIntermediates/WCDB/IntermediateBuildFilesPath/UninstalledProducts/macosx/WCDB.framework/Versions/A/WCDB normal x86_64
    (1 failure)
    
    opened by hustlzp 16
  • Would implement command INSERT INTO SELECT FROM ?

    Would implement command INSERT INTO SELECT FROM ?

    The language of WCDB

    Objective-C, Swift or Java

    The version of WCDB

    v1.0.7

    The platform of WCDB

    iOS

    The installation of WCDB

    Cocoapods

    What's the issue?

    Would implement command INSERT INTO SELECT FROM , for table content copy as sqlite migration ?

    SQLite office doc Making Other Kinds Of Table Schema Changes

    bug question 
    opened by J2oe 16
  • iOS Error::Report function crash

    iOS Error::Report function crash

    The language of WCDB

    Objective-C

    The version of WCDB

    v1.0.6

    The platform of WCDB

    iOS

    The installation of WCDB

    Cocoapods

    What's the issue?

    As follow: When the query table exists, application in WCDB: : Error: Report function crashed(accidentally). how should solve?

    // when app go background, I call this method
    - (void)getMembersWithGroupId:(int)groupId resultBlock:(void (^)(NSArray *results))block {
         // otherQueue is a synac queue
        dispatch_async(self.otherQueue, ^{
            NSString *tableName = [NSString stringWithFormat:@"%@_%ld", kTableGroupMember, (long)groupId];
            WCTTable *table = [self.db getTableOfName:tableName withClass:Member.class];
            
            NSArray *res = [table getAllObjects];
            block(res);
        });
    }
    

    // Crash info Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Subtype: KERN_INVALID_ADDRESS at 0x00020001013aa660 VM Region Info: 0x20001013aa660 is not in any region. Bytes after previous region: 562946215945825
    REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL MALLOC_NANO (reserved) 00000001d8000000-00000001e0000000 [128.0M] rw-/rwx SM=NUL ...(unallocated) --->
    UNUSED SPACE AT END

    crash question 
    opened by huanghe810229530 16
  •  Use cocoapods to create data persistence module and reference WCDB.swfit (by cocoapods), and in other projects to introduce data persistence module will report 'sqlcipher / fts3_tokenizer.h' file not found

    Use cocoapods to create data persistence module and reference WCDB.swfit (by cocoapods), and in other projects to introduce data persistence module will report 'sqlcipher / fts3_tokenizer.h' file not found

    The language of WCDB

    Swift

    The version of WCDB

    v1.0.6

    The platform of WCDB

    iOS

    The installation of WCDB

    Cocoapods

    What's the issue?

    I use cocoapods to create data persistence module and reference WCDB.swfit (by cocoapods), and in other projects to introduce data persistence module will report 'sqlcipher / fts3_tokenizer.h' file not found,When compiling a project, the following error is reported:

    Error

    <module-includes>:1:9: note: in file included from <module-includes>:1:
    #import "Headers/WCDB.swift-umbrella.h"
            ^
    /Users/tinghuiyuan/Desktop/TSTradingSystemiOS/TSOptionalModule/Pods/Target Support Files/WCDB.swift/WCDB.swift-umbrella.h:13:9: note: in file included from /Users/tinghuiyuan/Desktop/TSTradingSystemiOS/TSOptionalModule/Pods/Target Support Files/WCDB.swift/WCDB.swift-umbrella.h:13:
    #import "SQLite-Bridging.h"
            ^
    /Users/tinghuiyuan/Desktop/TSTradingSystemiOS/TSOptionalModule/Pods/WCDB.swift/swift/source/util/SQLite-Bridging.h:28:9: error: 'sqlcipher/fts3_tokenizer.h' file not found
    #import <sqlcipher/fts3_tokenizer.h>
            ^
    <unknown>:0: error: could not build Objective-C module 'WCDBSwift'
    

    I tried many times the following operation, still can not solve the problem

    pod cache clean WCDB --all
    rm -rf ~/Library/Caches/CocoaPods
    pod repo update
    

    Project dependencies are as follows

    2018-01-26 6 53 15 2018-01-26 6 53 52 2018-01-26 6 54 09

    By the way,LoginRegisterModule introduced WCDB.swift compiled alone is no problem

    stale 
    opened by bluajack 15
  • 请问QQ群都满了,怎么加入技术交流群呢?

    请问QQ群都满了,怎么加入技术交流群呢?

    The language of WCDB

    e.g. Objective-C, Swift or Java

    The version of WCDB

    e.g. v1.0.5

    The platform of WCDB

    e.g. iOS, macOS or Android

    The installation of WCDB

    e.g. Cocoapods, Carthage, Maven, AAR Package or Git clone

    What's the issue?

    Post the outputs or screenshots for errors.

    Explain what you want by example or code in English.

    opened by camoufleur 0
  • WCDB 使用非 option 的值会 Crash,would not be decoded, please make it optional.

    WCDB 使用非 option 的值会 Crash,would not be decoded, please make it optional.

    The language of WCDB

    Swift

    The version of WCDB

    e.g. v1.0.8.2

    The platform of WCDB

    e.g. macOS

    The installation of WCDB

    e.g. Cocoapods

    What's the issue?

    Model 中使用非 option 值,在 getObjects 的时候会 Crash

    Post the outputs or screenshots for errors.

    这是我的代码 image 这是 Crash 的地方 image

    Explain what you want by example or code in English.

    @RingoD 能帮忙解答一下吗,非常感谢~

    enhancement 
    opened by chensifang 1
  • C++ requires a type specifier for all declarations

    C++ requires a type specifier for all declarations

    The language of WCDB

    Objective-C,

    The version of WCDB

    V1.0.7.5

    The platform of WCDB

    macOS

    The installation of WCDB

    Cocoapods

    What's the issue?

    build error C++ requires a type specifier for all declarations on xcode 12.5.1

    opened by echoyin 1
  • Potential memory leak -04.

    Potential memory leak -04.

    opened by rachyyyy 0
  • Potential memory leak -03.

    Potential memory leak -03.

    The language of WCDB

    Java

    The platform of WCDB

    Android

    What's the issue?

    Potential memory leak in mm_backup.c line 504. vt_sql is not freed before the if condition will cause a memory leak. Doc says "The sqlite3_mprintf() and sqlite3_vmprintf() routines write their results into memory obtained from sqlite3_malloc64(). The strings returned by these two routines should be released by sqlite3_free()."

    1662192026825

    opened by rachyyyy 0
  • Potential memory leak -02.

    Potential memory leak -02.

    The language of WCDB

    Java

    The platform of WCDB

    Android

    What's the issue?

    Potential memory leak in mm_recover.c line 568. Errmsg is not released will cause memory leak. Referenced from the doc, it says "To avoid memory leaks, the application should invoke sqlite3_free() on error message strings returned through the 5th parameter of sqlite3_exec() after the error message string is no longer needed." image

    opened by rachyyyy 0
Releases(v1.0.8.2)
Owner
Tencent
Tencent
macOS WeChat.app header files version history (automatic updated)

macos-wechat-app-tracker macOS WeChat.app header files version history (automatic updated) Troubleshooting $ class-dump -H /Applications/WeChat.app 20

Wechaty 3 Feb 10, 2022
🇨🇳 Learn how to make WeChat with SwiftUI. 微信 7.0 🟢

Overview Features Screenshots TODO Requirements License 中文 Overview I will continue to follow the development of technology, the goal is to bring Swif

Gesen 937 Dec 20, 2022
Listens to changes in a PostgreSQL Database and via websockets.

realtime-swift Listens to changes in a PostgreSQL Database and via websockets. A Swift client for Supabase Realtime server. Usage Creating a Socket co

Supabase 35 Dec 1, 2022
Realm is a mobile database: a replacement for Core Data & SQLite

Realm is a mobile database that runs directly inside phones, tablets or wearables. This repository holds the source code for the iOS, macOS, tvOS & wa

Realm 15.7k Jan 1, 2023
Sync Realm Database with CloudKit

IceCream helps you sync Realm Database with CloudKit. It works like magic! Features Realm Database Off-line First Thread Safety Reactive Programming O

Soledad 1.8k Jan 6, 2023
Movies Information DataBase (Add - Delete - Edit - Search)

MoviesInformation Movies Information DataBase (Add - Delete - Edit - Search) This Code Provide Simple Program About Movies Information This Program Ca

Mohammad Jaha 2 Sep 15, 2021
Easy direct access to your database 🎯

OHMySQL ★★ Every star is appreciated! ★★ The library supports Objective-C and Swift, iOS and macOS. You can connect to your remote MySQL database usin

Oleg 210 Dec 28, 2022
Safe and easy wrappers for common Firebase Realtime Database functions.

FirebaseHelper FirebaseHelper is a small wrapper over Firebase's realtime database, providing streamlined methods for get, set, delete, and increment

Quan Vo 15 Apr 9, 2022
A Generic CoreData Manager to accept any type of objects. Fastest way for adding a Database to your project.

QuickDB FileManager + CoreData ❗️ Save and Retrieve any thing in JUST ONE line of code ❗️ Fast usage dataBase to avoid struggling with dataBase comple

Behrad Kazemi 17 Sep 24, 2022
A simple order manager, created in order to try Realm database

Overview A simple order manager, created in order to get acquainted with the features and limitations of the local Realm database. The project is writ

Kirill Sidorov 0 Oct 14, 2021
A sample application showcasing Vapor 4 connecting to an Oracle database using SwiftOracle package.

vapor-oracle A sample application showcasing Vapor 4 connecting to an Oracle database using SwiftOracle package. In this Vapor application, we create

Ilia Sazonov 3 Sep 22, 2022
A property wrapper for displaying up-to-date database content in SwiftUI views

@Query Latest release: November 25, 2021 • version 0.1.0 • CHANGELOG Requirements: iOS 13.0+ / macOS 10.15+ / tvOS 13.0+ / watchOS 6.0+ • Swift 5.5+ /

Gwendal Roué 102 Dec 29, 2022
A food delivery app using firebase as the database.

FDA-ONE Food Delivery Application is a mobile application that users can use to find the best restaurant around their location and order the meals the

Naseem Oyebola 0 Nov 28, 2021
BucketServer - Small API with SQLite database that saves notes for an iOS appliction called Bucket list

BucketList Server-Side Small API with SQLite database that saves notes for an iO

null 0 Dec 30, 2021
Innova CatchKennyGame - The Image Tap Fun Game with keep your scores using Core Database

Innova_CatchKennyGame The Image Tap Fun Game with keep your scores using Core Da

Alican Kurt 0 Dec 31, 2021
Synco - Synco uses Firebase's Realtime Database to synchronize data across multiple devices, in real time

Synco Synco uses Firebase's Realtime Database to synchronize a color across mult

Alessio 0 Feb 7, 2022
PostgreSQL database adapter (ORM included)

PostgreSQL PostgreSQL adapter for Swift 3.0. Conforms to SQL, which provides a common interface and ORM. Documentation can be found there. Installatio

Zewo Graveyard 91 Sep 9, 2022
CodableCloudKit allows you to easily save and retrieve Codable objects to iCloud Database (CloudKit)

CodableCloudKit CodableCloudKit allows you to easily save and retrieve Codable objects to iCloud Database (CloudKit) Features ℹ️ Add CodableCloudKit f

Laurent Grondin 65 Oct 23, 2022
A type-safe, protocol-based, pure Swift database offering effortless persistence of any object

There are many libraries out there that aims to help developers easily create and use SQLite databases. Unfortunately developers still have to get bogged down in simple tasks such as writing table definitions and SQL queries. SwiftyDB automatically handles everything you don't want to spend your time doing.

Øyvind Grimnes 489 Sep 9, 2022