Files
alighasami 3d5eaf9445
Security: Sync from Public / sync-from-public (push) Has been cancelled
Test: Benchmark Nightly / build (push) Has been cancelled
Test: Benchmark Nightly / Notify Cats on failure (push) Has been cancelled
CI: Python / Checks (push) Has been cancelled
Test: Evals Python / Workflow Comparison Python (push) Has been cancelled
Util: Check Docs URLs / check-docs-urls (push) Has been cancelled
Test: Visual Storybook / Cloudflare Pages (push) Has been cancelled
Test: E2E Performance / build-and-test-performance (push) Has been cancelled
Test: Workflows Nightly / Run Workflow Tests (push) Has been cancelled
Util: Cleanup CI Docker Images / Delete stale CI images (push) Has been cancelled
Test: Benchmark Destroy Env / build (push) Has been cancelled
Util: Update Node Popularity / update-popularity (push) Has been cancelled
Test: E2E Coverage Weekly / Coverage Tests (push) Has been cancelled
first commit
2026-03-17 16:22:57 +03:30

57 lines
1.5 KiB
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 const AUTO_MAP = 'autoMapInputData';
const MANUAL = 'defineBelow';
export const DATA_MODE = {
AUTO_MAP,
MANUAL,
};
export const SINGLE = 'single';
const TRANSACTION = 'transaction';
const INDEPENDENTLY = 'independently';
export const BATCH_MODE = { SINGLE, TRANSACTION, INDEPENDENTLY };
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;
};