mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-25 22:25:59 +00:00
specificNullabilityImplementation
This commit is contained in:
@@ -246,7 +246,7 @@ export class SqlDumper implements AlterProcessor {
|
|||||||
|
|
||||||
this.putRaw(' ');
|
this.putRaw(' ');
|
||||||
this.specialColumnOptions(column);
|
this.specialColumnOptions(column);
|
||||||
if (includeNullable && !this.dialect?.specificNotNull) {
|
if (includeNullable && !this.dialect?.specificNullabilityImplementation) {
|
||||||
this.put(column.notNull ? '^not ^null' : '^null');
|
this.put(column.notNull ? '^not ^null' : '^null');
|
||||||
}
|
}
|
||||||
if (includeDefault && column.defaultValue?.trim()) {
|
if (includeDefault && column.defaultValue?.trim()) {
|
||||||
|
|||||||
2
packages/types/dialect.d.ts
vendored
2
packages/types/dialect.d.ts
vendored
@@ -34,7 +34,7 @@ export interface SqlDialect {
|
|||||||
createCheck?: boolean;
|
createCheck?: boolean;
|
||||||
dropCheck?: boolean;
|
dropCheck?: boolean;
|
||||||
|
|
||||||
specificNotNull?: boolean;
|
specificNullabilityImplementation?: boolean;
|
||||||
|
|
||||||
// syntax for create column: ALTER TABLE table ADD COLUMN column
|
// syntax for create column: ALTER TABLE table ADD COLUMN column
|
||||||
createColumnWithColumnKeyword?: boolean;
|
createColumnWithColumnKeyword?: boolean;
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
<FormTextField name="columnName" label="Column name" focused disabled={isReadOnly} />
|
<FormTextField name="columnName" label="Column name" focused disabled={isReadOnly} />
|
||||||
<DataTypeEditor dialect={driver?.dialect} disabled={isReadOnly} />
|
<DataTypeEditor dialect={driver?.dialect} disabled={isReadOnly} />
|
||||||
|
|
||||||
{#if !driver?.dialect?.specificNotNull}
|
{#if !driver?.dialect?.specificNullabilityImplementation}
|
||||||
<FormCheckboxField name="notNull" label="NOT NULL" disabled={isReadOnly} />
|
<FormCheckboxField name="notNull" label="NOT NULL" disabled={isReadOnly} />
|
||||||
{/if}
|
{/if}
|
||||||
<FormCheckboxField name="isPrimaryKey" label="Is Primary Key" disabled={isReadOnly} />
|
<FormCheckboxField name="isPrimaryKey" label="Is Primary Key" disabled={isReadOnly} />
|
||||||
|
|||||||
@@ -187,7 +187,7 @@
|
|||||||
on:clickrow={e => showModal(ColumnEditorModal, { columnInfo: e.detail, tableInfo, setTableInfo, driver })}
|
on:clickrow={e => showModal(ColumnEditorModal, { columnInfo: e.detail, tableInfo, setTableInfo, driver })}
|
||||||
onAddNew={isWritable ? addColumn : null}
|
onAddNew={isWritable ? addColumn : null}
|
||||||
columns={[
|
columns={[
|
||||||
!driver?.dialect?.specificNotNull && {
|
!driver?.dialect?.specificNullabilityImplementation && {
|
||||||
fieldName: 'notNull',
|
fieldName: 'notNull',
|
||||||
header: 'Nullability',
|
header: 'Nullability',
|
||||||
sortable: true,
|
sortable: true,
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ const dialect = {
|
|||||||
dropIndex: true,
|
dropIndex: true,
|
||||||
anonymousPrimaryKey: true,
|
anonymousPrimaryKey: true,
|
||||||
createColumnWithColumnKeyword: true,
|
createColumnWithColumnKeyword: true,
|
||||||
specificNotNull: true,
|
specificNullabilityImplementation: true,
|
||||||
|
|
||||||
columnProperties: {
|
columnProperties: {
|
||||||
columnComment: true,
|
columnComment: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user