quick下使用sqlite

Skip to content

Add lsqlite3 into lua extensions #36

 Closed
 wants to merge 5 commits into   from 
+20,652 5,295 

3 participants

Ao Xu yulinho YuLei Liao
Ao Xu
aoxu commented  on 4 May 2013

Add lua sqlite 3 support into lua extensions.

details

  • LuaSQLite3 version 0.9.1 stable release
    lsqlite3 is a lua module of sqlite3. It requires sqlite3 library.
  • SQLite version 3.7.16.2 stable release

testing code

local sqlite3 = require("lsqlite3")

local db = sqlite3.open_memory()

db:exec[[
  CREATE TABLE test (id INTEGER PRIMARY KEY, content);

  INSERT INTO test VALUES (NULL, 'Hello World');
  INSERT INTO test VALUES (NULL, 'Hello Lua');
  INSERT INTO test VALUES (NULL, 'Hello Sqlite3')
]]

for row in db:nrows("SELECT * FROM test") do
    print(row.id, row.content)
end
YuLei Liao dualface referenced this pull request  on 5 May 2013
 Closed

本地持久化数据考虑sqlite? #33

Ao Xu
aoxu commented  on 14 Aug 2013

Memo: only tested for iOS, didn't tested for Android.

YuLei Liao dualface closed this  on 30 Oct 2013
yulinho
yulinho commented  on 20 Jul

tested for Android 2.3 and 4.3w,work fine.

Sign up for free  to join this conversation on GitHub. Already have an account?  Sign in to comment
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值