/** * Oracle Database Node - Version 1 * Get, add and update data in Oracle database */ export interface OracleDatabaseV1Params { resource?: unknown; /** * Operation * @displayOptions.show { resource: ["database"] } * @default insert */ operation?: 'deleteTable' | 'execute' | 'insert' | 'upsert' | 'select' | 'update'; /** * The schema that contains the table you want to work on * @displayOptions.hide { operation: ["execute"] } * @default {"mode":"list","value":""} */ schema?: { __rl: true; mode: 'list' | 'name'; value: string; cachedResultName?: string }; /** * The table you want to work on * @displayOptions.hide { operation: ["execute"] } * @default {"mode":"list","value":""} */ table?: { __rl: true; mode: 'list' | 'name'; value: string; cachedResultName?: string }; /** * Command * @displayOptions.show { resource: ["database"], operation: ["deleteTable"] } * @displayOptions.hide { table: [""] } * @default truncate */ deleteCommand?: 'truncate' | 'delete' | 'drop' | Expression; /** * If not set, all rows will be selected * @displayOptions.show { deleteCommand: ["delete"], resource: ["database"], operation: ["deleteTable"] } * @displayOptions.hide { table: [""] } * @default {} */ where?: { /** Values */ values?: Array<{ /** Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/" target="_blank">expression</a> */ column?: string | Expression; /** The operator to check the column against. When using 'LIKE' operator percent sign ( %) matches zero or more characters, underscore ( _ ) matches any single character. * @default equal */ condition?: 'equal' | '!=' | 'LIKE' | '>' | '<' | '>=' | '<=' | 'IS NULL' | 'IS NOT NULL' | Expression; /** Parameters to pass to the tool as JSON or string * @displayOptions.hide { condition: ["IS NULL", "IS NOT NULL"] } * @default {"key": "val"} */ value?: IDataObject | string | Expression; }>; }; /** * How to combine the conditions defined in "Select Rows": AND requires all conditions to be true, OR requires at least one condition to be true * @displayOptions.show { deleteCommand: ["delete"], resource: ["database"], operation: ["deleteTable"] } * @displayOptions.hide { table: [""] } * @default AND */ combineConditions?: 'AND' | 'OR' | Expression; /** * Options * @displayOptions.show { resource: ["database"], operation: ["deleteTable"] } * @displayOptions.hide { table: [""] } * @default {} */ options?: { /** Whether this property is true, then the transaction in the current connection is automatically committed at the end of statement execution * @default true */ autoCommit?: boolean | Expression; /** Enter the values for the bind parameters used in the statement * @displayOptions.show { /operation: ["execute"] } * @default {} */ params?: { /** Values */ values?: Array<{ /** A bind variable placeholder identifier or numeral */ name?: string | Expression | PlaceholderValue; /** Specify whether data values bound to SQL or PL/SQL bind parameters are passed into, or out from, the database * @default in */ bindDirection?: 'in' | 'out' | 'inout' | Expression; /** Data Type * @default string */ datatype?: 'blob' | 'boolean' | 'date' | 'json' | 'number' | 'sparse' | 'string' | 'vector' | Expression; /** Value (String) * @displayOptions.show { datatype: ["string"] } */ valueString?: string | Expression | PlaceholderValue; /** Value (Number) * @displayOptions.show { datatype: ["number"] } * @default 0 */ valueNumber?: number | Expression; /** Value (Date) * @displayOptions.show { datatype: ["date"] } * @default 0 */ valueDate?: string | Expression; /** Value (Boolean) * @displayOptions.show { datatype: ["boolean"] } * @default false */ valueBoolean?: boolean | Expression; /** Value (JSON) * @displayOptions.show { datatype: ["json"] } * @default {} */ valueJson?: IDataObject | string | Expression; /** A JSON array of dimension values * @displayOptions.show { datatype: ["vector"] } * @default [] */ valueVector?: IDataObject | string | Expression; /** A Binary data * @displayOptions.show { datatype: ["blob"] } * @default [] */ valueBlob?: IDataObject | string | Expression; /** Value (Sparse Vector) * @displayOptions.show { datatype: ["sparse"] } * @default {} */ valueSparse?: { /** Total number of dimensions * @default 0 */ dimensions?: number | Expression; /** A JSON array of indices, e.g., [0, 2, 5] * @default [] */ indices?: IDataObject | string | Expression; /** A JSON array of values matching indices * @default [] */ values?: IDataObject | string | Expression; }; /** Parse for IN Statement * @hint If "Yes" the "Value" field should be a string of comma-separated values. i.e: 1,2,3 or str1,str2,str3 * @default false */ parseInStatement?: false | true | Expression; }>; }; /** This property is a number that sets the size of an internal buffer used for fetching query rows from Oracle Database. Changing it may affect query performance but does not affect how many rows are returned to the application. * @displayOptions.show { /operation: ["execute", "select"] } * @default 100 */ fetchArraySize?: number | Expression; /** This property is a query tuning option to set the number of additional rows the underlying Oracle driver fetches during the internal initial statement execution phase of a query * @displayOptions.show { /operation: ["execute", "select"] } * @default 2 */ prefetchRows?: number | Expression; /** Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/" target="_blank">expression</a> * @displayOptions.show { /operation: ["insert", "select", "update", "upsert"] } * @default [] */ outputColumns?: string[]; /** Whether the numbers should be retrieved as string * @hint Applies to NUMBER, FLOAT, LONG type columns only * @displayOptions.show { /operation: ["execute", "select"] } * @default false */ largeNumbersOutputAsString?: boolean | Expression; /** The way queries should be sent to the database * @displayOptions.show { /operation: ["update", "insert", "upsert"] } * @default single */ stmtBatching?: 'single' | 'independently' | 'transaction'; /** The way queries should be sent to the database * @displayOptions.show { /operation: ["deleteTable"] } * @default independently */ stmtBatching?: 'single' | 'independently' | 'transaction'; }; /** * The SQL statement to execute. You can use n8n expressions and positional parameters like :1, :2, :3, or named parameters like :name, :ID, etc to refer to the 'Bind Variable Placeholder Values' set in options below. * @hint Consider using bind parameters to prevent SQL injection attacks. Add them in the options below * @displayOptions.show { resource: ["database"], operation: ["execute"] } */ query?: string; /** * Columns * @displayOptions.show { resource: ["database"], operation: ["insert"] } * @displayOptions.hide { table: [""] } * @default {"mappingMode":"defineBelow","value":null} */ columns?: string; /** * Whether to return all results or only up to a given limit * @displayOptions.show { resource: ["database"], operation: ["select"] } * @displayOptions.hide { table: [""] } * @default false */ returnAll?: boolean | Expression; /** * Max number of results to return * @displayOptions.show { resource: ["database"], operation: ["select"], returnAll: [false] } * @displayOptions.hide { table: [""] } * @default 50 */ limit?: number | Expression; /** * Sort * @displayOptions.show { resource: ["database"], operation: ["select"] } * @displayOptions.hide { table: [""] } * @default {} */ sort?: { /** Values */ values?: Array<{ /** Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/" target="_blank">expression</a> */ column?: string | Expression; /** Direction * @default ASC */ direction?: 'ASC' | 'DESC' | Expression; }>; }; } export interface OracleDatabaseV1Credentials { oracleDBApi: CredentialReference; } interface OracleDatabaseV1NodeBase { type: 'n8n-nodes-base.oracleDatabase'; version: 1; credentials?: OracleDatabaseV1Credentials; } export type OracleDatabaseV1ParamsNode = OracleDatabaseV1NodeBase & { config: NodeConfig; }; export type OracleDatabaseV1Node = OracleDatabaseV1ParamsNode;