- 授权协议: GPL
- 开发语言: Objective-C
- 操作系统: 跨平台
- 软件首页: https://github.com/TonyReet/AutoSQLite.swift
- 软件文档: https://github.com/TonyReet/AutoSQLite.swift/blob/master/README.md
- 官方下载: https://github.com/TonyReet/AutoSQLite.swift
软件介绍
SQLite.swift的封装,使用swift的反射原理,Model直接存储.获取. 无需再转换,增删改查. 脱离sql语句,不需要添加相关的绑定操作,直接完成转换。
使用方法
1、引入source目录下的文件文件:
SQLiteModel.swift SQLiteDataBase.swift SQLiteDataBaseTool.swift SQLMirrorModel.swift SQLPropertyModel.swift 创建model继承SQLiteModel即可
2、使用以下方法
// 创建dataBase,
var manager = SQLiteDataBase.createDB("testDataBaseName")// 插入 manager.insert(object: testModel, intoTable: "testTableName") 或者 SQLiteDataBase.insert(object: testModel, intoTable: "testTableName")
// 删除 manager.delete(testModel, fromTable: "testTableName") 或者 SQLiteDataBase.deleteModel(testModel, fromTable: "testTableName")
// 更新 testModel.name = "Reet" manager.update(testModel, fromTable: "testTableName") 或者 SQLiteDataBase.update(testModel, fromTable: "testTableName")
// 查询
guard let results = manager.select(testModel, fromTable: "testTableName") else {
print("没有查询到数据")
return
}
for result in results {
print("查询的数据\(result)")
}
或者
let results = SQLiteDataBase.select(testModel, fromTable: "testTableName")
if results.count > 0{
for result in results {
print("查询的数据\(result)")
}
}else {
print("没有查询到数据")
}
Effective C++
[美]Scott Meyers / 侯捷 / 电子工业出版社 / 2006-7 / 58.00元
《Effective C++:改善程序与设计的55个具体做法》(中文版)(第3版)一共组织55个准则,每一条准则描述一个编写出更好的C++的方式。每一个条款的背后都有具体范例支撑。第三版有一半以上的篇幅是崭新内容,包括讨论资源管理和模板(templates)运用的两个新章。为反映出现代设计考虑,对第二版论题做了广泛的修订,包括异常(exceptions)、设计模式(design patterns)......一起来看看 《Effective C++》 这本书的介绍吧!
