Open an existing persistent database. Equivalent to
ATTACH 'opfs://mydb' [AS name]. Resolves to the database name.
Optionaloptions: AttachDatabaseOptionsDescribe all databases, schemas, tables and views.
Rewrite all tables of a persistent database into one segment each.
Create a persistent database, for example opfs://mydb, and attach it
as a catalog. Equivalent to CREATE DATABASE 'opfs://mydb'.
Resolves to the database name.
Optionaloptions: CreateDatabaseOptionsCreate a table from column definitions or a query. name may be
qualified (mydb.public.cities).
Optionaloptions: CreateTableOptionsWrite pending changes and close a persistent database. Equivalent to DETACH name.
Optionaloptions: { ifExists?: boolean }Export a table or query result as GeoParquet and pass it to the export
handler: a browser download by default (see onExport in
CereusDBOptions). Resolves to the file name.
A query (SELECT ..., WITH ...) or a table name.
Optionaloptions: DownloadGeoParquetOptionsDrop a database by name or location. Persistent databases are deleted
from storage. Equivalent to DROP DATABASE.
Optionaloptions: { ifExists?: boolean }Drop a table. The table is removed immediately; for tables of persistent databases the returned promise resolves once the change is written.
Export a table or query result as a GeoParquet (1.1) file. Geometry and
geography columns are described in the file's geo metadata.
A query (SELECT ..., WITH ...) or a table name.
Optionaloptions: GeoParquetExportOptionsWrite pending changes of persistent databases (for example after registerGeoJSON()).
Insert Arrow IPC data (stream or file format, for example from
tableToIPC() of apache-arrow) into a table. Columns are matched by
name; missing columns are filled with NULL. Resolves to the number of
inserted rows.
Attached databases plus stored databases that are not attached.
Register a local file (from File API / drag-and-drop) as a table. Currently supports Parquet, GeoJSON, and GeoTIFF rasters.
Register a GeoJSON object or string as a table.
Register a GeoTIFF buffer as a single-column raster table. Requires the full GDAL-enabled package build.
Register browser-backed object stores for ranged and listing reads.
Register a remote Parquet object or prefix through DataFusion's listing table path.
Optionaloptions: RegisterParquetTableOptionsRegister a raster buffer as a single-column raster table. Requires the full GDAL-enabled package build.
Register a remote Parquet file as a table. The server must support CORS.
Execute a SQL query and return results as Arrow IPC bytes.
Execute a SQL query and return results as JSON.
List the tables and views of all databases. By default only the table
names are returned, which is ambiguous when databases contain tables with
the same name; pass { qualified: true } for database.schema.table
names, or use CereusDB.catalog for full details.
Optionaloptions: { qualified?: boolean }Set the default database (and schema). Equivalent to USE database[.schema].
Optionalschema: stringVersion string.
StaticcreateCreate and initialize a new CereusDB instance. This loads the WASM module and initializes the query engine.
Optionaloptions: CereusDBOptions
Rename a table or add, drop, or rename a column.