Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 59 additions & 2 deletions plugins/PLUGIN_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,14 @@ The manifest tells Tabularis everything about your plugin.
| `schemas` | bool | `true` if the database supports named schemas (like PostgreSQL). Controls whether the schema selector is shown in the UI. |
| `views` | bool | `true` if the database supports views. Enables the views section in the explorer. |
| `routines` | bool | `true` if the database supports stored procedures/functions. |
| `triggers` | bool | `true` if the database supports triggers. Enables trigger-related UI for drivers that implement the trigger RPCs. |
| `file_based` | bool | `true` for local file databases (e.g., SQLite, DuckDB). Replaces host/port with a file path input in the connection form. |
| `folder_based` | bool | `true` for plugins that connect to a directory rather than a single file (e.g. CSV plugin). Replaces host/port with a folder picker. |
| `no_connection_required` | bool | `true` for API-based plugins that need no host, port, or credentials (e.g. a public REST API). Hides the entire connection form — the user only fills in the connection name. |
| `connection_string` | bool | Set `false` to hide the connection string import UI for this driver. Defaults to `true` for network drivers. `file_based` and `folder_based` drivers skip the import UI automatically regardless of this flag. |
| `connection_string_example` | string | Optional placeholder example shown in the connection string import field (e.g. `"clickhouse://user:pass@localhost:9000/db"`). Also accepted as camelCase `connectionStringExample`. |
| `identifier_quote` | string | Character used to quote SQL identifiers. Use `"\""` for ANSI standard or `` "`" `` for MySQL style. |
| `sql_dialect` | string | Optional statement-splitting dialect: `postgres`, `mysql`, `mssql`, `sqlite`, `oracle`, or `generic`. Oracle-like plugins, including DM/Dameng, should use `"oracle"`. |
| `alter_primary_key` | bool | `true` if the database supports altering primary keys after table creation. |
| `manage_tables` | bool | `true` to enable table and column management UI (Create Table, Add/Modify/Drop Column, Drop Table). Does not control index or FK operations. Defaults to `true`. |
| `readonly` | bool | When `true`, the driver is read-only: all data modification operations (INSERT, UPDATE, DELETE) are disabled in the UI. The add/delete row buttons, inline cell editing, and context menu edit actions are hidden. Table and column management is also hidden regardless of `manage_tables`. Defaults to `false`. |
Expand Down Expand Up @@ -640,8 +642,8 @@ Get column information for a table.
"name": "id",
"data_type": "INTEGER",
"is_nullable": false,
"column_default": null,
"is_primary_key": true,
"default_value": null,
"is_pk": true,
"is_auto_increment": true,
"comment": null
}
Expand Down Expand Up @@ -798,6 +800,61 @@ Get the SQL body of a stored routine.

---

### Triggers

Set `capabilities.triggers` to `true` when your driver implements the trigger RPCs. Tabularis uses this flag to show trigger-related UI.

#### `get_triggers`

List triggers in a schema/database.

**Params:** `{ "params": ConnectionParams, "schema": string | null }`

**Result:**
```json
[
{
"name": "users_audit_trg",
"table_name": "users",
"event": "INSERT OR UPDATE",
"timing": "AFTER",
"definition": "CREATE TRIGGER users_audit_trg ..."
}
]
```

---

#### `get_trigger_definition`

Get the SQL definition of a trigger.

**Params:** `{ "params": ConnectionParams, "schema": string | null, "trigger_name": string, "table_name": string }`

**Result:** `"CREATE TRIGGER users_audit_trg ..."`

---

#### `create_trigger`

Create a trigger from SQL generated by the UI or entered in raw SQL mode.

**Params:** `{ "params": ConnectionParams, "schema": string | null, "trigger_sql": string }`

**Result:** `null` on success, or an error.

---

#### `drop_trigger`

Drop a trigger.

**Params:** `{ "params": ConnectionParams, "schema": string | null, "trigger_name": string, "table_name": string }`

**Result:** `null` on success, or an error.

---

### Query Execution

#### `execute_query`
Expand Down
11 changes: 11 additions & 0 deletions plugins/manifest.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@
"type": "boolean",
"description": "true to enable stored procedures and functions in the database explorer."
},
"triggers": {
"type": "boolean",
"default": false,
"description": "true if the driver supports trigger metadata and trigger management RPCs."
},
"file_based": {
"type": "boolean",
"description": "true for local file databases (e.g. SQLite, DuckDB). Replaces the host/port fields with a file path input."
Expand Down Expand Up @@ -109,6 +114,12 @@
"enum": ["\"", "`"],
"description": "Character used to quote SQL identifiers: double-quote for ANSI SQL, backtick for MySQL-style."
},
"sql_dialect": {
"type": "string",
"enum": ["postgres", "mysql", "mssql", "sqlite", "oracle", "generic"],
"default": "postgres",
"description": "SQL dialect used by Tabularis for statement splitting and query classification. Oracle-like plugins can use oracle."
},
"alter_primary_key": {
"type": "boolean",
"description": "true if the database supports altering primary keys after table creation."
Expand Down