You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: domains/cache_plan_repository_test.go
+59-20Lines changed: 59 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,9 @@ var formatted = `queries:
21
21
- created_at
22
22
conditions:
23
23
- column: livestream_id
24
+
operator: eq
25
+
placeholder:
26
+
index: 0
24
27
orders:
25
28
- column: created_at
26
29
order: desc
@@ -35,26 +38,46 @@ var formatted = `queries:
35
38
- COUNT()
36
39
conditions:
37
40
- column: livestream_id
41
+
operator: eq
42
+
placeholder:
43
+
index: 0
38
44
- query: DELETE FROM livecomments WHERE id = ? AND livestream_id = ? AND (SELECT COUNT(*) FROM (SELECT ? AS text) AS texts INNER JOIN (SELECT CONCAT('%', ?, '%') AS pattern) AS patterns ON texts.text LIKE patterns.pattern) >= 1;
39
45
type: delete
40
46
table: livecomments
41
47
conditions:
42
48
- column: id
49
+
operator: eq
50
+
placeholder:
51
+
index: 0
43
52
- column: livestream_id
53
+
operator: eq
54
+
placeholder:
55
+
index: 1
44
56
- query: DELETE FROM livestream_viewers_history WHERE user_id = ? AND livestream_id = ?
45
57
type: delete
46
58
table: livestream_viewers_history
47
59
conditions:
48
60
- column: user_id
61
+
operator: eq
62
+
placeholder:
63
+
index: 0
49
64
- column: livestream_id
50
-
- query: UPDATE settings SET value = ? WHERE name = 'payment_gateway_url'
65
+
operator: eq
66
+
placeholder:
67
+
index: 1
68
+
- query: UPDATE settings SET value = ? WHERE name = ?
51
69
type: update
52
70
table: settings
53
71
targets:
54
-
- value
72
+
- column: value
73
+
placeholder:
74
+
index: 0
55
75
conditions:
56
76
- column: name
57
-
value: payment_gateway_url
77
+
operator: eq
78
+
placeholder:
79
+
index: 0
80
+
extra: true
58
81
`
59
82
60
83
varparsed=&CachePlan{
@@ -65,11 +88,15 @@ var parsed = &CachePlan{
65
88
Query: "SELECT * FROM livecomments WHERE livestream_id = ? ORDER BY created_at DESC",
0 commit comments