DDSQLiteKit
An ORM kit of object persistence use SQLite
Install / Use
/learn @openboy2012/DDSQLiteKitREADME
DDSQLiteKit
An ORM kit of object persistence use SQLite
##SQLitePersistentObject
SQLitePersistentObject is an ORM Kit Write by Jeff LaMarche, it's excellent.
Any class that subclasses this class can have their properties automatically persisted into a sqlite database. There are some limits - currently certain property types aren't supported like void *, char *, structs and unions. Anything that doesn't work correctly with Key Value Coding will not work with this. Ordinary scalars (ints, floats, etc) will be converted to NSNumber, as will BOOL.
SQLite is very good about converting types, so you can search on a number field passing in a number in a string, and can search on a string field by passing in a number. The only limitation we place on the search methods is that we don't allow searching on blobs, which is simply for performance reasons.
but now, Jeff not work on this library. so I will work on this library. in original this library is non-safe-thread in multithread opearations , I just make it thread-safe in multithread use some new methods
##Installation

SQLitePersisentObject is available through CocoaPods, to install
it simply add the following line to your Podfile:
pod "SQLitePersistentObject"
Alternatively, you can just drag the files from SQLitePersistentObject / SQLitePersistentObject into your own project.
Usage
create an object inherit SQLitePersistentObject
header file:
#import "SQLitePersistentObject.h"
@interface Device : SQLitePersistentObject
@property (nonatomic, copy) NSString *name;
@property (nonatomic, copy) NSString *model;
@property (nonatomic, strong) NSNumber *price;
@end
implementation file:
#import "Device.h"
@implementation Device
@end
Methods
#pragma mark - DeJohn Dong Added Methods
/**
* Asynchronous add/update an object to db.
*/
- (void)save;
/**
* Asynchronous delete an object from db.
*/
- (void)asynDeleteObject;
/**
* Asynchronous delete an object and the cascade objects from db.
*/
- (void)asynDeleteObjectCascade:(BOOL)cascade;
/**
* Asynchronous Query the object list with criteria from db.
*
* @param criteria criteria string
* @param result result list
*/
+ (void)queryByCriteria:(NSString *)criteria result:(DBQueryResult)result;
/**
* Asynchronous Query the first object with criteria from db
*
* @param criteria criteria string
* @param result result object
*/
+ (void)queryFirstItemByCriteria:(NSString *)criteria result:(DBQueryResult)result;
/**
* Asynchronous Query all the objects from db
*
* @param result result list
*/
+ (void)queryResult:(DBQueryResult)result;
Requirements
- Xcode 6
- iOS 5.1.1 or Mac OSX 10.8
Author
Jeff LaMarche jeff_Lamarche@mac.com / DeJohn Dong, dongjia_9251@126.com
License
SQLitePersistentObject is available under the MIT license. See the LICENSE file for more info.
Related Skills
feishu-drive
339.5k|
things-mac
339.5kManage Things 3 via the `things` CLI on macOS (add/update projects+todos via URL scheme; read/search/list from the local Things database)
clawhub
339.5kUse the ClawHub CLI to search, install, update, and publish agent skills from clawhub.com
yu-ai-agent
2.0k编程导航 2025 年 AI 开发实战新项目,基于 Spring Boot 3 + Java 21 + Spring AI 构建 AI 恋爱大师应用和 ReAct 模式自主规划智能体YuManus,覆盖 AI 大模型接入、Spring AI 核心特性、Prompt 工程和优化、RAG 检索增强、向量数据库、Tool Calling 工具调用、MCP 模型上下文协议、AI Agent 开发(Manas Java 实现)、Cursor AI 工具等核心知识。用一套教程将程序员必知必会的 AI 技术一网打尽,帮你成为 AI 时代企业的香饽饽,给你的简历和求职大幅增加竞争力。
