SQLing Engine
Run PL/SQL on SQLite, DuckDB, Postgres, or MariaDB.
SQLing Engine is a PL/SQL interpreter that does not need
Oracle underneath it. Procedures, packages, cursors, exception handlers,
collections, object types, triggers, SQL/XML, SQL/JSON and the
(+) outer-join notation all accepted — because the interpreter implements
PL/SQL itself and translates the embedded SQL to whichever backend you
hand it.
Where this helps
-
CI without an Oracle box
PL/SQL regression tests that need an Oracle instance block every feature branch waiting for a slot. SQLing Engine runs them in-process on a developer laptop or a CI worker — same packages, same cursors, same trigger lifecycle, no licensing drama.
-
Migration pipelines
You are translating a legacy schema to Postgres and need to verify that the stored functions still behave. The
--rewrite postgresflag emits the exact SQL text your target would see; the embedded interpreter runs the surrounding PL/SQL against SQLite in a test harness. -
MariaDB, in its Oracle mode
On MariaDB, SQLing Engine runs the server in its Oracle compatibility mode and translates what that mode still lacks. Stored functions, package functions and row-level triggers become native MariaDB objects, so reports and other clients that connect directly call them too. An application spread over several schemas keeps each one in a database of its own.
-
Embeddable PL/SQL
Oracle Reports and Oracle Forms are built on PL/SQL. If you are writing a reader for either (or anything else that needs PL/SQL semantics in a non-Oracle context), SQLing Engine is the piece you plug in instead of writing one.
What it accepts
-
The PL/SQL language
Anonymous blocks, packages and bodies, standalone procedures and functions, cursors (explicit and implicit),
FOR ... INloops, collections (VARRAY, nested table, index-by table), exception handlers (named andSQLCODE-based), records and%ROWTYPE, object types with their methods, overloading, autonomous transactions,PIPELINEDfunctions,FORALLandBULK COLLECT,EXECUTE IMMEDIATEandDBMS_SQL. -
Oracle's SQL surface
SQL/XML (
XMLELEMENT,XMLAGG,XMLATTRIBUTES,EXTRACTVALUE), SQL/JSON (JSON_OBJECT,JSON_ARRAYAGG,JSON_TABLE,JSON_VALUE, …),MERGE,CONNECT BY,(+)outer joins, hierarchical cursors, analytic functions. Your own PL/SQL functions are callable from SQL —SELECT my_function(col) FROM t— on SQLite, Postgres and MariaDB. -
Oracle's command surface
CREATE OR REPLACEfor procedures, functions, packages, views, triggers, sequences, directories;GRANT/REVOKEfor the DBA_* dictionary; row triggers with:NEW/:OLDand statement triggers, onINSERT,UPDATEandDELETE;SET SERVEROUTPUT,SET SQLFORMAT,SET DEFINE,SPOOL.
What it does not do
- Call a PL/SQL function from SQL on DuckDB; compute the value in PL/SQL and bind it instead. The other three engines do this.
- The
MODELclause. - Batch a
FORALLinto one round trip: it runs one statement per element, with the same results. - Less common Oracle-only SQL syntax: SQL runs on the underlying database, with the common Oracle forms translated on top.
Try it right now
PL/SQL Playground loads SQLing Engine into your
browser and runs PL/SQL against SQLite or Postgres (pgLite) —
in your own tab, nothing uploaded. The
Translate button there is the same rewrite surface the CLI
exposes as --rewrite BACKEND: PL/SQL in, target-dialect
SQL out. Several examples (quick start, the language tour, SQL
cursors and transactions, SET SQLFORMAT, HTP web pages, SQL/XML and
SQL/JSON) are preloaded.
Open the Playground — free, no sign-in. The engine is open source: sqling-com/sqlingpl (MIT).
Point it at your own database
Database Workbench looks like a SQLite browser —
object tree on the left, a worksheet in the middle, a results grid
at the bottom — and the worksheet is SQLing Engine. Open
a .db file in your tab and run packages, cursors,
FOR UPDATE loops, (+) outer joins,
MERGE, SQL/XML and SQL/JSON against the real rows
inside it. The data stays local the whole time — your
.db never leaves the browser.
The Translate button shows what each statement would
look like against Postgres or DuckDB — the same dry-run rewrite
the CLI exposes as --rewrite BACKEND, so you can
preview the migration output next to the SQL you already have.
The CLI
For scripts and pipelines, install SQLing Engine from PyPI. It is
open source (MIT) and needs nothing beyond Python 3.9; the extras add
the drivers for the other databases. Installing it puts a
sqling command on your PATH; from there the
usage is standard.
$ pip install sqlingpl # SQLite only $ pip install "sqlingpl[duckdb]" # or [postgres], [mariadb]
# Run a script against an in-memory SQLite:
$ sqling script.sql
# Persist to a file, pick the DuckDB backend:
$ sqling -d app.duckdb --engine duckdb script.sql
# Run against MariaDB, in its Oracle compatibility mode:
$ sqling --engine mariadb -d mariadb://app_user@db-host/app script.sql
# Translate PL/SQL to the backend you plan to migrate to:
$ sqling --rewrite postgres -c "SELECT NVL(x,0), DECODE(c,1,'one','other') FROM t"
SELECT COALESCE(x, 0), CASE WHEN (c) IS NOT DISTINCT FROM (1) THEN ('one') ELSE ('other') END FROM t;
Source, documentation and examples: github.com/sqling-com/sqlingpl · PyPI.
Embed it
For a product that needs PL/SQL semantics in-process:
from sqlingpl import Interpreter
db = Interpreter(database="app.sqlite", capture_output=True)
db.run_source(open("procs.sql").read())
total = db.call("order_total", 1234)
for line in db.take_output():
log.info(line)
Point it at an existing driver connection with
Interpreter(connection=my_conn) and PL/SQL shares the
transaction with the host app.
Running PL/SQL where Oracle isn't an option?
The engine is free and open source. Custom builds and migration work are available for product teams and migration vendors. Contact us.