Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/lua/sqlite Remove, has been moved to share/examples/lua.



details:   https://anonhg.NetBSD.org/src/rev/86944d801fc7
branches:  trunk
changeset: 770393:86944d801fc7
user:      mbalmer <mbalmer%NetBSD.org@localhost>
date:      Sat Oct 15 13:02:24 2011 +0000

description:
Remove, has been moved to share/examples/lua.

diffstat:

 lib/lua/sqlite/test-sqlite.lua |  53 ------------------------------------------
 1 files changed, 0 insertions(+), 53 deletions(-)

diffs (57 lines):

diff -r 93fbac0dfbd4 -r 86944d801fc7 lib/lua/sqlite/test-sqlite.lua
--- a/lib/lua/sqlite/test-sqlite.lua    Sat Oct 15 13:00:59 2011 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-require 'sqlite'
-
-print('initialize sqlite')
-sqlite.initialize()
-
-print('this is sqlite ' .. sqlite.libversion() .. ' (' ..
-    sqlite.libversion_number() .. ')')
-print('sourceid ' .. sqlite.sourceid())
-
-db, state = sqlite.open('db.sqlite',
-    sqlite.OPEN_READWRITE + sqlite.OPEN_CREATE)
-
-if state ~= sqlite.OK then
-       print('db open failed')
-else
-       err = db:exec('create table test (name varchar(32))')
-
-       if err ~= sqlite.OK then
-               print('table creation failed')
-               print('error code ' .. db:errcode() .. ' msg ' .. db:errmsg())
-       end
-
-       db:exec("insert into test values('Balmer')")
-
-       stmt = db:prepare("insert into test values(:name)")
-
-       print('statement has ' .. stmt:bind_parameter_count() .. ' parameters')
-       print('param 1 name: ' .. stmt:bind_parameter_name(1))
-       print('param name is at index ' .. stmt:bind_parameter_index('name'))
-
-       stmt:bind(1, 'Hardmeier')
-       stmt:step()
-       stmt:reset()
-       stmt:bind(1, 'Keller')
-       stmt:step()
-       stmt:finalize()
-
-       s2 = db:prepare('select name from test')
-
-       while s2:step() == sqlite.ROW do
-               print('name = ' .. s2:column(1))
-       end
-       s2:finalize()
-
-       stmt = db:prepare('drop table testx')
-       stmt:step()
-       stmt:finalize()
-       db:close()
-end
-
-print('shutdown sqlite')
-sqlite.shutdown()
-



Home | Main Index | Thread Index | Old Index