mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-12 05:17:28 -08:00
⚡ Rename and fix lint issue
This commit is contained in:
parent
1b2c105788
commit
b4329c823a
|
@ -4,8 +4,8 @@ import {
|
|||
} from 'n8n-workflow';
|
||||
|
||||
|
||||
export class MySQL implements ICredentialType {
|
||||
name = 'mysql';
|
||||
export class MySql implements ICredentialType {
|
||||
name = 'mySql';
|
||||
displayName = 'MySQL';
|
||||
properties = [
|
||||
{
|
|
@ -10,10 +10,10 @@ import * as mysql2 from 'mysql2/promise';
|
|||
|
||||
import { copyInputItems } from './GenericFunctions';
|
||||
|
||||
export class MySQL implements INodeType {
|
||||
export class MySql implements INodeType {
|
||||
description: INodeTypeDescription = {
|
||||
displayName: 'MySQL',
|
||||
name: 'mysql',
|
||||
name: 'mySql',
|
||||
icon: 'file:mysql.png',
|
||||
group: ['input'],
|
||||
version: 1,
|
||||
|
@ -26,7 +26,7 @@ export class MySQL implements INodeType {
|
|||
outputs: ['main'],
|
||||
credentials: [
|
||||
{
|
||||
name: 'mysql',
|
||||
name: 'mySql',
|
||||
required: true,
|
||||
}
|
||||
],
|
||||
|
@ -169,7 +169,7 @@ export class MySQL implements INodeType {
|
|||
|
||||
|
||||
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
||||
const credentials = this.getCredentials('mysql');
|
||||
const credentials = this.getCredentials('mySql');
|
||||
|
||||
if (credentials === undefined) {
|
||||
throw new Error('No credentials got returned!');
|
||||
|
@ -194,7 +194,7 @@ export class MySQL implements INodeType {
|
|||
|
||||
queryResult = queryResult.reduce((collection, result) => {
|
||||
const [rows, fields] = result;
|
||||
|
||||
|
||||
if (Array.isArray(rows)) {
|
||||
return collection.concat(rows);
|
||||
}
|
||||
|
@ -217,7 +217,7 @@ export class MySQL implements INodeType {
|
|||
const insertItems = copyInputItems(items, columns);
|
||||
const insertPlaceholder = `(${columns.map(column => '?').join(',')})`;
|
||||
const insertSQL = `INSERT INTO ${table}(${columnString}) VALUES ${items.map(item => insertPlaceholder).join(',')};`;
|
||||
const queryItems = insertItems.reduce((collection, item) => collection.concat(Object.values(item as any)), []);
|
||||
const queryItems = insertItems.reduce((collection, item) => collection.concat(Object.values(item as any)), []); // tslint:disable-line:no-any
|
||||
const queryResult = await connection.query(insertSQL, queryItems);
|
||||
|
||||
returnItems = this.helpers.returnJsonArray(queryResult[0] as IDataObject);
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
|
@ -52,7 +52,7 @@
|
|||
"dist/credentials/MandrillApi.credentials.js",
|
||||
"dist/credentials/MattermostApi.credentials.js",
|
||||
"dist/credentials/MongoDb.credentials.js",
|
||||
"dist/credentials/MySQL.credentials.js",
|
||||
"dist/credentials/MySql.credentials.js",
|
||||
"dist/credentials/NextCloudApi.credentials.js",
|
||||
"dist/credentials/OpenWeatherMapApi.credentials.js",
|
||||
"dist/credentials/PipedriveApi.credentials.js",
|
||||
|
@ -119,7 +119,7 @@
|
|||
"dist/nodes/Merge.node.js",
|
||||
"dist/nodes/MoveBinaryData.node.js",
|
||||
"dist/nodes/MongoDb/MongoDb.node.js",
|
||||
"dist/nodes/MySQL/MySQL.node.js",
|
||||
"dist/nodes/MySql/MySql.node.js",
|
||||
"dist/nodes/NextCloud/NextCloud.node.js",
|
||||
"dist/nodes/NoOp.node.js",
|
||||
"dist/nodes/OpenWeatherMap.node.js",
|
||||
|
|
Loading…
Reference in a new issue