mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-09-24 16:04:36 +08:00
chore: solve issues with too many Maybe in GQL schema
This commit is contained in:
@@ -26,7 +26,7 @@ export class CustomConnectionService {
|
||||
throw new Error('Driver properties loading failed');
|
||||
}
|
||||
|
||||
return response.driver[0].driverProperties;
|
||||
return response.driver[0].driverProperties!;
|
||||
}
|
||||
|
||||
async createConnectionAsync(config: ConnectionConfig): Promise<Connection> {
|
||||
|
||||
@@ -83,12 +83,12 @@ export class DataViewerTableService {
|
||||
values: firstRow.values,
|
||||
});
|
||||
|
||||
const dataSet = response.result.results[0].resultSet; // we expect only one dataset for a table
|
||||
const dataSet = response.result!.results[0].resultSet!; // we expect only one dataset for a table
|
||||
|
||||
const result: IRequestDataResult = {
|
||||
rows: dataSet.rows!,
|
||||
columns: [], // not in use while saving data
|
||||
duration: response.result.duration,
|
||||
duration: response.result!.duration,
|
||||
isFullyLoaded: false, // not in use while saving data
|
||||
statusMessage: 'Saved successfully',
|
||||
};
|
||||
@@ -119,14 +119,14 @@ export class DataViewerTableService {
|
||||
limit: count,
|
||||
},
|
||||
});
|
||||
const dataSet = readDataFromContainer.results[0].resultSet; // we expect only one dataset for a table
|
||||
const dataSet = readDataFromContainer!.results[0].resultSet!; // we expect only one dataset for a table
|
||||
data.resultId = dataSet.id; // server generates new resultId on each fetch
|
||||
|
||||
const result: IRequestDataResult = {
|
||||
rows: dataSet.rows!,
|
||||
columns: dataSet.columns,
|
||||
duration: readDataFromContainer.duration,
|
||||
statusMessage: readDataFromContainer.statusMessage || '',
|
||||
columns: dataSet.columns!,
|
||||
duration: readDataFromContainer!.duration,
|
||||
statusMessage: readDataFromContainer!.statusMessage || '',
|
||||
isFullyLoaded: (dataSet.rows?.length || 0) < count,
|
||||
};
|
||||
return result;
|
||||
|
||||
@@ -30,7 +30,7 @@ export class SqlDialectInfoService {
|
||||
if (!this.dialectInfo.has(connectionId)) {
|
||||
try {
|
||||
const result = await this.graphQLService.gql.querySqlDialectInfo({ connectionId });
|
||||
this.dialectInfo.set(connectionId, result.dialect);
|
||||
this.dialectInfo.set(connectionId, result.dialect!);
|
||||
} catch (error) {
|
||||
this.notificationService.logException(error, 'Failed to load SqlDialectInfo');
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ export class SqlResultService {
|
||||
limit: count,
|
||||
},
|
||||
});
|
||||
return response.result;
|
||||
return response.result!;
|
||||
}
|
||||
|
||||
asyncSqlQuery(sqlQueryParams: ISqlQueryParams,
|
||||
@@ -65,7 +65,7 @@ export class SqlResultService {
|
||||
values: firstRow.values,
|
||||
});
|
||||
|
||||
return response.result;
|
||||
return response.result!;
|
||||
}
|
||||
|
||||
sqlExecuteInfoToData(result: SqlExecuteInfo, indexInResultSet: number, count?: number): IRequestDataResult {
|
||||
|
||||
Reference in New Issue
Block a user