开发者

Sqlite on IOS dataconnection

开发者 https://www.devze.com 2023-03-13 23:19 出处:网络
He Guys, Shou开发者_运维技巧ld I open the data connection to Sqlite every time I make a query? or is it possible to open the sqlite connection when the app opens and the connection stays open until t

He Guys,

Shou开发者_运维技巧ld I open the data connection to Sqlite every time I make a query? or is it possible to open the sqlite connection when the app opens and the connection stays open until the app exists?

Is this even a solution?


You shouldn't really be using SQLite directly at all. At least use FMDB. Given your apparent new-ness to development, I would recommend Core Data as it is extremely well supported in the OS and will lead to the fewest lines of code (when used correctly).

To answer your concrete question; no, generally, you do not open / close a connection with every single query.

0

精彩评论

暂无评论...
验证码 换一张
取 消