Skip to content

基于FMDB实现功能数据库的创建和升级

Notifications You must be signed in to change notification settings

loftor/LFMDBHelper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

LFMDBHelper

基于FMDB实现功能数据库的创建和升级

引用方式

pod 'fmdb', :git => 'https://github.com/ccgus/fmdb.git'

pod 'LClassInfo', :git => 'https://github.com/loftor/LClassInfo.git', :tag => 'v1.0'

pod 'LFMDBHelper', :git => 'https://github.com/loftor/LFMDBHelper.git', :tag => 'v1.0'

使用方式

  NSString *docPath = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)[0];
    LFMDBConfig * config = [LFMDBConfig defaultConfig];
    config.path = [docPath stringByAppendingPathComponent:@"test.db"];
    config.version = 1;
    [config registerTableCalssNames:@[@"TestObject"]];
    [LFMDBHelper dbCreateOrUpgrade:config block:^(BOOL result) {
    }];

About

基于FMDB实现功能数据库的创建和升级

Resources

Stars

Watchers

Forks

Packages

No packages published