feat(credential): add credential of mysql node

This commit is contained in:
Eric Chang 2019-11-14 11:32:26 +08:00
parent d74f0d9bbd
commit 040b0a690c
2 changed files with 46 additions and 0 deletions

View file

@ -0,0 +1,45 @@
import {
ICredentialType,
NodePropertyTypes,
} from 'n8n-workflow';
export class MySQL implements ICredentialType {
name = 'mysql';
displayName = 'MySQL';
properties = [
{
displayName: 'Host',
name: 'host',
type: 'string' as NodePropertyTypes,
default: 'localhost',
},
{
displayName: 'Database',
name: 'database',
type: 'string' as NodePropertyTypes,
default: 'mysql',
},
{
displayName: 'User',
name: 'user',
type: 'string' as NodePropertyTypes,
default: 'mysql',
},
{
displayName: 'Password',
name: 'password',
type: 'string' as NodePropertyTypes,
typeOptions: {
password: true,
},
default: '',
},
{
displayName: 'Port',
name: 'port',
type: 'number' as NodePropertyTypes,
default: 3306,
},
];
}

View file

@ -52,6 +52,7 @@
"dist/credentials/MandrillApi.credentials.js", "dist/credentials/MandrillApi.credentials.js",
"dist/credentials/MattermostApi.credentials.js", "dist/credentials/MattermostApi.credentials.js",
"dist/credentials/MongoDb.credentials.js", "dist/credentials/MongoDb.credentials.js",
"dist/credentials/MySQL.credentials.js",
"dist/credentials/NextCloudApi.credentials.js", "dist/credentials/NextCloudApi.credentials.js",
"dist/credentials/OpenWeatherMapApi.credentials.js", "dist/credentials/OpenWeatherMapApi.credentials.js",
"dist/credentials/PipedriveApi.credentials.js", "dist/credentials/PipedriveApi.credentials.js",