sqlserver-2e766f85.js 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. import{g as i}from"./index-15e3682d.js";function c(r,s){for(var e=0;e<s.length;e++){const t=s[e];if(typeof t!="string"&&!Array.isArray(t)){for(const n in t)if(n!=="default"&&!(n in r)){const a=Object.getOwnPropertyDescriptor(t,n);a&&Object.defineProperty(r,n,a.get?a:{enumerable:!0,get:()=>t[n]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}var p={exports:{}};(function(r,s){ace.define("ace/snippets/sqlserver.snippets",["require","exports","module"],function(e,t,n){n.exports=`# ISNULL
  2. snippet isnull
  3. ISNULL(\${1:check_expression}, \${2:replacement_value})
  4. # FORMAT
  5. snippet format
  6. FORMAT(\${1:value}, \${2:format})
  7. # CAST
  8. snippet cast
  9. CAST(\${1:expression} AS \${2:data_type})
  10. # CONVERT
  11. snippet convert
  12. CONVERT(\${1:data_type}, \${2:expression})
  13. # DATEPART
  14. snippet datepart
  15. DATEPART(\${1:datepart}, \${2:date})
  16. # DATEDIFF
  17. snippet datediff
  18. DATEDIFF(\${1:datepart}, \${2:startdate}, \${3:enddate})
  19. # DATEADD
  20. snippet dateadd
  21. DATEADD(\${1:datepart}, \${2:number}, \${3:date})
  22. # DATEFROMPARTS
  23. snippet datefromparts
  24. DATEFROMPARTS(\${1:year}, \${2:month}, \${3:day})
  25. # OBJECT_DEFINITION
  26. snippet objectdef
  27. SELECT OBJECT_DEFINITION(OBJECT_ID('\${1:sys.server_permissions /*object name*/}'))
  28. # STUFF XML
  29. snippet stuffxml
  30. STUFF((SELECT ', ' + \${1:ColumnName}
  31. FROM \${2:TableName}
  32. WHERE \${3:WhereClause}
  33. FOR XML PATH('')), 1, 1, '') AS \${4:Alias}
  34. \${5:/*https://msdn.microsoft.com/en-us/library/ms188043.aspx*/}
  35. # Create Procedure
  36. snippet createproc
  37. -- =============================================
  38. -- Author: \${1:Author}
  39. -- Create date: \${2:Date}
  40. -- Description: \${3:Description}
  41. -- =============================================
  42. CREATE PROCEDURE \${4:Procedure_Name}
  43. \${5:/*Add the parameters for the stored procedure here*/}
  44. AS
  45. BEGIN
  46. -- SET NOCOUNT ON added to prevent extra result sets from interfering with SELECT statements.
  47. SET NOCOUNT ON;
  48. \${6:/*Add the T-SQL statements to compute the return value here*/}
  49. END
  50. GO
  51. # Create Scalar Function
  52. snippet createfn
  53. -- =============================================
  54. -- Author: \${1:Author}
  55. -- Create date: \${2:Date}
  56. -- Description: \${3:Description}
  57. -- =============================================
  58. CREATE FUNCTION \${4:Scalar_Function_Name}
  59. -- Add the parameters for the function here
  60. RETURNS \${5:Function_Data_Type}
  61. AS
  62. BEGIN
  63. DECLARE @Result \${5:Function_Data_Type}
  64. \${6:/*Add the T-SQL statements to compute the return value here*/}
  65. END
  66. GO`}),ace.define("ace/snippets/sqlserver",["require","exports","module","ace/snippets/sqlserver.snippets"],function(e,t,n){t.snippetText=e("./sqlserver.snippets"),t.scope="sqlserver"}),function(){ace.require(["ace/snippets/sqlserver"],function(e){r&&(r.exports=e)})}()})(p);var o=p.exports;const u=i(o),T=c({__proto__:null,default:u},[o]);export{T as s};