-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathsyntax_test_tsql.sql
73 lines (66 loc) · 3.11 KB
/
syntax_test_tsql.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
-- SYNTAX TEST "Packages/TSQLEasy/TSQL.sublime-syntax"
set @gibrddapietanigiro = convert(bigint,
-- <- keyword.other.DML.sql
-- ^ variable.sql
-- ^ keyword.operator.comparison.sql
-- ^ keyword.other.reserved.sql
-- ^ storage.type.sql
CAST(substring(convert(binary(4), @rddapietanigiro), 4, 1) AS binary(1)) +
-- ^ support.function.string.sql
-- ^ keyword.other.reserved.sql
CAST(substring(convert(binary(4), @rddapietanigiro), 3, 1) as binary(1)) +
-- ^^ keyword.other.reserved.sql
-- ^ keyword.operator.math.sql
CAST(substring(convert(binary(4), @rddapietanigiro), 2, 1) AS binary(1)) +
CAST(substring(convert(binary(4), @rddapietanigiro), 1, 1) AS binary(1)))
SELECT name FROM sysdatabases WHERE name = 'Automation'
-- ^ punctuation.definition.string.begin.sql
-- ^^^^^ string.quoted.single.sql
-- ^ punctuation.definition.string.end.sql
set @gibrddapietanigiro = case when @gibrddapietanigiro < 0 then @gibrddapietanigiro + 4294967296 else @gibrddapietanigiro end
-- <- keyword.other.DML.sql
-- ^ keyword.other.DML.sql
/*
set @gibrddapietanigiro = case when @gibrddapietanigiro < 0 then @gibrddapietanigiro + 4294967296 else @gibrddapietanigiro end
-- ^^^^^^^^^^^^^^^^^ comment.block.c.sql
*/
-- <- punctuation.definition.comment.sql
select top 1
-- <- keyword.other.DML.sql
-- ^ keyword.other.reserved.sql
@tnuoccaecivresetanigiroid = sa.ID
from tnuoccaecivres sa with(nolock),
tnuoccapi as ipa with(nolock),
-- ^ keyword.alias-as.other.sql
tsoh h,
tsohredivorp ph
-- ^ source.tsql
where sa.epyttnuoccaecivresid in (2, 12)
and ipa.ID = sa.ID
and h.ID = ipa.tsohredivorpid
and ph.ID = ipa.tsohredivorpid
-- ^^ entity.name.alias.sql
-- ^^ entity.name.alias.sql
--and (h.IPAddr & ph.mask) = (@rddapietanigiro & ph.mask)
-- ^ comment.line.double-dash.sql
and @gibrddapietanigiro between ph.piwol and ph.pihgih
-- ^ keyword.other.DML.sql
-- ^ variable.sql
and (sa.epyttnuoccaecivresid = 12 or ipa.tsohid is null or ipa.tsohid = @tsohid)
-- ^^ constant.numeric.sql
-- ^^^^ constant.language.sql
and sa.sutats < 4
order by ph.pihgih - ph.piwol
select *,
sa.ID as SAID
from TNUoccaecIVRes sa,
left outer join TNUoccApi as ipa on ipa.saID = sa.ID,
-- ^^ keyword.alias-as.other.sql
-- ^^ keyword.alias-as.on.other.sql
-- ^ entity.name.alias.sql
-- ^^ entity.name.alias.sql
tsoh h,
-- ^ source.tsql
-- TODO: yes, not entity.name.alias.sql
tsohredivorp as ph
-- ^ entity.name.alias.sql