-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtests_query.go
99 lines (98 loc) · 3.46 KB
/
tests_query.go
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
package libgorion
const (
testQueryEmployees = `^SELECT (.+), (.+), (.+), (.+) FROM pList p
JOIN pCompany c ON ((.+) = (.+))
ORDER BY (.+)$`
testQueryEmployeesByCompany = `^SELECT (.+), (.+), (.+), (.+) FROM pList
JOIN pCompany c ON ((.+) = (.+))
WHERE c.Name = (.+)
ORDER BY (.+)$`
testQueryCompanies = `^SELECT (.+), (.+) FROM pList
JOIN pCompany c ON ((.+) = (.+))
GROUP BY (.+)$`
testQueryDoors = "^SELECT (.+), (.+) FROM AcessPoint ORDER BY GIndex$"
testQueryEvents = `^SELECT (.+), (.+), (.+), (.+), (.+), (.+), (.+)
FROM pLogData l
JOIN pList p ON ((.+) = (.+))
JOIN pCompany c ON ((.+) = (.+))
JOIN Events e ON ((.+) = (.+))
JOIN AcessPoint a ON ((.+) = (.+))
WHERE TimeVal BETWEEN (.+) AND (.+)
AND (.+) BETWEEN 26 AND 29
ORDER BY (.+)$`
testQueryEventsByEmployeeAndDoor = `^SELECT (.+), (.+), (.+), (.+), (.+), (.+), (.+)
FROM pLogData l
JOIN pList p ON ((.+) = (.+))
JOIN pCompany c ON ((.+) = (.+))
JOIN Events e ON ((.+) = (.+))
JOIN AcessPoint a ON ((.+) = (.+))
WHERE (.+) BETWEEN (.+) AND (.+)
AND e.Event BETWEEN 26 AND 29
AND p.Name = (.+)
AND DoorIndex = (.+)
ORDER BY (.+)$`
testQueryEventsByEmployee = `^SELECT (.+), (.+), (.+), (.+), (.+), (.+), (.+)
FROM pLogData l
JOIN pList p ON ((.+) = (.+))
JOIN pCompany c ON ((.+) = (.+))
JOIN Events e ON ((.+) = (.+))
JOIN AcessPoint a ON ((.+) = (.+))
WHERE (.+) BETWEEN (.+) AND (.+)
AND e.Event BETWEEN 26 AND 29
AND p.Name = (.+)
ORDER BY (.+)$`
testQueryEventsByDoor = `^SELECT (.+), (.+), (.+), (.+), (.+), (.+), (.+)
FROM pLogData l
JOIN pList p ON ((.+) = (.+))
JOIN pCompany c ON ((.+) = (.+))
JOIN Events e ON ((.+) = (.+))
JOIN AcessPoint a ON ((.+) = (.+))
WHERE TimeVal BETWEEN (.+) AND (.+)
AND e.Event BETWEEN 26 AND 29
AND DoorIndex = (.+)
ORDER BY (.+)$`
testQueryEventsDenied = `^SELECT (.+), (.+), (.+), (.+), (.+), (.+), (.+)
FROM pLogData l
JOIN pList p ON ((.+) = (.+))
JOIN pCompany c ON ((.+) = (.+))
JOIN Events e ON ((.+) = (.+))
JOIN AcessPoint a ON ((.+) = (.+))
WHERE TimeVal BETWEEN (.+) AND (.+)
AND (.+) IN (.+)
ORDER BY (.+)$`
testQueryWorkedTime = `^SELECT (.+), (.+), (.+), (.+), (.+), (.+)
FROM pLogData l
JOIN pList p ON ((.+) = (.+))
JOIN pCompany c ON ((.+) = (.+))
WHERE TimeVal BETWEEN (.+) AND (.+)
GROUP BY (.+), (.+), (.+), (.+), (.+)$`
testQueryWorkedTimeByCompany = `^SELECT (.+), (.+), (.+), (.+), (.+), (.+)
FROM pLogData l
JOIN pList p ON ((.+) = (.+))
JOIN pCompany c ON ((.+) = (.+))
WHERE TimeVal BETWEEN (.+) AND (.+)
AND (.+) = (.+)
GROUP BY (.+), (.+), (.+), (.+), (.+)$`
testQueryWorkedTimeByEmployee = `^SELECT (.+), (.+), (.+), (.+), (.+), (.+)
FROM pLogData l
JOIN pList p ON ((.+) = (.+))
JOIN pCompany c ON ((.+) = (.+))
WHERE TimeVal BETWEEN (.+) AND (.+)
AND (.+) = (.+)
GROUP BY (.+), (.+), (.+), (.+), (.+)$`
testQueryEventsValues = "SELECT (.+), (.+), (.+) from Events"
testQueryFindWorkerIDByName = `^SELECT (.+) FROM pList
WHERE Name = (.+)
AND FirstName = (.+)
AND MidName = (.+)$`
testQueryAddWorker = `^DECLARE (.+) int
SELECT (.+) = (.+) FROM pList
INSERT INTO pList (ID, Status, Name, FirstName, MidName)
VALUES((.+), 5, (.+), (.+), (.+))`
testQueryDeleteWorkerCards = "^DELETE FROM pMark WHERE OwnerName = (.+)$"
testQueryDeleteWorker = `^DELETE FROM pList
WHERE Name = (.+)
AND FirstName = (.+)
AND MidName = (.+)$`
testQueryUpdateWorkerCardStatus = `^UPDATE pMark SET Config = (.+) WHERE OwnerName = (.+)$`
)