n8n-nodes-base
Version:
Base nodes of n8n
64 lines • 1.78 kB
TypeScript
import type mysql2 from 'mysql2/promise';
import type { IDataObject, INodeExecutionData, SSHCredentials } from 'n8n-workflow';
export type Mysql2Connection = mysql2.Connection;
export type Mysql2Pool = mysql2.Pool;
export type Mysql2OkPacket = mysql2.OkPacket;
export type Mysql2PoolConnection = mysql2.PoolConnection;
export type QueryValues = Array<string | number | IDataObject>;
export type QueryWithValues = {
query: string;
values: QueryValues;
};
export type QueryRunner = (queries: QueryWithValues[]) => Promise<INodeExecutionData[]>;
export type WhereClause = {
column: string;
condition: string;
value: string | number;
};
export type SortRule = {
column: string;
direction: string;
};
export declare const AUTO_MAP = "autoMapInputData";
export declare const DATA_MODE: {
AUTO_MAP: string;
MANUAL: string;
};
export declare const SINGLE = "single";
declare const TRANSACTION = "transaction";
declare const INDEPENDENTLY = "independently";
export declare const BATCH_MODE: {
SINGLE: string;
TRANSACTION: string;
INDEPENDENTLY: string;
};
export type QueryMode = typeof SINGLE | typeof TRANSACTION | typeof INDEPENDENTLY;
type WithSSL = {
ssl: false;
} | {
ssl: true;
caCertificate: string;
clientCertificate: string;
clientPrivateKey: string;
};
type WithSSHTunnel = {
sshTunnel: false;
} | ({
sshTunnel: true;
} & SSHCredentials);
export type MysqlNodeCredentials = {
host: string;
port: number;
database: string;
user: string;
password: string;
connectTimeout: number;
} & WithSSL & WithSSHTunnel;
export type ParameterMatch = {
match: string;
index: number;
paramNumber: string;
isName: boolean;
};
export {};
//# sourceMappingURL=interfaces.d.ts.map