+ (sqlite3 * )openDB;
{

    if (db == nil) {
         获取document文件的路径
         参数1: 文件夹名字 参数2 . 查找域 参数3. 是否使用绝对路径
        NSString * docPath = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES).firstObject ;
         数据库文件的路径
        NSString * dbPath = [docPath stringByAppendingPathComponent:FILE_NAME];
        
        
            iOS 中管理文件的类
         NSFileManager  负责赋值文件, 删除文件 , 移动文件
         
        
        NSFileManager * fm = [NSFileManager defaultManager];
        
         判断document中是否有sqlite文件 , 没有则从app中复制文件到 document
        if (![fm fileExistsAtPath:dbPath]) {
             获取.APP 中 sqlite文件路径
         NSString * bundlePath =   [[NSBundle mainBundle] pathForResource:@"DataBase" ofType:@"sqlite"];
            NSError * error = nil;
             复制
         BOOL result =  [fm copyItemAtPath:bundlePath toPath:dbPath error:&error];
            if (!result) {
                NSLog(@"%@",error);
            }
        }
        
         打开数据库 .  参数1 文件路径 参数2 , 接收数据库的指针
        sqlite3_open([dbPath UTF8String], &db);
        
    }
    
    
    
    return db;
}