Difference between revisions of "MQ2SQLite" - MMOBugs Wiki

(Created page with "{{Pluginbox |author=Knightly |version=1 |usesini=Yes |commands=/sqlite }} __TOC__ ==Description== This plugin allows you to interact with a SQLite database...")
 
 
Line 24: Line 24:
 
* <span class="highlight2">${sqlite.clear[QueryName]}</span> - Clears memory of the query results.
 
* <span class="highlight2">${sqlite.clear[QueryName]}</span> - Clears memory of the query results.
 
* <span class="highlight2">${sqlite.result[QueryName Row ColumnName]}</span> - String containing results (or Failed).
 
* <span class="highlight2">${sqlite.result[QueryName Row ColumnName]}</span> - String containing results (or Failed).
 +
  
 
Example: /echo ${sqlite.result[myquery 1 Name]}");
 
Example: /echo ${sqlite.result[myquery 1 Name]}");

Latest revision as of 03:13, 23 May 2020

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.