{"id":22065062,"url":"https://github.com/wilddylan/xxdb","last_synced_at":"2026-05-02T20:38:58.280Z","repository":{"id":20757294,"uuid":"24041869","full_name":"wilddylan/XXDB","owner":"wilddylan","description":"you can use it for simply DB work\nwhile use it, you may read xxdb.h for how to use it","archived":false,"fork":false,"pushed_at":"2014-11-07T15:27:48.000Z","size":148,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-26T06:48:20.523Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wilddylan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-15T03:46:26.000Z","updated_at":"2014-09-29T16:15:20.000Z","dependencies_parsed_at":"2022-08-26T01:42:52.041Z","dependency_job_id":null,"html_url":"https://github.com/wilddylan/XXDB","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wilddylan/XXDB","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wilddylan%2FXXDB","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wilddylan%2FXXDB/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wilddylan%2FXXDB/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wilddylan%2FXXDB/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wilddylan","download_url":"https://codeload.github.com/wilddylan/XXDB/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wilddylan%2FXXDB/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32549385,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T19:18:06.202Z","status":"ssl_error","status_checked_at":"2026-05-02T19:16:21.335Z","response_time":132,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-30T19:14:52.362Z","updated_at":"2026-05-02T20:38:53.271Z","avatar_url":"https://github.com/wilddylan.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"XXDB\n====\n\nyou can use it for simply DB work\nwhile use it, you may read xxdb.h for how to use it\n\n====\n\n//\n//  XXDB.h\n//  XXDB\n//\n//  Created by xx-nb on 14-9-13.\n//  Copyright (c) 2014年 xx-nb. All rights reserved.\n//\n\n/**\n * XXDB - DBUser\n * Version: 1.0\n */\n\n#import \u003cFoundation/Foundation.h\u003e\n\n/*\n please add libsqlite3.0.dylib\n 请添加libsqlite3.0.dylib库\n */\n#warning - MRC\n#import \u003csqlite3.h\u003e\n\n@interface XXDB : NSObject\n\n#pragma mark - DBMethods\n/*\n create database using path and DBName\n 使用路径、数据库名称创建数据库 如果数据库存在\n */\n- (instancetype)initWithPathWithPath: (NSSearchPathDirectory)path\n                        databaseName: (NSString *)DBName;\n#pragma mark - Warning!\n/*\n 单例的设置 - 可选使用单例 - 只允许全程1个数据库\n */\n+ (XXDB *)shareInstance;\n\n/*\n 设置数据库路径\n */\n- (void)setDbPathWithPath: (NSString *)path;\n\n#pragma mark tables\n/*\n create table for database with SQL\n 使用数据库语句创建表\n */\n- (BOOL)createTableWithSQL: (NSString *)SQL;\n\n/*\n 通过模型与模型内的属性创建数据表\n */\n- (BOOL)createTableByClassAttributes: (id)classModel;\n\n/*\n drop table with tableName\n 通过表名称删除表\n */\n- (BOOL)dropTableWithTableName: (NSString *)tableName;\n\n#pragma mark Open/Close DB\n/*\n open/close database\n 打开/关闭数据库\n */\n- (BOOL)openDatabase;\n- (BOOL)closeDatabase;\n\n#pragma mark UpdateDB\n/*\n Update\n Tip: without SELECT !!\n 更新语句： 可用于除查询语句之外的所有数据库语句 包括创建、删除表等\n */\n- (BOOL)updateDatabaseWithSQL: (NSString *)SQL;\n\n/*\n 通过类的属性 得到SQL插入语句 INSERT!!  测试外边拼接是否正确的... 大家淡定、 或者可以帮助你做测试\n */\n- (NSString *)sqlQueryWithClassAttributes: (id)object\n                                tableName:(NSString *)tableName;\n\n#pragma mark SearchDB\n/*\n search all Table members with tableName\n members type must be NSString !! \n object is model what class you need !!\n 使用表名称、 你想得到的对象模型查询所有表中的数据 如果表名称或者对象错误、有可能奔溃。。。。\n */\n- (NSArray *)selectAllMembersWithTableName: (NSString *)tableName\n                             objectModel:(id)object;\n\n/*\n get allValues by columName\n 通过字段得到所有值\n */\n- (NSArray *)selectWithColumName: (NSString *)columName\n                        tableName: (NSString *)tableName;\n\n#pragma mark selectWithSqlQueryDict\n/*\n get value with sql statement\n you must give columName(dict key) = value(dict value) - all string type.\n e.g  dict = {\n                \"name\" = \"xxdbuser\",\n                \"age\"  = \"19\"\n                };\n object: model you want\n 通过包含有你的约束条件的字典、 通过表名称、 你所给的模型、 返回包含有若干模型的数组\n */\n- (NSArray *)selectWithSqlQueryDictionary: (NSDictionary *)sqlQueryDictionary\n                                tableName: (NSString *)tableName\n                                   model: (id)object;\n\n#pragma mark - errorMessage\n- (NSError*)errorWithMessage:(NSString*)message;\n@end\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilddylan%2Fxxdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwilddylan%2Fxxdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilddylan%2Fxxdb/lists"}