Logical relation functions produce relations from a function call in FROM.
Spiral uses them for metadata surfaces today and will use the same registry for
extension packages that produce logical relation expansions.
Use the built-in metadata table function to list what is registered:
SELECT *
FROM spql.meta.table_functions();The result includes:
| Column | Meaning |
|---|---|
function_set | Stable function-set id. |
overload | Concrete overload name. |
volatility | Whether repeated calls may vary. |
visibility | Public, experimental, hidden, internal, or deprecated. |
parameters | Parameter names and shapes. |
summary | Short function summary when registered. |
Filter to public table functions:
SELECT function_set, parameters, summary
FROM spql.meta.table_functions()
WHERE visibility = 'public'
ORDER BY function_set;The current built-in surface includes metadata functions and registered logical
extension table functions. Source functions such as local file readers are a
separate catalog category and are not listed by spql.meta.table_functions().
List source functions separately:
SELECT function_set, parameters, summary
FROM spql.meta.source_functions()
WHERE visibility = 'public'
ORDER BY function_set;This surface lists static registration metadata only. It does not include output schemas, because source-function schemas can depend on concrete arguments and may require source resolution.
List SpiralDB tables in a project:
SELECT project_id, dataset, table_name, table_id, escaped
FROM spiraldb.meta.tables(project_id => 'my_project')
ORDER BY dataset, table_name;Filter to one dataset or table name:
SELECT *
FROM spiraldb.meta.tables(
project_id => 'my_project',
dataset => 'my_dataset',
table_name => 'events'
);This is a SpiralDB-specific metadata surface. It does not expose a full SQL
information_schema yet. The relation_name column is a display-oriented
spiraldb.<project>.<dataset>.<table> relation name. The escaped column
quotes project ids, datasets, and table names when needed, so it can be used in
a follow-up query:
SELECT *
FROM spiraldb.my_project.my_dataset.events
LIMIT 10;The SQL REPL also starts with the SpiralDB catalog selected. Use a current project and dataset to make single-part names resolve into SpiralDB:
USE PROJECT damp-unit-976647;
USE DATASET default;
SELECT *
FROM "cell-painting-cpg0001"
LIMIT 10;List registered scalar functions:
SELECT function_set, overload, parameters, summary
FROM spql.meta.scalar_functions()
WHERE visibility = 'public'
ORDER BY function_set, overload;List registered aggregate functions:
SELECT function_set, parameters, summary
FROM spql.meta.aggregate_functions()
ORDER BY function_set;List registered extension dtypes:
SELECT *
FROM spql.meta.extension_types();The result includes:
| Column | Meaning |
|---|---|
id | Stable extension dtype id. |
stability | Stable or unstable dtype contract. |
typing | Nominal or structural SPQL matching mode, when cataloged. |
storage_dtype | Vortex storage dtype, when cataloged. |
summary | Short dtype summary when registered. |
Filter to dtypes whose storage shape or semantic contract may change:
SELECT id, summary
FROM spql.meta.extension_types()
WHERE stability = 'unstable'
ORDER BY id;List registered COPY TO formats:
SELECT format, aliases
FROM spql.meta.copy_formats()
ORDER BY format;