2023-04-12 07:24:17 -07:00
|
|
|
import type { INodeTypeBaseDescription, IVersionedNodeType } from 'n8n-workflow';
|
|
|
|
import { VersionedNodeType } from 'n8n-workflow';
|
|
|
|
|
|
|
|
import { MySqlV1 } from './v1/MySqlV1.node';
|
|
|
|
import { MySqlV2 } from './v2/MySqlV2.node';
|
|
|
|
|
|
|
|
export class MySql extends VersionedNodeType {
|
|
|
|
constructor() {
|
|
|
|
const baseDescription: INodeTypeBaseDescription = {
|
|
|
|
displayName: 'MySQL',
|
|
|
|
name: 'mySql',
|
|
|
|
icon: 'file:mysql.svg',
|
|
|
|
group: ['input'],
|
2023-08-25 08:38:09 -07:00
|
|
|
defaultVersion: 2.2,
|
2023-04-12 07:24:17 -07:00
|
|
|
description: 'Get, add and update data in MySQL',
|
|
|
|
};
|
|
|
|
|
|
|
|
const nodeVersions: IVersionedNodeType['nodeVersions'] = {
|
|
|
|
1: new MySqlV1(baseDescription),
|
|
|
|
2: new MySqlV2(baseDescription),
|
2023-05-03 08:45:21 -07:00
|
|
|
2.1: new MySqlV2(baseDescription),
|
2023-08-25 08:38:09 -07:00
|
|
|
2.2: new MySqlV2(baseDescription),
|
2023-04-12 07:24:17 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
super(nodeVersions, baseDescription);
|
2019-11-19 00:36:56 -08:00
|
|
|
}
|
|
|
|
}
|