crateDb.json•4.04 kB
{
"nodeType": "n8n-nodes-base.crateDb",
"displayName": "CrateDB",
"description": "Add and update data in CrateDB",
"version": 1,
"properties": [
{
"name": "operation",
"displayName": "Operation",
"type": "options",
"default": "insert",
"description": "Execute an SQL query",
"options": [
{
"name": "Execute Query",
"value": "executeQuery",
"description": "Execute an SQL query"
},
{
"name": "Insert",
"value": "insert",
"description": "Insert rows in database"
},
{
"name": "Update",
"value": "update",
"description": "Update rows in database"
}
]
},
{
"name": "query",
"displayName": "Query",
"type": "string",
"default": "",
"description": "The SQL query to execute. You can use n8n expressions or $1 and $2 in conjunction with query parameters.",
"placeholder": "SELECT id, name FROM product WHERE quantity > $1 AND price <= $2",
"required": true,
"typeOptions": {
"rows": 5
},
"displayOptions": {
"show": {
"operation": [
"executeQuery"
]
}
}
},
{
"name": "schema",
"displayName": "Schema",
"type": "string",
"default": "doc",
"description": "Name of the schema the table belongs to",
"required": true,
"displayOptions": {
"show": {
"operation": [
"insert"
]
}
}
},
{
"name": "table",
"displayName": "Table",
"type": "string",
"default": "",
"description": "Name of the table in which to insert data to",
"required": true,
"displayOptions": {
"show": {
"operation": [
"insert"
]
}
}
},
{
"name": "columns",
"displayName": "Columns",
"type": "string",
"default": "",
"description": "Comma-separated list of the properties which should used as columns for the new rows",
"placeholder": "id,name,description",
"displayOptions": {
"show": {
"operation": [
"insert"
]
}
}
},
{
"name": "updateKey",
"displayName": "Update Key",
"type": "string",
"default": "id",
"description": "Comma-separated list of the properties which decides which rows in the database should be updated. Normally that would be \"id\".",
"required": true,
"displayOptions": {
"show": {
"operation": [
"update"
]
}
}
},
{
"name": "returnFields",
"displayName": "Return Fields",
"type": "string",
"default": "*",
"description": "Comma-separated list of the fields that the operation will return",
"displayOptions": {
"show": {
"operation": [
"insert",
"update"
]
}
}
},
{
"name": "additionalFields",
"displayName": "Additional Fields",
"type": "collection",
"default": {},
"description": "Execute each query independently",
"placeholder": "Add Field",
"displayOptions": {
"show": {
"/operation": [
"executeQuery"
]
}
}
}
],
"credentialsConfig": [
{
"name": "crateDb",
"required": true
},
{
"name": "operation",
"required": false
},
{
"name": "query",
"required": true
},
{
"name": "queryParams",
"required": false
}
],
"io": {
"inputs": [
"Main"
],
"outputs": [
"Main"
],
"outputNames": [],
"hints": {}
},
"wiring": {
"role": "generic",
"requires": [],
"optional": [],
"consumedBy": [],
"consumes": [
"Main"
],
"produces": [
"Main"
]
}
}