Latest 1.0.2
Homepage https://github.com/LiuHuanQing/HQDBDecode
License MIT
Platforms ios 8.0
Dependencies FMDB, YYModel
Frameworks FMDB, YYModel
Authors

安装

pod 'HQDBDecode', '~> 1.0.0'

公司大量数据需要本地缓存,如动态资源文件,错误码,潮汐数据,天气数据,鱼资料库,所以就有了这个东西

使用YYModel的查表思路,效率还不错.比之前用字符串处理的方法上,17个字段的Model,1万条数据,从9秒降到3秒

我觉得这个种写法还是不够’聪明’  

敬请期待2.0版 的语法:

obj.field(*).where({id:001}).select();

刚从内网gitlab转过来,没上pod,很多东西暂时没有

具体用法注释其实已经写的很清楚:

#pragma mark - 增
/** 单条插入 */
- (BOOL)hq_insert;

/** 批量插入 */
+ (BOOL)hq_insertObjects:(nonnull NSArray *)objects;

#pragma mark - 删
/** 单条删除 */
- (BOOL)hq_delete;

/** 批量删除 */
+ (BOOL)hq_deleteObjects:(nonnull NSArray *)objects;

/** 清空表的所有数据 */
+ (BOOL)hq_clearTable;

/** 通过对应列删除
 *  例:根据userno为002的用户数据  [User hq_deleteByColumns:@{@"userno":@"002"}]
 */
+ (BOOL)hq_deleteByColumns:(nonnull NSDictionary *)columns;

/** 指定WHERE条件删除 例: sql @"userno = :no", map @{@"no":@"003"}*/
+ (BOOL)hq_deleteByWHERE:(nonnull NSString *)sql withDictionary:(nullable NSDictionary *)map;

Latest podspec

{
    "name": "HQDBDecode",
    "version": "1.0.2",
    "summary": "u6570u636eu5e93u5bf9u8c61u6620u5c04u6a21u578b",
    "description": "u6570u636eu5e93u5bf9u8c61u6620u5c04u6a21u578b.",
    "homepage": "https://github.com/LiuHuanQing/HQDBDecode",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "u5218u6b22u5e86": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/LiuHuanQing/HQDBDecode.git",
        "tag": "1.0.2"
    },
    "source_files": [
        "Classes",
        "Classes/**/*.{h,m}"
    ],
    "exclude_files": "Exclude",
    "frameworks": [
        "FMDB",
        "YYModel"
    ],
    "dependencies": {
        "FMDB": [],
        "YYModel": [
            "~> 1.0.4"
        ]
    }
}

Pin It on Pinterest

Share This