diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-09-01 20:11:41 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-09-01 20:11:41 +0200 |
commit | 7a738fba4cc14b31b0d9a3a88258e76de34ea1fb (patch) | |
tree | 5b4195a92400965fd8510c1695845932c01f5678 /doc/context/sources/general/manuals/sql | |
parent | ad968343b10553bbf9d34e14e00a756576d5758e (diff) | |
download | context-7a738fba4cc14b31b0d9a3a88258e76de34ea1fb.tar.gz |
2016-09-01 19:38:00
Diffstat (limited to 'doc/context/sources/general/manuals/sql')
-rw-r--r-- | doc/context/sources/general/manuals/sql/sql-mkiv.tex | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/doc/context/sources/general/manuals/sql/sql-mkiv.tex b/doc/context/sources/general/manuals/sql/sql-mkiv.tex index ec2c999aa..1b05c8738 100644 --- a/doc/context/sources/general/manuals/sql/sql-mkiv.tex +++ b/doc/context/sources/general/manuals/sql/sql-mkiv.tex @@ -93,7 +93,7 @@ least currently) no \TEX\ interface. The examples shown here work in \CONTEXT, but you need to keep in mind that \LUA\ scripts can also use this interface. {\em Although this code is under construction the interfaces are unlikely to -change, if only because we use it on production.} +change, if only because we use it in production.} \stopsection @@ -135,6 +135,15 @@ and then load it as follows: local presets = table.load("presets.lua") \stoptyping +A \type {sqlite} database has a much simpler preset. The default suffix of the +file is \type {db}. The other fields are just ignored. + +\starttyping +return { + database = "test", +} +\stoptyping + If you really want, you can use some library to open a connection, execute a query, collect results and close the connection, but here we use just one function that does it all. The presets are used to access the database and the @@ -232,7 +241,7 @@ local data, keys = utilities.sql.execute { presets = presets, template = template, variables = { - artist = "Dream Theater", + artist = "Porcupine Tree", }, } \stoptyping |