MQ2SQLite - MMOBugs Wiki

Revision as of 03:13, 23 May 2020 by Fry (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Plugin Info
Name MQ2SQLite
Version 1
Author Knightly
Commands /sqlite
Uses INI File Yes

Description

This plugin allows you to interact with a SQLite database. A SQLite database is just a file that can be accessed using SQL commands. This plugin gives you access to the SQLite API and adds a TLO for viewing the results.

Since the results of the query are stored in memory, this can take up a lot of memory if you use unique query names and do not clear your results from memory. So, don't do that. Be sure to use the .clear function when you're done accessing the results or continue to use the same name for your query which will clear the results for you before each run.

Commands

  • /sqlite <"Path to Database File"> <QueryName> QUERY - Example: /sqlite "C:\Test.db\" myquery SELECT * FROM Table;")<


TLO's

  • ${sqlite.status[QueryName]} - String - Current status - Either Active, Success, or Failed.
  • ${sqlite.rows[QueryName]} - Int - The number of rows returned for results.
  • ${sqlite.clear[QueryName]} - Clears memory of the query results.
  • ${sqlite.result[QueryName Row ColumnName]} - String containing results (or Failed).


Example: /echo ${sqlite.result[myquery 1 Name]}");


Availability

This plugin is included with the MMOBugs Compile.