UNPKG

@kusto/monaco-kusto

Version:

CSL, KQL plugin for the Monaco Editor

8 lines (7 loc) 2.07 kB
/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * monaco-kusto version: 13.1.1(178105a761985a9b7c16d45b528f829e1c112ff0) * Released under the MIT license * https://https://github.com/Azure/monaco-kusto/blob/master/README.md *-----------------------------------------------------------------------------*/ define("vs/language/kusto/schema-dc2253f5",["exports"],(function(t){"use strict";var n={"System.SByte":"bool","System.Byte":"uint8","System.Int16":"int16","System.UInt16":"uint16","System.Int32":"int","System.UInt32":"uint","System.Int64":"long","System.UInt64":"ulong","System.String":"string","System.Single":"float","System.Double":"real","System.DateTime":"datetime","System.TimeSpan":"timespan","System.Guid":"guid","System.Boolean":"bool","Newtonsoft.Json.Linq.JArray":"dynamic","Newtonsoft.Json.Linq.JObject":"dynamic","Newtonsoft.Json.Linq.JToken":"dynamic","System.Object":"dynamic","System.Data.SqlTypes.SqlDecimal":"decimal"},e=function(t){return n[t]||t},a={object:"Object",bool:"Boolean",uint8:"Byte",int16:"Int16",uint16:"UInt16",int:"Int32",uint:"UInt32",long:"Int64",ulong:"UInt64",float:"Single",real:"Double",decimal:"Decimal",datetime:"DateTime",string:"String",dynamic:"Dynamic",timespan:"TimeSpan"},o=function(t){return"(".concat(t.map((function(t){return i(t)})).join(","),")")},i=function(t){if(t.columns&&t.columns.length>0){var n=t.columns.map((function(t){return"".concat(t.name,":").concat(t.cslType||e(t.type))})).join(",");return"".concat(t.name,":").concat(""===n?"*":n)}return"".concat(t.name,":").concat(t.cslType||e(t.type))};t.getCallName=function(t){return"".concat(t.name,"(").concat(t.inputParameters.map((function(t){return"{".concat(t.name,"}")})).join(","),")")},t.getCslTypeNameFromClrType=e,t.getEntityDataTypeFromCslType=function(t){return a[t]||t},t.getExpression=function(t){return"let ".concat(t.name," = ").concat(o(t.inputParameters)," ").concat(t.body)},t.getInputParametersAsCslString=o,t.showSchema=undefined}));