Skip to content

Official_plugins

Paweł Salawa edited this page Jul 19, 2018 · 4 revisions

Table of Contents

General purpose plugins

Database plugins

Database plugins provide support for various SQLite database formats.

Database plugin Custom SQL functions Custom collations SQLite extensions Encryption BLOB support
DbSqlite3 yes yes yes no yes
DbSqlite2 no no no no yes (*)
DbSqliteCipher yes yes yes yes yes
DbSqliteWx yes yes yes yes yes
DbSqliteSystemData yes yes yes yes yes
DbAndroid no no no no yes

DbSqlite3 (built-in)

This is a default plugin (that's why it's built-in) for databases. It always provides support for the most recent, official SQLite3 version.

Binary distributions of SQLiteStudio also have some SQLite extensions built in (currently only FTS in versions 1, 2, 3 and 4).

It doesn't support any encryption.

SQLiteStudio uses this plugin to store its own configuration.

DbSqlite2

Enables support for an old SQLite 2. It comes with SQLite 2.8.17 on board.

Compilation notes: If you're compiling this plugin by yourself, be aware that it assumes that the SQLite 2 library was compiled with UTF-8 support.

DbSqliteCipher

It enables support for SQLCipher databases in SQLiteStudio.

More details here.

DbSqliteWx

Enables support for wxSQLite3 databases (part of wxWidgets). Home page of wxSQLite3: https://github.com/utelle/wxsqlite3.

DbSqliteSystemData

Enables support for System.Data.SQLite databases. This plugin is available only under Windows, because it relies on Windows API. Home page of System.Data.SQLite is https://system.data.sqlite.org/index.html/doc/trunk/www/index.wiki

DbAndroid

It enables SQLiteStudio to access SQLite databases directly on the Android device. No need to pull and push database files. All queries and changes are executed directly on the device.

More details here.

SQL formatter plugins

SQL formatter plugins are used by the SQL formater service in SQLiteStudio to format SQL statements in text input fields that are used to display SQL. That includes SQL Editor, View window, Trigger Dialog and many more.

These plugins can provide their own configuration options available in Configuration Dialog, under Plugins -> SQL Formatting -> PluginName.

SimpleFormatter

Simple formatter is more for an example (for developers) of how the formatter plugins work and how to implement them. It has very little of configuration options and doesn't provide much of a formatting. It basicly can uppercase keywords and reduce multiple whitespace characters into single one (excluding whitespaces in string values).

Scripting languages plugins

Scripting languages plugins are used in various ways across the application. Using provided scripting languages you can implement:

QtScript (built-in)

QtScript implements ECMAScript language, which is pretty much what JavaScript is. For more details see ScriptingQt.

SQL (built-in)

SQL scripting plugin is a very limited one. Its main purpose was to allow writing kind of procedures (since SQLite lacks procuders), using custom SQL functions. One would implement custom SQL function with SQL scripting plugin, put various SQL statements in the implementation and then execute such "procedure" with: SELECT my_procedure(arg1, arg2).

Function code that uses SQL as an implementation language can refer to input arguments using following placeholders:

  • :argName
  • @argName
  • $argName

For example if you implement function, that have 2 input arguments named "primary_id" and "secondary_id", you can write query like:

DELETE FROM some_table WHERE pr_id = @primary_id AND sec_id = :secondary_id;

Using SQL scripting plugin is allowed in any other contexts, where scritping plugins are used (obviously), but SQL is not really a programming language, so it's not a good candidate for using it anywhere else.

Tcl

Implements Tcl scripting language support.

For more details see ScriptingTcl.

Exporting plugins

SQL

Using this plugin you can make a dump of the entire database (or only some of its elements) into SQL file, which can be later executed on any database, to recreate the exactly same objects and data. You can also export results of a query, which can be later imported (executed) into other database. Files created by this plugin look more or less like this:

CREATE TABLE table1 (id INTEGER, val TEXT);
INSERT INTO table1 (id, val) VALUES (1, 'abc');
INSERT INTO table1 (id, val) VALUES (2, 'xyz');
INSERT INTO table1 (id, val) VALUES (3, 'qwerty');
CREATE INDEX idx1 ON table1 (id);
CREATE VIEW view1 AS SELECT val FROM table1 WHERE id > 2;

CSV

PDF

HTML

JSON

XML

Importing plugins

Importing plugins are usually used from Import Dialog window. However they also can be used by executing a SELECT query on the import() function, like in the example below:

SELECT import('c:/test.csv', 'CSV', 'my_table1', 'UTF-8', 'CsvImport.Separator=1');

This will perform importing from the C:/test.csv file, using CSV plugin and the data will be put into my_table1 table. UTF-8 will be used as charset for reading data from input file. The last argument (plugin options) depends on importing plugin used and is different, depending on the plugin chosen. Detailed description of each plugin below contains also a set of options that can be put into the last argument.

Complete list of options supported by any importing plugin can be learned by executing SELECT import_options('CSV').

If you'd like to provide more than one option at single import() call, then put each option in a new line, like this:

SELECT import('c:/test.csv', 'CSV', 'my_table1', 'UTF-8', 'CsvImport.Separator=1
CsvImport.FirstRowAsColumns=true');

CSV

Imports data from CSV files.

See CsvImport for more details and usage examples.

RegExp

This plugin imports certain parts of text using regular expression.

See RegExpImport for more details and usage examples.

Populating plugins

Constant (built-in)

Random (built-in)

Random text (built-in)

Sequence (built-in)

Script (built-in)

Dictionary (built-in)

Syntax highlighter plugins

Syntax highlighter plugins are used in any input text field that displays some code. Examples of such fields is SQL Editor, Custom SQL functions window, Custom collations window, etc.

SqliteHighlighter (built-in)

Supports SQL understood by SQLite 3 (which covers SQLite 2 as well).

QtScriptHighlighter (built-in)

Supports QtScript, which is more or less the same as JavaScript (aka ECMAScript).

Data editor plugins

Data editor plugins provide widgets for editing specific data formats. For example it is handy to edit a numbers in a spinbox, or a date in a calendar widget. For simple types there are several editors built into SQLiteStudio. Data editor plugins can provide additional widgets to support more specialized data formats, like displaying image, highlight programming lanugage source code, etc.

Custom config widget plugins

These plugins only matter to developers. Regular users won't see anything added by these plugins.

Since SQLiteStudio provides easy way for binding configuration to widgets on UI forms, some of configuration options might require unusual handling by complex widgets. Custom config widgets provide logic for how to handle those config options using widget provided on UI form. More details in developers manual.

You can’t perform that action at this time.