placeholder:'SELECT id, name FROM product WHERE id < 40',
required: true,
description:'The SQL query to execute',
},
// ----------------------------------
// insert
// ----------------------------------
{
displayName:'Table',
name:'table',
type:'resourceLocator',
default:{mode:'list',value:''},
required: true,
modes:[
{
displayName:'From List',
name:'list',
type:'list',
placeholder:'Select a Table...',
typeOptions:{
searchListMethod:'searchTables',
searchFilterRequired: false,
searchable: true,
},
},
{
displayName:'Name',
name:'name',
type:'string',
placeholder:'table_name',
},
],
displayOptions:{
show:{
operation:['insert'],
},
},
description:'Name of the table in which to insert data to',
},
{
displayName:'Columns',
name:'columns',
type:'string',
displayOptions:{
show:{
operation:['insert'],
},
},
requiresDataPath:'multiple',
default:'',
placeholder:'id,name,description',
description:
'Comma-separated list of the properties which should used as columns for the new rows',
},
{
displayName:'Options',
name:'options',
type:'collection',
displayOptions:{
show:{
operation:['insert'],
},
},
default:{},
placeholder:'Add modifiers',
description:'Modifiers for INSERT statement',
options:[
{
displayName:'Ignore',
name:'ignore',
type:'boolean',
default:true,
description:
'Whether to ignore any ignorable errors that occur while executing the INSERT statement',
},
{
displayName:'Priority',
name:'priority',
type:'options',
options:[
{
name:'Low Prioirity',
value:'LOW_PRIORITY',
description:
'Delays execution of the INSERT until no other clients are reading from the table',
},
{
name:'High Priority',
value:'HIGH_PRIORITY',
description:
'Overrides the effect of the --low-priority-updates option if the server was started with that option. It also causes concurrent inserts not to be used.',
},
],
default:'LOW_PRIORITY',
description:
'Ignore any ignorable errors that occur while executing the INSERT statement',
},
],
},
// ----------------------------------
// update
// ----------------------------------
{
displayName:'Table',
name:'table',
type:'resourceLocator',
default:{mode:'list',value:''},
required: true,
modes:[
{
displayName:'From List',
name:'list',
type:'list',
placeholder:'Select a Table...',
typeOptions:{
searchListMethod:'searchTables',
searchFilterRequired: false,
searchable: true,
},
},
{
displayName:'Name',
name:'name',
type:'string',
placeholder:'table_name',
},
],
displayOptions:{
show:{
operation:['update'],
},
},
description:'Name of the table in which to update data in',