kevinzhourafael / activesqlite Goto Github PK
View Code? Open in Web Editor NEWActiveSQLite is an helper of SQLite.Swift. It can let you use SQLite.swift easily.
License: MIT License
ActiveSQLite is an helper of SQLite.Swift. It can let you use SQLite.swift easily.
License: MIT License
Hi,KevinZHouRafae
I use your framework like this
//获取Document目录
let documentPath = NSSearchPathForDirectoriesInDomains(FileManager.SearchPathDirectory.documentDirectory, FileManager.SearchPathDomainMask.userDomainMask, true).last! + "/model.sqlite"
print(documentPath)
ASConfigration.setDefaultDB(path: documentPath, name: "model.sqlite")
usrModel.name = "haha"
try! usrModel.save()
/////////// DBModel is the base class of my model
import UIKit
import ActiveSQLite
import HandyJSON
class DBModel:ASModel,HandyJSON {
required init(){}
}
but the project crashed when I was running
internal func noSavedProperties() -> [String]{
if type(of: self).isSaveDefaulttimestamp{ Thread 1: EXC_BAD_ACCESS (code=1, address=0x41a10074cd6d)
return transientTypes()
}else{
return transientTypes() + [type(of: self).CREATE_AT_KEY,type(of: self).UPDATE_AT_KEY]
}
}
How should I solve this problem?
Thanks very much!
How can i change primaryKey to string type?
ActiveSQLite (0.4.4) run model.delete(), log "[info]-ASProtocol+Query.swift[386]:delete() --> Delete AccountModel,id:1 success",
but no change in the table.
../Pods/ActiveSQLite/ActiveSQLite/Classes/DBModel+Query.swift:614:45: Call can throw, but it is not marked with 'try' and the error is not handled
.... fourteen problems
Hi everyone , I have a table and I want to insert an image with datatype Blob, It's seems I haven't seen anything about this topic.
Can I help me someone?
Hi KevinZhouRafael,
I would like to use an ORM in Swift to SQLite.swift, but the project that I am working there is encrypted with SQLCipher.
SQLite.swift framework I do it
let connect = try Connection("database.db")
try connect.key("password")
This project ActiveSQLite is there support?
Hi KevinZhouRafael,
Do you have any idea when will you finish the table relations?
Thanks
class DW_Chapter: ASModel{
var bookId: String = ""
var index: Int = 0
var siteId: String = ""
//设置表名
override class var nameOfTable: String{
return ""
}
}
我想重写nameOfTable时,根据bookId动态返回表名,这个有办法实现吗
Using 'ImplicitlyUnwrappedOptional' in this location is deprecated and will be removed in a future release; consider changing this to 'Optional' instead
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.