Initial Release
Query InterSystems IRIS tables from Supabase as if they were local Postgres tables.
┌─── Supabase (Postgres) ───┐ ┌─── InterSystems IRIS ───┐
│ wrappers → Wasm runtime │ HTTP │ iris-fdw-gateway │
│ └─ iris_fdw.wasm (Rust) ├────────►│ └─ Dynamic SQL ─► DB │
└────────────────────────────┘ JSON └─────────────────────────┘
| Component | Language | Description |
|---|---|---|
iris-fdw-wasm/ |
Rust → WebAssembly | FDW package, runs inside Supabase Wrappers |
iris-fdw-gateway/ |
ObjectScript | REST gateway that executes SQL on IRIS |
On your IRIS instance:
zpm "install iris-fdw-gateway"
Or manually: import IrisFdw.Gateway.Handler.cls and set up the web application at /iris-fdw/v1.
Create a dedicated user:
Set user = ##class(Security.Users).Create("fdw_user", "%All", "your-password")
Grant table access:
GRANT SELECT, INSERT, UPDATE, DELETE ON Demo.Patient TO fdw_user;
-- Enable Wrappers create extension if not exists wrappers with schema extensions; create foreign data wrapper wasm_wrapper handler wasm_fdw_handler validator wasm_fdw_validator;-- Create IRIS server create server iris_server foreign data wrapper wasm_wrapper options ( fdw_package_url 'https://github.com//iris-supabase-fdw/releases/download/v0.1.0/iris_fdw.wasm', fdw_package_name 'iris:iris-fdw', fdw_package_version '0.1.0', fdw_package_checksum '', api_url 'https://your-iris-host/iris-fdw/v1', username 'fdw_user', password_id '', debug 'true' );
-- Import IRIS schema as foreign tables create schema if not exists iris; import foreign schema "Demo" from server iris_server into iris;
-- Query IRIS tables select id, name, city from iris.patient where city = 'Beijing';-- Join IRIS tables with Postgres tables select p.name, l.status from iris.patient p join local.visits l on l.patient_id = p.id;
-- Insert into IRIS insert into iris.patient (name, city) values ('新患者', 'Shanghai');
-- Update IRIS update iris.patient set city = 'Guangzhou' where id = 1;
-- Delete from IRIS delete from iris.patient where id = 99;
| Option | Required | Default | Description |
|---|---|---|---|
fdw_package_url |
yes | - | URL to the .wasm file |
fdw_package_name |
yes | - | Package identifier |
fdw_package_version |
yes | - | Semantic version |
fdw_package_checksum |
yes | - | SHA256 of .wasm |
api_url |
yes | - | IRIS gateway base URL |
username |
no | _SYSTEM |
IRIS login username |
password |
no | SYS |
IRIS login password (plain) |
password_id |
no | - | Supabase Vault secret ID (preferred) |
batch_size |
no | 100 |
Rows per batch in paged queries |
debug |
no | false |
Enable SQL debug logging |
| Option | Required | Description |
|---|---|---|
object |
yes | IRIS table name (e.g., Demo.Patient) |
| IRIS | Postgres |
|---|---|
| INTEGER | bigint |
| BIGINT | bigint |
| DOUBLE | double precision |
| VARCHAR(n) | text |
| DATE | date |
| TIMESTAMP | timestamp |
| BOOLEAN | boolean |
| NUMERIC | double precision |
/query endpoint only allows SELECT/exec endpoint only allows INSERT/UPDATE/DELETESet ^FDW.Gateway("readOnly") = 1cd iris-fdw-wasm
rustup target add wasm32-unknown-unknown
cargo install cargo-component --locked --version 0.13.2
cargo component build --release
# Output: target/wasm32-unknown-unknown/release/iris_fdw.wasm
cd iris-fdw-gateway
# Import src/IrisFdw.Gateway.Handler.cls into IRIS
# Set up web application at /iris-fdw/v1
NUMERIC values travel as 64-bit floats (Wasm FDW interface limitation)MIT