Author Topic: LuaSQLite3 0.8  (Read 3868 times)

0 Members and 1 Guest are viewing this topic.

Offline PPK

  • Administrator
  • Emperor
  • *****
  • Posts: 1 481
  • Karma: +209/-22
  • PtokaX developer
LuaSQLite3 0.8
« on: 09 September, 2011, 09:09:23 »
LuaSQLite3 with SQLite 3.7.7.1 for PtokaX 0.4.1.2 build 240 and higher (Lua 5.1.4 only).

Homepage: http://lua.sqlite.org/

Binary: http://www.PtokaX.org/files/Libs-240/LuaSQLite3-0.8-sqlite-3.7.7.1.7z
Binary x64: http://www.PtokaX.org/files/Libs-240/LuaSQLite3-0.8-sqlite-3.7.7.1-x64.7z

Source: http://www.PtokaX.org/files/Libs-240/LuaSQLite3-0.8-sqlite-3.7.7.1-src.7z

Initializing:
Code: [Select]
require "lsqlite3"

This will register global sqlite3, more is in docs 8)
« Last Edit: 06 May, 2012, 13:46:20 by PPK »
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

PtokaX forum

LuaSQLite3 0.8
« on: 09 September, 2011, 09:09:23 »

Offline whitestatic

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
Re: LuaSQLite3 0.8
« Reply #1 on: 01 February, 2012, 05:03:53 »
Is there any chance somebody could build a copy of this with FTS3 & FTS4 support? (http://www.sqlite.org/fts3.html#section_2)

Offline whitestatic

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
Re: LuaSQLite3 0.8
« Reply #2 on: 01 February, 2012, 07:31:34 »
Just gave it a go myself and failed miserably. Used the sources from http://forum.ptokax.org/index.php?topic=8849.0 to generate the PXLua.lib file to compile LuaSQLite against. Everything compiled OK but I could not require() it from a LUA script (the DLL in the first post works fine for this script). It complained about PXLua.dll missing an entry point for create_metatable or some such function. So I replaced the PXLua.dll in the PtokaX folder with the one I had compiled from the sources, but then PtokaX failed to start.

If somebody who actually knew what they were doing could compile this that would be awesome.

I'm running PtokaX version 0.4.2.0 (build 241) if that makes a difference.

Offline PPK

  • Administrator
  • Emperor
  • *****
  • Posts: 1 481
  • Karma: +209/-22
  • PtokaX developer
Re: LuaSQLite3 0.8
« Reply #3 on: 01 February, 2012, 10:19:58 »
Updated LuaSQLite3 with SQLite 3.7.10 and enabled FTS3 & FTS4 for PtokaX 0.4.1.2 build 240 and higher (Lua 5.1.4 only).

Homepage: http://lua.sqlite.org/

Binary: http://www.PtokaX.org/files/Libs-240/LuaSQLite3-0.8-sqlite-3.7.10.7z
Binary x64: http://www.PtokaX.org/files/Libs-240/LuaSQLite3-0.8-sqlite-3.7.10-x64.7z

Source: http://www.PtokaX.org/files/Libs-240/LuaSQLite3-0.8-sqlite-3.7.10-src.7z
« Last Edit: 06 May, 2012, 13:46:33 by PPK »
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

Offline PPK

  • Administrator
  • Emperor
  • *****
  • Posts: 1 481
  • Karma: +209/-22
  • PtokaX developer
Re: LuaSQLite3 0.8
« Reply #4 on: 01 February, 2012, 10:24:11 »
Used the sources from http://forum.ptokax.org/index.php?topic=8849.0 to generate the PXLua.lib file to compile LuaSQLite against.
PXLua.lib in that archive, you don't need to generate it ;)
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

Offline whitestatic

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
Re: LuaSQLite3 0.8
« Reply #5 on: 02 February, 2012, 01:14:00 »
Thats awesome, thanks. I've just had a play with it and it works beautifully :).

PXLua.lib in that archive, you don't need to generate it ;)

I tried linking with that, but it failed to build - complained about a number of unknown Lua functions. Hence why I tried building my own. Not sure what was going on there ????

Thanks for all your work.
« Last Edit: 02 February, 2012, 14:24:52 by PPK »

Offline PPK

  • Administrator
  • Emperor
  • *****
  • Posts: 1 481
  • Karma: +209/-22
  • PtokaX developer
Re: LuaSQLite3 0.8
« Reply #6 on: 02 February, 2012, 14:25:29 »
Maybe you used different compiler or some different compiler configuration :-X
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

Offline PPK

  • Administrator
  • Emperor
  • *****
  • Posts: 1 481
  • Karma: +209/-22
  • PtokaX developer
Re: LuaSQLite3 0.8
« Reply #7 on: 01 April, 2012, 10:29:24 »
New version for PtokaX 0.4.2.0 build 376 and higher.

Binary: http://www.PtokaX.org/files/Libs-376/LuaSQLite3-0.8-sqlite-3.7.11.7z
Binary x64: http://www.PtokaX.org/files/Libs-376/LuaSQLite3-0.8-sqlite-3.7.11-x64.7z
Source: http://www.PtokaX.org/files/Libs-376/LuaSQLite3-0.8-sqlite-3.7.11-src.tar.gz

This lib is compatible with PXLua 5.1.5, 5.2.0 and 5.2.1 ;)

Update 8/May/2012:
  • Fixed: With Lua 5.2 lib now remain on top of stack after require, to restore Lua 5.1 behavior where lib was possible to load like local sqlite3 = require "lsqlite3"
  • Changed: Source is now packed with tar.gz to make it more friendly with non-windows OS ;)
« Last Edit: 17 June, 2012, 18:16:17 by PPK »
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

PtokaX forum

Re: LuaSQLite3 0.8
« Reply #7 on: 01 April, 2012, 10:29:24 »