2023-01-27 03:22:44 -08:00
|
|
|
import type { ICredentialType, INodeProperties } from 'n8n-workflow';
|
2020-07-08 01:00:13 -07:00
|
|
|
|
2020-07-08 01:08:00 -07:00
|
|
|
export class MicrosoftSql implements ICredentialType {
|
|
|
|
name = 'microsoftSql';
|
2022-12-02 12:54:28 -08:00
|
|
|
|
2020-07-08 01:08:00 -07:00
|
|
|
displayName = 'Microsoft SQL';
|
2022-12-02 12:54:28 -08:00
|
|
|
|
2020-08-17 05:42:09 -07:00
|
|
|
documentationUrl = 'microsoftSql';
|
2022-12-02 12:54:28 -08:00
|
|
|
|
2021-06-12 09:39:55 -07:00
|
|
|
properties: INodeProperties[] = [
|
2020-07-08 01:00:13 -07:00
|
|
|
{
|
|
|
|
displayName: 'Server',
|
|
|
|
name: 'server',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'string',
|
2020-10-22 06:46:03 -07:00
|
|
|
default: 'localhost',
|
2020-07-08 01:00:13 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Database',
|
|
|
|
name: 'database',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'string',
|
2020-10-22 06:46:03 -07:00
|
|
|
default: 'master',
|
2020-07-08 01:00:13 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'User',
|
|
|
|
name: 'user',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'string',
|
2020-10-22 06:46:03 -07:00
|
|
|
default: 'sa',
|
2020-07-08 01:00:13 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Password',
|
|
|
|
name: 'password',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'string',
|
2020-07-08 01:00:13 -07:00
|
|
|
typeOptions: {
|
2020-10-22 06:46:03 -07:00
|
|
|
password: true,
|
2020-07-08 01:00:13 -07:00
|
|
|
},
|
2020-10-22 06:46:03 -07:00
|
|
|
default: '',
|
2020-07-08 01:00:13 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Port',
|
|
|
|
name: 'port',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'number',
|
2020-10-22 06:46:03 -07:00
|
|
|
default: 1433,
|
2020-07-08 01:00:13 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Domain',
|
|
|
|
name: 'domain',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'string',
|
2020-10-22 06:46:03 -07:00
|
|
|
default: '',
|
|
|
|
},
|
2020-11-10 14:30:03 -08:00
|
|
|
{
|
|
|
|
displayName: 'TLS',
|
|
|
|
name: 'tls',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'boolean',
|
2020-11-10 14:30:03 -08:00
|
|
|
default: true,
|
|
|
|
},
|
2021-03-07 05:02:26 -08:00
|
|
|
{
|
|
|
|
displayName: 'Connect Timeout',
|
|
|
|
name: 'connectTimeout',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'number',
|
2021-03-07 05:02:26 -08:00
|
|
|
default: 15000,
|
2022-04-13 23:32:27 -07:00
|
|
|
description: 'Connection timeout in ms',
|
2021-03-07 05:02:26 -08:00
|
|
|
},
|
2021-07-06 15:26:34 -07:00
|
|
|
{
|
|
|
|
displayName: 'Request Timeout',
|
|
|
|
name: 'requestTimeout',
|
|
|
|
type: 'number',
|
|
|
|
default: 15000,
|
2022-04-13 23:32:27 -07:00
|
|
|
description: 'Request timeout in ms',
|
2021-07-06 15:26:34 -07:00
|
|
|
},
|
2022-09-21 17:41:44 -07:00
|
|
|
{
|
|
|
|
displayName: 'TDS Version',
|
|
|
|
name: 'tdsVersion',
|
|
|
|
type: 'options',
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: '7_4 (SQL Server 2012 ~ 2019)',
|
|
|
|
value: '7_4',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: '7_3_B (SQL Server 2008R2)',
|
|
|
|
value: '7_3_B',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: '7_3_A (SQL Server 2008)',
|
|
|
|
value: '7_3_A',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: '7_2 (SQL Server 2005)',
|
|
|
|
value: '7_2',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: '7_1 (SQL Server 2000)',
|
|
|
|
value: '7_1',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
default: '7_4',
|
2022-11-22 03:44:35 -08:00
|
|
|
description:
|
|
|
|
"The version of TDS to use. If server doesn't support specified version, negotiated version is used instead.",
|
2022-09-21 17:41:44 -07:00
|
|
|
},
|
2020-07-08 01:00:13 -07:00
|
|
|
];
|
|
|
|
}
|