{
    "NoSQL": {
        "reservedWords": [
            "use",
            "show",
            "db",
            "collection",
            "find",
            "insert",
            "update",
            "delete",
            "match",
            "group",
            "project",
            "sort",
            "limit",
            "skip",
            "and",
            "or",
            "not",
            "nor",
            "in",
            "nin",
            "all",
            "elemMatch",
            "set",
            "unset",
            "inc",
            "push",
            "pull"
        ],
        "dbTypes": {
            "boolean": "boolean",
            "integer": "integer",
            "decimal": "decimal",
            "string": "string",
            "dateTime": "dateTime",
            "date": "date",
            "time": "time"
        },
        "types": {
            "boolean": "boolean",
            "integer": "integer",
            "decimal": "decimal",
            "string": "string",
            "dateTime": "dateTime",
            "date": "date",
            "time": "time"
        },
        "format": {
            "timestamp": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
            "dateTime": "utc-without-ms",
            "date": "utc-date",
            "time": "HH:mm:ss"
        },
        "support": {
            "sequences": true,
            "tablespaces": false,
            "partitions": false,
            "pkTablespaces": false,
            "ukTablespaces": false,
            "composite": true
        },
        "ddl": {
            "objects": "show collections",
            "tables": "[{names}]",
            "views": "[{names}]",
            "primaryKeys": "[{tableNames}]",
            "uniqueKeys": "[{tableNames}]",
            "foreignKeys": "[{tableNames}]",
            "indexes": "[{tableNames}]",
            "sequences": "[]"
        },
        "dml": {
            "rootMap": "{\"$project\":{\"_id\":0,{0}}} ",
            "map": "{0}",
            "mapGroup": "{\"$group\":{\"_id\":0,{0}}} ",
            "rootFilter": "{\"$match\":{0}}",
            "filter": "{0}",
            "rootGroupBy": "{\"$group\":{\"_id\":{{0}},{1}}}",
            "groupBy": "{0}",
            "having": "{\"$match\":{0}}",
            "sort": "{\"$sort\":{{0}}}",
            "page": "{sentence},{\"$skip\":{offset}},{\"$limit\":{records}}",
            "insert": "{{assigns}}",
            "update": "{{assigns}}",
            "join": "{\"$lookup\":{\"from\":{name},\"localField\":{fromProperty},\"foreignField\":{toProperty},\"as\":{alias}}}",
            "composite": "\"{name}\":{\"$map\":{\"input\":{input},\"in\":{{in}}}}",
            "unwind": "{\"$unwind\":\"{0}\"}",
            "replaceRoot": "{\"$replaceRoot\":{\"newRoot\":\"{0}\"}}"
        },
        "others": {
            "delimiter": "\"{name}\"",
            "string": "\"{name}\"",
            "separatorSql": ";",
            "variable": "\"${name}$\"",
            "field": "\"{prefix}{name}\"",
            "joinField": "\"{entityAlias}.{name}\"",
            "projectJoinField": "{\"$arrayElemAt\":[\"{prefix}{entityAlias}.{name}\",0]}",
            "column": "\"{name}\":1",
            "false": "false",
            "true": "true",
            "sequenceName": "SQ_{name}"
        },
        "operators": {
            "unary": {
                "-": "{\"$multiply\":[{0},-1]}",
                "!": "{\"$not\":[{0}]}"
            },
            "binary": {
                "+": "{\"$add\":[{0},{1}]}",
                "-": "{\"$subtract\":[{0},{1}]}",
                "*": "{\"$multiply\":[{0},{1}]}",
                "/": "{\"$divide\":[{0},{1}]}",
                "**": "{\"$pow\":[{0},{1}]}",
                "//": "{\"$sqrt\":[{0},{1}]}",
                "%": "{\"$mod\":[{0},{1}]}",
                "&": "{\"$bit\":{{0}:{and:{1}}}}",
                "|": "{\"$bit\":{{0}:{or:{1}}}}",
                "^": "{\"$bit\":{{0}:{xor:{1}}}}",
                "==": "{{0}:{1}}",
                "===": "{{0}:{1}}",
                "!=": "{{0}:{\"$ne\":{1}}}",
                "!==": "{{0}:{\"$ne\":{1}}}",
                ">": "{{0}:{\"$gt\":{1}}}",
                "<": "{{0}:{\"$lt\":{1}}}",
                ">=": "{{0}:{\"$gte\":{1}}}",
                "<=": "{{0}:{\"$lte\":{1}}}",
                "&&": "{\"$and\":[{0},{1}]}",
                "||": "{\"$or\":[{0},{1}]}",
                "=": "\"{0}\":{1}"
            },
            "ternary": {
                "?": "{\"$cond\":{{0},{1},{2}}}"
            }
        },
        "functions": {
            "general": {
                "as": "{alias}:{value}",
                "desc": "{0}:-1",
                "asc": "{0}:1",
                "between": "{{0}:{\"$gte\":{1},\"$lt\":{2}}}",
                "includes": "{{0}:{\"$in\":[{1}]}}",
                "in": "{{0}:{\"$in\":[{1}]} }",
                "distinct": "{\"$group\":{\"_id\":null,\"__distinct\":{\"$addToSet\":{{0}}}}}"
            },
            "numeric": {
                "abs": "{\"$abs\":{0}}",
                "acos": "{\"$acos\":{0}}",
                "asin": "{\"$asin\":{0}}",
                "atan": "{\"$atan\":{0}}",
                "atan2": "{\"$atan2\":[{0},{1}]}",
                "ceil": "{\"$ceil\":{0}}",
                "cos": "{\"$cos\":{0}}",
                "cosh": "{\"$cosh\":{0}}",
                "exp": "{\"$exp\":{0}}",
                "floor": "{\"$floor\":{0}}",
                "ln": "{\"$ln\":{0}}",
                "log": "{\"$log\":[{0},{1}]}",
                "log10": "{\"$log10\":{0}}",
                "round": "{\"$round\":[{0},{1}]}",
                "sign": "{\"$cond\":{\"if\":{\"$gt\":[{0},0]},\"then\":1,\"else\":{\"if\":{\"$lt\":[{0},0]},\"then\":-1,\"else\":0}}}",
                "sin": "{\"$sin\":{0}}",
                "sinh": "{\"$sinh\":{0}}",
                "tan": "{\"$tan\":{0}}",
                "tanh": "{\"$tanh\":{0}}",
                "trunc": "{\"$trunc\":{0}}"
            },
            "string": {
                "lower": "{\"$toLower\":{0}}",
                "ltrim": "{\"$ltrim\":{input:{0},chars:\" \"}}",
                "replace": "{\"$replaceAll\":{input:{0},find:{1},replacement:{2}}}",
                "rtrim": "{\"$rtrim\":{input:{0},chars:\" \"}}",
                "substr": "{\"$substr\":[{0},{1},{2}]}",
                "trim": "{\"$trim\":{input:{0}, chars:\" \"}}",
                "upper": "{\"$toUpper\":{0}}",
                "length": "{\"$strLenCP\":{0}}",
                "like": "{{0}:/{1}/}",
                "startsWith": "{{0}:{$regex:/^{1}/}}",
                "startWith": "{{0}:{$regex:/^{1}/}}",
                "includes": "{{0}:{$regex:\"{1}\"}}"
            },
            "dateTime": {
                "curtime": "\"$$CLUSTER_TIME\"",
                "today": "{\"$currentDate\":{\"$type\":\"date\"}}",
                "timestamp": "{\"$currentDate\":{\"$type\":\"timestamp\"}}",
                "now": "\"$$NOW\"",
                "date": "{\"$toDate\":{0}}",
                "year": "{\"$year\":{0}}",
                "month": "{\"$month\":{0}}",
                "day": "{\"$day\":{0}}",
                "weekday": "{\"$dayOfWeek\":{0}}",
                "hours": "{\"$hour\":{0}}",
                "minutes": "{\"$minutes\":{0} }",
                "seconds": "{\"$seconds\":{0} }",
                "addYear": "{\"$dateAdd\":{startDate:{0},unit:\"year\",amount:{1}} }",
                "addMonth": "{\"$dateAdd\":{startDate:{0},unit:\"month\",amount:{1}} }",
                "addDay": "{\"$dateAdd\":{startDate:{0},unit:\"day\",amount:{1}} }",
                "addHours": "{\"$dateAdd\":{startDate:{0},unit:\"hour\",amount:{1}} }",
                "addMinutes": "{\"$dateAdd\":{startDate:{0},unit:\"minute\",amount:{1}} }",
                "addSeconds": "{\"$dateAdd\":{startDate:{0},unit:\"seconds\",amount:{1}} }",
                "addTime": "{\"$dateAdd\":{startDate:{0},unit:\"seconds\",amount:{1}} }",
                "dateDiff": "{\"$dateDiff\":{startDate:{0},endDate:{1},unit:\"day\"} }",
                "timeDiff": "{\"$dateDiff\":{startDate:{0},endDate:{1},unit:\"hour\"} }"
            },
            "convert": {
                "toString": "{\"$toString\":{0}}",
                "toDate": "{\"$toDate\":{0}}",
                "toDateTime": "{\"$toDate\":{0}}",
                "toTime": "{\"$toDate\":{0}}",
                "toNumber": "{\"toDecimal\":{0}}"
            },
            "metadata": null,
            "null": {
                "nvl": "{\"$cond\":{\"$ifNull\":[{0}],{1},{0}}}",
                "nvl2": "{\"$cond\":{\"$ifNull\":[{0}],{1},{2}}}",
                "isNull": "{\"$ifNull\":[{0}]}",
                "isNotNull": "{\"$not\":[\"$ifNull\":[{0}]]}"
            },
            "multiple": {
                "concat": "{\"$concat\":[{accumulated},{value}]}"
            },
            "group": {
                "avg": "{\"$avg\":{0}}",
                "count": "{\"$sum\": 1}",
                "first": "{\"$first\":{0}}",
                "last": "{\"$last\":{0}}",
                "max": "{\"$max\":{0}}",
                "min": "{\"$min\":{0}}",
                "sum": "{\"$sum\":{0}}"
            }
        }
    },
    "dialects": {
        "MongoDB": {
            "reservedWords": [
                "use",
                "show",
                "db",
                "collection",
                "find",
                "insert",
                "update",
                "delete",
                "match",
                "group",
                "project",
                "sort",
                "limit",
                "skip",
                "and",
                "or",
                "not",
                "nor",
                "in",
                "nin",
                "all",
                "elemMatch",
                "set",
                "unset",
                "inc",
                "push",
                "pull"
            ],
            "dbTypes": {
                "boolean": "boolean",
                "integer": "integer",
                "decimal": "decimal",
                "string": "string",
                "dateTime": "dateTime",
                "date": "date",
                "time": "time"
            },
            "types": {
                "boolean": "boolean",
                "integer": "integer",
                "decimal": "decimal",
                "string": "string",
                "dateTime": "dateTime",
                "date": "date",
                "time": "time"
            },
            "format": {
                "timestamp": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
                "dateTime": "utc-without-ms",
                "date": "utc-date",
                "time": "HH:mm:ss"
            },
            "support": {
                "sequences": true,
                "tablespaces": false,
                "partitions": false,
                "pkTablespaces": false,
                "ukTablespaces": false,
                "composite": true
            },
            "ddl": {
                "objects": "show collections",
                "tables": "[{names}]",
                "views": "[{names}]",
                "primaryKeys": "[{tableNames}]",
                "uniqueKeys": "[{tableNames}]",
                "foreignKeys": "[{tableNames}]",
                "indexes": "[{tableNames}]",
                "sequences": "[]"
            },
            "dml": {
                "rootMap": "{\"$project\":{\"_id\":0,{0}}} ",
                "map": "{0}",
                "mapGroup": "{\"$group\":{\"_id\":0,{0}}} ",
                "rootFilter": "{\"$match\":{0}}",
                "filter": "{0}",
                "rootGroupBy": "{\"$group\":{\"_id\":{{0}},{1}}}",
                "groupBy": "{0}",
                "having": "{\"$match\":{0}}",
                "sort": "{\"$sort\":{{0}}}",
                "page": "{sentence},{\"$skip\":{offset}},{\"$limit\":{records}}",
                "insert": "{{assigns}}",
                "update": "{{assigns}}",
                "join": "{\"$lookup\":{\"from\":{name},\"localField\":{fromProperty},\"foreignField\":{toProperty},\"as\":{alias}}}",
                "composite": "\"{name}\":{\"$map\":{\"input\":{input},\"in\":{{in}}}}",
                "unwind": "{\"$unwind\":\"{0}\"}",
                "replaceRoot": "{\"$replaceRoot\":{\"newRoot\":\"{0}\"}}"
            },
            "others": {
                "delimiter": "\"{name}\"",
                "string": "\"{name}\"",
                "separatorSql": ";",
                "variable": "\"${name}$\"",
                "field": "\"{prefix}{name}\"",
                "joinField": "\"{entityAlias}.{name}\"",
                "projectJoinField": "{\"$arrayElemAt\":[\"{prefix}{entityAlias}.{name}\",0]}",
                "column": "\"{name}\":1",
                "false": "false",
                "true": "true",
                "sequenceName": "SQ_{name}"
            },
            "operators": {
                "unary": {
                    "-": "{\"$multiply\":[{0},-1]}",
                    "!": "{\"$not\":[{0}]}"
                },
                "binary": {
                    "+": "{\"$add\":[{0},{1}]}",
                    "-": "{\"$subtract\":[{0},{1}]}",
                    "*": "{\"$multiply\":[{0},{1}]}",
                    "/": "{\"$divide\":[{0},{1}]}",
                    "**": "{\"$pow\":[{0},{1}]}",
                    "//": "{\"$sqrt\":[{0},{1}]}",
                    "%": "{\"$mod\":[{0},{1}]}",
                    "&": "{\"$bit\":{{0}:{and:{1}}}}",
                    "|": "{\"$bit\":{{0}:{or:{1}}}}",
                    "^": "{\"$bit\":{{0}:{xor:{1}}}}",
                    "==": "{{0}:{1}}",
                    "===": "{{0}:{1}}",
                    "!=": "{{0}:{\"$ne\":{1}}}",
                    "!==": "{{0}:{\"$ne\":{1}}}",
                    ">": "{{0}:{\"$gt\":{1}}}",
                    "<": "{{0}:{\"$lt\":{1}}}",
                    ">=": "{{0}:{\"$gte\":{1}}}",
                    "<=": "{{0}:{\"$lte\":{1}}}",
                    "&&": "{\"$and\":[{0},{1}]}",
                    "||": "{\"$or\":[{0},{1}]}",
                    "=": "\"{0}\":{1}"
                },
                "ternary": {
                    "?": "{\"$cond\":{{0},{1},{2}}}"
                }
            },
            "functions": {
                "general": {
                    "as": "{alias}:{value}",
                    "desc": "{0}:-1",
                    "asc": "{0}:1",
                    "between": "{{0}:{\"$gte\":{1},\"$lt\":{2}}}",
                    "includes": "{{0}:{\"$in\":[{1}]}}",
                    "in": "{{0}:{\"$in\":[{1}]} }",
                    "distinct": "{\"$group\":{\"_id\":null,\"__distinct\":{\"$addToSet\":{{0}}}}}"
                },
                "numeric": {
                    "abs": "{\"$abs\":{0}}",
                    "acos": "{\"$acos\":{0}}",
                    "asin": "{\"$asin\":{0}}",
                    "atan": "{\"$atan\":{0}}",
                    "atan2": "{\"$atan2\":[{0},{1}]}",
                    "ceil": "{\"$ceil\":{0}}",
                    "cos": "{\"$cos\":{0}}",
                    "cosh": "{\"$cosh\":{0}}",
                    "exp": "{\"$exp\":{0}}",
                    "floor": "{\"$floor\":{0}}",
                    "ln": "{\"$ln\":{0}}",
                    "log": "{\"$log\":[{0},{1}]}",
                    "log10": "{\"$log10\":{0}}",
                    "round": "{\"$round\":[{0},{1}]}",
                    "sign": "{\"$cond\":{\"if\":{\"$gt\":[{0},0]},\"then\":1,\"else\":{\"if\":{\"$lt\":[{0},0]},\"then\":-1,\"else\":0}}}",
                    "sin": "{\"$sin\":{0}}",
                    "sinh": "{\"$sinh\":{0}}",
                    "tan": "{\"$tan\":{0}}",
                    "tanh": "{\"$tanh\":{0}}",
                    "trunc": "{\"$trunc\":{0}}"
                },
                "string": {
                    "lower": "{\"$toLower\":{0}}",
                    "ltrim": "{\"$ltrim\":{input:{0},chars:\" \"}}",
                    "replace": "{\"$replaceAll\":{input:{0},find:{1},replacement:{2}}}",
                    "rtrim": "{\"$rtrim\":{input:{0},chars:\" \"}}",
                    "substr": "{\"$substr\":[{0},{1},{2}]}",
                    "trim": "{\"$trim\":{input:{0}, chars:\" \"}}",
                    "upper": "{\"$toUpper\":{0}}",
                    "length": "{\"$strLenCP\":{0}}",
                    "like": "{{0}:/{1}/}",
                    "startsWith": "{{0}:{$regex:/^{1}/}}",
                    "startWith": "{{0}:{$regex:/^{1}/}}",
                    "includes": "{{0}:{$regex:\"{1}\"}}"
                },
                "dateTime": {
                    "curtime": "\"$$CLUSTER_TIME\"",
                    "today": "{\"$currentDate\":{\"$type\":\"date\"}}",
                    "timestamp": "{\"$currentDate\":{\"$type\":\"timestamp\"}}",
                    "now": "\"$$NOW\"",
                    "date": "{\"$toDate\":{0}}",
                    "year": "{\"$year\":{0}}",
                    "month": "{\"$month\":{0}}",
                    "day": "{\"$day\":{0}}",
                    "weekday": "{\"$dayOfWeek\":{0}}",
                    "hours": "{\"$hour\":{0}}",
                    "minutes": "{\"$minutes\":{0} }",
                    "seconds": "{\"$seconds\":{0} }",
                    "addYear": "{\"$dateAdd\":{startDate:{0},unit:\"year\",amount:{1}} }",
                    "addMonth": "{\"$dateAdd\":{startDate:{0},unit:\"month\",amount:{1}} }",
                    "addDay": "{\"$dateAdd\":{startDate:{0},unit:\"day\",amount:{1}} }",
                    "addHours": "{\"$dateAdd\":{startDate:{0},unit:\"hour\",amount:{1}} }",
                    "addMinutes": "{\"$dateAdd\":{startDate:{0},unit:\"minute\",amount:{1}} }",
                    "addSeconds": "{\"$dateAdd\":{startDate:{0},unit:\"seconds\",amount:{1}} }",
                    "addTime": "{\"$dateAdd\":{startDate:{0},unit:\"seconds\",amount:{1}} }",
                    "dateDiff": "{\"$dateDiff\":{startDate:{0},endDate:{1},unit:\"day\"} }",
                    "timeDiff": "{\"$dateDiff\":{startDate:{0},endDate:{1},unit:\"hour\"} }"
                },
                "convert": {
                    "toString": "{\"$toString\":{0}}",
                    "toDate": "{\"$toDate\":{0}}",
                    "toDateTime": "{\"$toDate\":{0}}",
                    "toTime": "{\"$toDate\":{0}}",
                    "toNumber": "{\"toDecimal\":{0}}"
                },
                "metadata": null,
                "null": {
                    "nvl": "{\"$cond\":{\"$ifNull\":[{0}],{1},{0}}}",
                    "nvl2": "{\"$cond\":{\"$ifNull\":[{0}],{1},{2}}}",
                    "isNull": "{\"$ifNull\":[{0}]}",
                    "isNotNull": "{\"$not\":[\"$ifNull\":[{0}]]}"
                },
                "multiple": {
                    "concat": "{\"$concat\":[{accumulated},{value}]}"
                },
                "group": {
                    "avg": "{\"$avg\":{0}}",
                    "count": "{\"$sum\": 1}",
                    "first": "{\"$first\":{0}}",
                    "last": "{\"$last\":{0}}",
                    "max": "{\"$max\":{0}}",
                    "min": "{\"$min\":{0}}",
                    "sum": "{\"$sum\":{0}}"
                }
            }
        }
    }
}
