Table of Contents
- General purpose plugins
- Database plugins
- SQL formatter plugins
- Scripting languages plugins
- Exporting plugins
- Importing plugins
- Populating plugins
- Syntax highlighter plugins
- Data editor plugins
- Custom config widget plugins
General purpose plugins
Database plugins provide support for various SQLite database formats.
|Database plugin||Custom SQL functions||Custom collations||SQLite extensions||Encryption||BLOB support|
- (*) - BLOB support in SQLite 2 is limited, see possible issues.
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.
It doesn't support any encryption.
SQLiteStudio uses this plugin to store its own configuration.
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.
It enables support for SQLCipher databases in SQLiteStudio.
More details here.
Enables support for wxSQLite3 databases (part of wxWidgets). Home page of wxSQLite3: https://github.com/utelle/wxsqlite3.
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
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.
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:
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:
Function code that uses SQL as an implementation language can refer to input arguments using following placeholders:
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.
Implements Tcl scripting language support.
For more details see ScriptingTcl.
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;
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
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');
Imports data from CSV files.
See CsvImport for more details and usage examples.
This plugin imports certain parts of text using regular expression.
See RegExpImport for more details and usage examples.
Random text (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.
Supports SQL understood by SQLite 3 (which covers SQLite 2 as well).
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.