This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

SQL server on Wiser
#1
Hello,

Would it be possible to host a light-weight SQL server on the LM instead of running 3rd party Hardware just for the DB?
1 Table with 2-3 fields/columns is all I need. It would make sorting values in sqript queries much easier than than LUA sccripting against KNX GA's I think.
Reply
#2
LM has SQLite built-in. Docs/examples: https://openrb.com/docs/db.htm
Just be careful not to overflow the database with data.
Reply
#3
Thanks, how can I create a new table and fields? Didn't find that in the docs.
Reply
#4
Table can be created like this. You will need some clean-up procedure otherwise the database size will keep increasing until it hits a hard limit and some parts of the system won't function properly anymore. For other SQL commands check this: https://sqlite.org/lang.html
Code:
db:query([[
  CREATE TABLE IF NOT EXISTS my_config (
    key TEXT PRIMARY KEY,
    value TEXT
  )
]])
Reply


Forum Jump: