Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
HSunboy committed Nov 13, 2023
1 parent aaee738 commit bdc5e71
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/common/datasource/oceanbase/obmysql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ const items: Record<
language: 'obmysql',
escapeChar: '`',
},
disable: true,
},
};
if (haveOCP()) {
Expand Down
1 change: 1 addition & 0 deletions src/common/network/connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ function generateConnectionParams(formData: Partial<IConnectionFormData>, isHide
const params: Partial<IConnection> = {
creatorId: userId,
type: formData.type,
defaultSchema: formData?.defaultSchema,
name: formData.name,
username: formData.username,
password: encrypt(formData.password),
Expand Down
1 change: 1 addition & 0 deletions src/d.ts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,7 @@ export interface IConnection {
errorMessage?: string;
jdbcUrlParameters?: Record<string, string>;
sessionInitScript?: string;
defaultSchema?: string;
}

export interface IConnectionLabel {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ export default forwardRef<IFormRef, IProps>(function DatasourceForm(
'sslConfig',
'sessionInitScript',
'jdbcUrlParameters',
'defaultSchema',
]);
} catch (e) {}
if (!values) {
Expand Down Expand Up @@ -259,6 +260,11 @@ export default forwardRef<IFormRef, IProps>(function DatasourceForm(
<>
{!haveOCP() && <ParseURLItem autoType={!isEdit} />}
<AddressItems />
{dsc?.defaultSchema ? (
<Form.Item label="默认数据库" rules={[{ required: true }]} name={'defaultSchema'}>
<Input style={{ width: 208 }} />
</Form.Item>
) : null}
<Account isEdit={isEdit} />
<Form.Item
rules={[
Expand Down

0 comments on commit bdc5e71

Please sign in to comment.