ToolJet/frontend/src/Editor/QueryManager/QueryEditors/Mongodb.schema.json

60 lines
1.7 KiB
JSON
Raw Normal View History

{
"$schema": "https://json-schema.org/",
"$id": "https://tooljet.io/dataqueries/Mongodb.schema.json",
"title": "Mongodb datasource",
"description": "A schema defining Mongodb datasource",
"type": "object",
"defaults": {
"document": "{ }"
},
"properties": {
"operation": {
"$label": "Operation",
"$key": "operation",
"type": "dropdown-component-flip",
"description": "Single select dropdown for operation",
"$options": [
{ "name": "List collections", "value": "list_collections" },
{ "name": "Insert one document", "value": "insert_one" },
{ "name": "Insert many documents", "value": "insert_many" }
]
},
"insert_one": {
"collection": {
"$label": "Collection",
"$key": "collection",
"type": "codehinter",
"lineNumbers": false,
"description": "Enter collection"
},
"document": {
"$label": "Document",
"$key": "document",
"type": "codehinter",
"mode": "javascript",
"placeholder": "{ 'name': 'Steve', 'hobbies': [ 'hiking', 'tennis', 'fly fishing' ] }",
"description": "Enter document",
"height": "150px"
}
},
"insert_many": {
"collection": {
"$label": "Collection",
"$key": "collection",
"type": "codehinter",
"lineNumbers": false,
"description": "Enter collection"
},
"document": {
"$label": "Documents",
"$key": "documents",
"type": "codehinter",
"mode": "javascript",
"placeholder": "[ { '_id': 1, 'name': 'Steve' }, { '_id': 2, 'name': 'Sally' } ]",
"description": "Enter document",
"height": "150px"
}
}
}
}