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
+52-20Lines changed: 52 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,8 @@ var formatted = `queries:
22
22
conditions:
23
23
- column: livestream_id
24
24
operator: eq
25
+
placeholder:
26
+
index: 0
25
27
orders:
26
28
- column: created_at
27
29
order: desc
@@ -37,31 +39,45 @@ var formatted = `queries:
37
39
conditions:
38
40
- column: livestream_id
39
41
operator: eq
42
+
placeholder:
43
+
index: 0
40
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;
41
45
type: delete
42
46
table: livecomments
43
47
conditions:
44
48
- column: id
45
49
operator: eq
50
+
placeholder:
51
+
index: 0
46
52
- column: livestream_id
47
53
operator: eq
54
+
placeholder:
55
+
index: 1
48
56
- query: DELETE FROM livestream_viewers_history WHERE user_id = ? AND livestream_id = ?
49
57
type: delete
50
58
table: livestream_viewers_history
51
59
conditions:
52
60
- column: user_id
53
61
operator: eq
62
+
placeholder:
63
+
index: 0
54
64
- column: livestream_id
55
65
operator: eq
56
-
- query: UPDATE settings SET value = ? WHERE name = 'payment_gateway_url'
66
+
placeholder:
67
+
index: 1
68
+
- query: UPDATE settings SET value = ? WHERE name = ?
57
69
type: update
58
70
table: settings
59
71
targets:
60
-
- value
72
+
- column: value
73
+
placeholder:
74
+
index: 0
61
75
conditions:
62
76
- column: name
63
-
value: payment_gateway_url
64
77
operator: eq
78
+
placeholder:
79
+
index: 0
80
+
extra: true
65
81
`
66
82
67
83
varparsed=&CachePlan{
@@ -72,11 +88,15 @@ var parsed = &CachePlan{
72
88
Query: "SELECT * FROM livecomments WHERE livestream_id = ? ORDER BY created_at DESC",
0 commit comments