mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
43 lines
916 B
TypeScript
43 lines
916 B
TypeScript
import type {
|
|
IDisplayOptions,
|
|
IExecuteFunctions,
|
|
INodeExecutionData,
|
|
INodeProperties,
|
|
} from 'n8n-workflow';
|
|
|
|
import { executeSelectMany, getSelectFields } from '../../common/selectMany';
|
|
import { getDataTableProxyExecute } from '../../common/utils';
|
|
|
|
export const FIELD: string = 'get';
|
|
|
|
const displayOptions: IDisplayOptions = {
|
|
show: {
|
|
resource: ['row'],
|
|
operation: [FIELD],
|
|
},
|
|
};
|
|
|
|
export const description: INodeProperties[] = [
|
|
...getSelectFields(displayOptions),
|
|
{
|
|
displayName: 'Limit',
|
|
name: 'limit',
|
|
type: 'number',
|
|
typeOptions: {
|
|
minValue: 1,
|
|
},
|
|
displayOptions,
|
|
default: null,
|
|
description: 'Max number of results to return',
|
|
},
|
|
];
|
|
|
|
export async function execute(
|
|
this: IExecuteFunctions,
|
|
index: number,
|
|
): Promise<INodeExecutionData[]> {
|
|
const dataStoreProxy = await getDataTableProxyExecute(this, index);
|
|
|
|
return await executeSelectMany(this, index, dataStoreProxy);
|
|
}
|