getTableSchema
The getTableSchema function retrieves the schema of a table from a PGlite database, returning an object mapping column names to their data types.
getTableSchema(
pglite: PGlite,
table: string,
): Promise<TableSchema>| Type | Description | |
|---|---|---|
pglite | PGlite | The PGlite database instance. |
table | string | The name of the table to inspect. |
| returns | Promise<TableSchema> | A Promise that resolves to an object mapping column names to types. |
This utility function provides a standardized way to inspect table structure across different database connectors, with consistent output format regardless of the underlying database engine.
Since
v0.0.0