Skip to content

@sqlrooms/sql-editor / CreateTableModalProps

Type Alias: CreateTableModalProps

CreateTableModalProps = object

Properties

query

query: string


isOpen

isOpen: boolean


onClose()

onClose: () => void

Returns

void


editDataSource?

optional editDataSource: SqlQueryDataSource


allowMultipleStatements?

optional allowMultipleStatements: boolean

Allow multiple statements in the query. When true, preceding statements will be executed before the final SELECT is wrapped in CREATE TABLE/VIEW.


showSchemaSelection?

optional showSchemaSelection: boolean

Show schema/database selection UI.

Default

ts
false

onAddOrUpdateSqlQuery()?

optional onAddOrUpdateSqlQuery: (tableName, query, oldTableName?) => Promise<void>

Parameters

ParameterType
tableNamestring
querystring
oldTableName?string

Returns

Promise<void>

Deprecated

Use createTableFromQuery directly instead. When not provided, the modal will call createTableFromQuery directly.


className?

optional className: string

Additional class name for the dialog content.


initialValues?

optional initialValues: CreateTableFormInitialValues

Initial values for the form fields.