sqling

sqling Engine

Run PL/SQL on SQLite, DuckDB, or Postgres.

sqling Engine is a PL/SQL interpreter that does not need Oracle underneath it. Procedures, packages, cursors, exception handlers, collections, SQL/XML, SQL/JSON, row triggers, 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.

Current state: heavy testing underway. The surface here is what runs today; new SQL/XML and SQL/JSON members and more trigger shapes land weekly. Pilot users get fixes with their names on them.

Where this helps

What it accepts

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.

The CLI

For scripts and pipelines, sqling Engine ships as a signed Python wheel we provide under a licence agreement. Installing it drops a sqling command onto your PATH; from there the usage is standard.

# Run a script against an in-memory SQLite:
$ sqling script.sql

# Persist to a file, pick the DuckDB backend:
$ sqling -d app.db --engine duckdb 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;

Embed it

For a product that needs PL/SQL semantics in-process:

from sqling_engine import Interpreter          # exact module name
                                               # documented with the licence
db = Interpreter(database="app.db", 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?

Pilot licences, custom builds, and embedding support available for product teams and migration vendors. Contact Data Design Group.