Latest 0.0.2
Homepage https://github.com/liuxc123/GTPersistance
License MIT
Platforms ios 8.0, requires ARC
Dependencies SQLCipher
Frameworks UIKit
Authors

GTPersistance 是 iOS 基于SQLite的数据库封装, 根据CTPersistance修改,统一命名规范。

使用

CTPersistance 提供 CTPersistanceAsyncExecutor 执行异步工作。

read:

[[GTPersistanceAsyncExecutor sharedInstance] read:^{
    NSInteger count = COUNT;
    while (count --> 0) {
        TestRecord *record = (TestRecord *)[self.testTable findWithPrimaryKey:@(count) error:NULL];
        NSLog(@"%@", record.primaryKey);
    }
}];

write:

[[GTPersistanceAsyncExecutor sharedInstance] write:^{
    NSInteger count = COUNT;
    while (count --> 0) {
        NSNumber *primaryKey = [self.testTable insertValue:@"casa" forKey:@"name" error:NULL];
        NSLog(@"%@", primaryKey);
    }
}];

CRUD操作

Create : see here

Read : see here

Update : see here

Delete : see here

Upsert : see here

其他操作

Database Migration : see here

Index of Columns : see here

Transaction : see here

Change Key of Encryption : see here

安装

你可以在 Podfile 中加入下面一行代码来使用 GTPersistance

pod 'GTPersistance'

作者

liuxc123, [email protected]

声明

GTPersistance is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "GTPersistance",
    "version": "0.0.2",
    "summary": "Objective-C Model Layer with SQLite.",
    "homepage": "https://github.com/liuxc123/GTPersistance",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "liuxc123": "[email protected]"
    },
    "source": {
        "git": "https://github.com/liuxc123/GTPersistance.git",
        "tag": "0.0.2"
    },
    "platforms": {
        "ios": "8.0"
    },
    "public_header_files": "GTPersistance/**/*.h",
    "source_files": "GTPersistance/**/*.{h,m}",
    "requires_arc": true,
    "frameworks": "UIKit",
    "libraries": "sqlite3",
    "dependencies": {
        "SQLCipher": []
    }
}

Pin It on Pinterest

Share This