Skip to content

Home > extract-pg-schema > ExtractSchemaOptions

ExtractSchemaOptions interface

This is the options object that can be passed to extractSchemas.

Signature:

typescript
export interface ExtractSchemaOptions

Properties

Property

Modifiers

Type

Description

onProgress?

() => void

(Optional) Called once for each type that is extracted.

onProgressEnd?

() => void

(Optional) Called when all types have been extracted.

onProgressStart?

(total: number) => void

(Optional) Called with the number of types to extract.

resolveViews?

boolean

(Optional) extractShemas will always attempt to parse view definitions to discover the "source" of each column, i.e. the table or view that it is derived from. If this option is set to true, it will attempt to follow this source and copy values like indices, isNullable, etc. so that the view data is closer to what the database reflects.

schemas?

string[]

(Optional) Will contain an array of schema names to extract. If undefined, all non-system schemas will be extracted.

typeFilter?

(pgType: PgType) => boolean

(Optional) Filter function that you can use if you want to exclude certain items from the schemas.