History log of /netbsd-current/share/examples/lua/sqlite.lua
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.4 10-May-2017 mbalmer

Fix flags for DB open.


Revision tags: prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.3 08-Dec-2015 kamil

Correct mistakes in the sqlite.lua example

Changes:
- The open flag: sqlite.OPEN_CREATE will open the DB for reading and
writing, adding sqlite.OPEN_READWRITE to sqlite.OPEN_CREATE will cause
the DB to not be created and prevent the script from continuing
- When using stmt:bind_parameter_index() the parameter needs to be
prefixed with ':' if that was used in the prepared statement,
otherwise the incorrect index of 0 is returned.
- The drop table statement has an "x" appended to the table name, looks
like a typo.

Patch by Travis Paul

Closes PR misc/50493


Revision tags: netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base tls-earlyentropy-base tls-maxphys-base
# 1.2 19-Jul-2014 lneto

lua: updated from 5.1 to 5.3 work3

* lua(1):
- changed lua_Integer to intmax_t
- updated distrib/sets/lists and etc/mtree
- updated bsd.lua.mk
- fixed bozohttpd (lua-bozo.c)
- compatibilized bindings: gpio, sqlite
* lua(4):
- removed floating-point and libc dependencies using '#ifndef _KERNEL'
- fixed division by zero and exponentiation
- libkern: added isalnum(), iscntrl(), isgraph(), isprint() and ispunct()
- acpica: removed isprint() from acnetbsd.h
- libc: moved strcspn.c, strpbrk.c and strspn.c to common
- removed stub headers
- compatibilized bindings: luapmf, luasystm
* reorganized luaconf.h
* updated doc/CHANGES and doc/RESPONSIBLE


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE yamt-pagecache-base9 yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.1 15-Oct-2011 mbalmer

branches: 1.1.8; 1.1.18;
Example files showing Lua module usage.


Revision tags: pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.3 08-Dec-2015 kamil

Correct mistakes in the sqlite.lua example

Changes:
- The open flag: sqlite.OPEN_CREATE will open the DB for reading and
writing, adding sqlite.OPEN_READWRITE to sqlite.OPEN_CREATE will cause
the DB to not be created and prevent the script from continuing
- When using stmt:bind_parameter_index() the parameter needs to be
prefixed with ':' if that was used in the prepared statement,
otherwise the incorrect index of 0 is returned.
- The drop table statement has an "x" appended to the table name, looks
like a typo.

Patch by Travis Paul

Closes PR misc/50493


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base tls-earlyentropy-base tls-maxphys-base
# 1.2 19-Jul-2014 lneto

lua: updated from 5.1 to 5.3 work3

* lua(1):
- changed lua_Integer to intmax_t
- updated distrib/sets/lists and etc/mtree
- updated bsd.lua.mk
- fixed bozohttpd (lua-bozo.c)
- compatibilized bindings: gpio, sqlite
* lua(4):
- removed floating-point and libc dependencies using '#ifndef _KERNEL'
- fixed division by zero and exponentiation
- libkern: added isalnum(), iscntrl(), isgraph(), isprint() and ispunct()
- acpica: removed isprint() from acnetbsd.h
- libc: moved strcspn.c, strpbrk.c and strspn.c to common
- removed stub headers
- compatibilized bindings: luapmf, luasystm
* reorganized luaconf.h
* updated doc/CHANGES and doc/RESPONSIBLE


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE yamt-pagecache-base9 yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.1 15-Oct-2011 mbalmer

branches: 1.1.8; 1.1.18;
Example files showing Lua module usage.