mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-22 21:36:00 +00:00
allow SQLite on web #956
This commit is contained in:
2
packages/types/engines.d.ts
vendored
2
packages/types/engines.d.ts
vendored
@@ -162,7 +162,7 @@ export interface EngineDriver<TClient = any> extends FilterBehaviourProvider {
|
|||||||
profilerTimestampFunction?: string;
|
profilerTimestampFunction?: string;
|
||||||
profilerChartAggregateFunction?: string;
|
profilerChartAggregateFunction?: string;
|
||||||
profilerChartMeasures?: { label: string; field: string }[];
|
profilerChartMeasures?: { label: string; field: string }[];
|
||||||
isElectronOnly?: boolean;
|
// isElectronOnly?: boolean;
|
||||||
supportsTransactions?: boolean;
|
supportsTransactions?: boolean;
|
||||||
implicitTransactions?: boolean; // transaction is started with first SQL command, no BEGIN TRANSACTION is needed
|
implicitTransactions?: boolean; // transaction is started with first SQL command, no BEGIN TRANSACTION is needed
|
||||||
|
|
||||||
|
|||||||
@@ -93,7 +93,7 @@
|
|||||||
{ label: '(select connection type)', value: '' },
|
{ label: '(select connection type)', value: '' },
|
||||||
..._.sortBy(
|
..._.sortBy(
|
||||||
$extensions.drivers
|
$extensions.drivers
|
||||||
.filter(driver => !driver.isElectronOnly || electron)
|
// .filter(driver => !driver.isElectronOnly || electron)
|
||||||
.map(driver => ({
|
.map(driver => ({
|
||||||
value: driver.engine,
|
value: driver.engine,
|
||||||
label: driver.title,
|
label: driver.title,
|
||||||
@@ -104,11 +104,19 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
{#if driver?.showConnectionField('databaseFile', $values, showConnectionFieldArgs)}
|
{#if driver?.showConnectionField('databaseFile', $values, showConnectionFieldArgs)}
|
||||||
<FormElectronFileSelector
|
{#if electron}
|
||||||
label="Database file"
|
<FormElectronFileSelector
|
||||||
name="databaseFile"
|
label="Database file"
|
||||||
disabled={isConnected || !electron || disabledFields.includes('databaseFile')}
|
name="databaseFile"
|
||||||
/>
|
disabled={isConnected || disabledFields.includes('databaseFile')}
|
||||||
|
/>
|
||||||
|
{:else}
|
||||||
|
<FormTextField
|
||||||
|
label="Database file (path on server)"
|
||||||
|
name="databaseFile"
|
||||||
|
disabled={isConnected || disabledFields.includes('databaseFile')}
|
||||||
|
/>
|
||||||
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if driver?.showConnectionField('useDatabaseUrl', $values, showConnectionFieldArgs)}
|
{#if driver?.showConnectionField('useDatabaseUrl', $values, showConnectionFieldArgs)}
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ const driver = {
|
|||||||
: sqliteSplitterOptions,
|
: sqliteSplitterOptions,
|
||||||
|
|
||||||
// isFileDatabase: true,
|
// isFileDatabase: true,
|
||||||
isElectronOnly: true,
|
// isElectronOnly: true,
|
||||||
|
|
||||||
predefinedDataTypes: ['integer', 'real', 'text', 'blob'],
|
predefinedDataTypes: ['integer', 'real', 'text', 'blob'],
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user