{
  "synLogic": "int $ret \u003d $api($1);",
  "help": "The ns_mongodb_execute_direct API is used to run MongoDB query. \r\nMongoDB supports various type of queries. NS support following type of queries:\r\n\t- Find \r\n\t- Aggregation\r\n\t- Command",
  "notes": "1. query_type\r\n\t- This field provide query types\r\n\t\t|Query Type\t|Mapped value\t|Macro\t\t|\r\n\t\t|Find\t\t|\t0\t\t\t|FIND\t\t|\r\n\t\t|Aggregation|\t1\t\t\t|AGGREGATION|\r\n\t\t|Command\t|\t2\t\t\t|CMD\t\t|\r\n2. query\r\n\t- Provide json query string\r\n\t- It can  be parameterised",
  "returns": "This api returns '0' on success and '-1' on failure.",
  "arguments": "\u003ctable class\u003d\"newGuiTable\"  style\u003d\"width:100%\"  \u003e 	\u003ctr\u003e 		\u003cth\u003e Argument \u003c/th\u003e     		\u003cth\u003e Description \u003c/th\u003e     	\u003c/tr\u003e 	\u003ctr\u003e    		\u003ctd\u003e query \u003c/td\u003e     		\u003ctd\u003e query in json format \u003c/td\u003e     	\u003c/tr\u003e  \u003c/table\u003e",
  "parameterization": "query can be parameterized",
  "name": "ns_mongodb_execute_direct",
  "syntax": "int ns_mongodb_execute_direct(char *query)",
  "javaSyntax": "",
  "cEx": "flow()\n{\n  char *query = \"{ \"query_type\": 0, \"query\": { \"name\": \"John\" } }\";\n  int result = ns_mongodb_execute_direct(query);\n\n  if (result == 0) {\n    printf(\"Query executed successfully.\");\n  } else {\n    printf(\"Query failed.\");\n  }\n}",
  "javaEx": "",
  "insertStrC": "ns_mongodb_execute_direct(char *query);",
  "insertStrJava": "",
  "description": "The ns_mongodb_execute_direct API is used to run MongoDB query.",
  "component":[
    {
      "id": "$1",
      "type": "TextField",
      "label": "Query",
      "value": "",
      "css": "p-grid p-align-center w-100-p",
      "title": "Enter query",
      "placeHolder": "",
      "style": "",
      "isDisabled": "",
      "labelVarCheckbox": "",
      "argIndex": 0,
      "validate": {
        "inputType": "Text",
        "disabled": false,
        "required": true,
        "min": 0,
        "max": 0
      }
    }
  ]
}
