forked from ajaxorg/ace-builds
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
384 changed files
with
3,540 additions
and
1,370 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
-- ============================================= | ||
-- Author: Morgan Yarbrough | ||
-- Create date: 4/27/2015 | ||
-- Description: Test procedure that shows off language features. | ||
-- Includes non-standard folding with region comments using either | ||
-- line comments or block comments (both are demonstrated below). | ||
-- This mode imitates SSMS and it designed to be used with SQL Server theme. | ||
-- ============================================= | ||
CREATE PROCEDURE dbo.TestProcedure | ||
|
||
--#region parameters | ||
@vint INT = 1 | ||
,@vdate DATE = NULL | ||
,@vdatetime DATETIME = DATEADD(dd, 1, GETDATE()) | ||
,@vvarchar VARCHAR(MAX) = '' | ||
--#endregion | ||
|
||
AS | ||
BEGIN | ||
|
||
/*#region set statements */ | ||
SET NOCOUNT ON; | ||
SET XACT_ABORT ON; | ||
SET QUOTED_IDENTIFIER ON; | ||
/*#endregion*/ | ||
|
||
/** | ||
* These comments will produce a fold widget | ||
*/ | ||
|
||
-- folding demonstration | ||
SET @vint = CASE | ||
WHEN @vdate IS NULL | ||
THEN 1 | ||
ELSE 2 | ||
END | ||
|
||
-- another folding demonstration | ||
IF @vint = 1 | ||
BEGIN | ||
SET @vvarchar = 'one' | ||
SET @vint = DATEDIFF(dd, @vdate, @vdatetime) | ||
END | ||
|
||
-- this mode handles strings properly | ||
DECLARE @sql NVARCHAR(4000) = N'SELECT TOP(1) OrderID | ||
FROM Orders | ||
WHERE @OrderDate > GETDATE()' | ||
|
||
-- this mode is aware of built in stored procedures | ||
EXECUTE sp_executesql @sql | ||
|
||
-- demonstrating some syntax highlighting | ||
SELECT Orders.OrderID | ||
,Customers.CompanyName | ||
,DATEFROMPARTS(YEAR(GETDATE()), 1, 1) AS FirstDayOfYear | ||
FROM Orders | ||
INNER JOIN Customers | ||
ON Orders.CustomerID = Customers.CustomerID | ||
WHERE CompanyName NOT LIKE '%something' | ||
OR CompanyName IS NULL | ||
OR CompanyName IN ('bla', 'nothing') | ||
|
||
-- this mode includes snippets | ||
-- place your cusor at the end of the line below and trigger auto complete (Ctrl+Space) | ||
createpr | ||
|
||
-- SQL Server allows using keywords as object names (not recommended) as long as they are wrapped in brackets | ||
DATABASE -- keyword | ||
[DATABASE] -- not a keyword | ||
|
||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.