-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathudatamodule.lfm
More file actions
250 lines (250 loc) · 5.83 KB
/
udatamodule.lfm
File metadata and controls
250 lines (250 loc) · 5.83 KB
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
object dmPgEngine: TdmPgEngine
OldCreateOrder = False
Height = 524
HorizontalOffset = 1284
VerticalOffset = 619
Width = 668
PPI = 144
object dsChains: TDataSource
DataSet = qryChains
Left = 108
Top = 48
end
object connMain: TPQConnection
Connected = False
LoginPrompt = True
OnLogin = connMainLogin
DatabaseName = 'timetable'
KeepConnection = False
Password = 'somestrong'
Transaction = transChains
UserName = 'scheduler'
OnLog = connMainLog
LogEvents = [detPrepare, detExecute, detCommit, detParamValue, detActualSQL]
Left = 105
Top = 312
end
object qryChains: TSQLQuery
PacketRecords = -1
IndexName = 'DEFAULT_ORDER'
MaxIndexesCount = 20
FieldDefs = <
item
Name = 'chain_id'
DataType = ftLargeint
Precision = -1
end
item
Name = 'chain_name'
DataType = ftWideString
Precision = -1
end
item
Name = 'run_at'
DataType = ftMemo
Precision = -1
end
item
Name = 'max_instances'
DataType = ftInteger
Precision = -1
end
item
Name = 'live'
DataType = ftBoolean
Precision = -1
end
item
Name = 'self_destruct'
DataType = ftBoolean
Precision = -1
end
item
Name = 'exclusive_execution'
DataType = ftBoolean
Precision = -1
end
item
Name = 'client_name'
DataType = ftMemo
Precision = -1
end
item
Name = 'timeout'
DataType = ftInteger
Precision = -1
end>
AfterClose = qryChainsAfterClose
AfterDelete = qryChainsAfterDelete
AfterInsert = qryChainsAfterInsert
AfterPost = qryAfterPost
BeforeDelete = qryChainsBeforeDelete
Database = connMain
Transaction = transChains
SQL.Strings = (
'SELECT'
' chain_id,'
' chain_name,'
' COALESCE(run_at, ''* * * * *'') as run_at,'
' max_instances,'
' live,'
' self_destruct,'
' exclusive_execution,'
' client_name,'
' timeout'
'FROM timetable.chain'
'ORDER BY chain_id'
)
InsertSQL.Strings = (
'INSERT INTO timetable.chain ('
#9'"chain_name",'
#9'"run_at",'
#9'"max_instances",'
#9'"live",'
#9'"self_destruct",'
#9'"exclusive_execution",'
#9'"client_name",'
#9'"timeout"'
') VALUES ('
#9':"chain_name",'
#9':"run_at",'
#9':"max_instances",'
#9':"live",'
#9':"self_destruct",'
#9':"exclusive_execution",'
#9':"client_name",'
#9':"timeout"'
')'
)
UpdateSQL.Strings = (
'UPDATE timetable.chain'
'SET'
#9'"chain_name"=:"chain_name",'
#9'"run_at"=:"run_at",'
#9'"max_instances"=:"max_instances",'
#9'"live"=:"live",'
#9'"self_destruct"=:"self_destruct",'
#9'"exclusive_execution"=:"exclusive_execution",'
#9'"client_name"=:"client_name",'
' "timeout"=:"timeout"'
'WHERE'
#9'"chain_id"= :"OLD_chain_id"'
)
DeleteSQL.Strings = (
'DELETE FROM timetable.chain'
'WHERE chain_id = :"old_chain_id"'
)
Options = [sqoKeepOpenOnCommit, sqoAutoCommit]
Params = <>
ParamCheck = False
Macros = <>
ParseSQL = False
UsePrimaryKeyAsKey = False
Left = 105
Top = 177
end
object transChains: TSQLTransaction
Active = False
Database = connMain
Options = [stoUseImplicit]
Left = 192
Top = 312
end
object qryTasks: TSQLQuery
PacketRecords = -1
IndexName = 'DEFAULT_ORDER'
MaxIndexesCount = 4
FieldDefs = <>
AfterInsert = qryTasksAfterInsert
AfterOpen = qryTasksAfterOpen
AfterPost = qryAfterPost
AfterRefresh = qryTasksAfterOpen
BeforePost = qryTasksBeforePost
Database = connMain
Transaction = transChains
SQL.Strings = (
'SELECT'
' task_order,'
' task_name,'
' chain_id,'
' task_id,'
' command,'
' kind,'
' run_as,'
' ignore_error,'
' autonomous,'
' database_connection'
'FROM'
' timetable.task'
'WHERE'
' chain_id = :"chain_id"'
'ORDER BY'
' task_order ASC'
)
InsertSQL.Strings = (
'INSERT INTO timetable.task('
' task_order,'
' chain_id,'
' task_name,'
' command,'
' kind,'
' run_as,'
' ignore_error,'
' autonomous,'
' database_connection'
') VALUES ('
' :"task_order",'
' :"chain_id",'
' :"task_name",'
' :"command",'
' :"kind",'
' :"run_as",'
' :"ignore_error",'
' :"autonomous",'
' :"database_connection"'
')'
)
UpdateSQL.Strings = (
'UPDATE timetable.task SET ('
' task_order,'
' task_name,'
' command,'
' kind,'
' run_as,'
' ignore_error,'
' autonomous,'
' database_connection'
' ) = ('
' :"task_order",'
' :"task_name",'
' :"command",'
' :"kind",'
' :"run_as",'
' :"ignore_error",'
' :"autonomous",'
' :"database_connection"'
' )'
'WHERE task_id = :"task_id"'
)
DeleteSQL.Strings = (
'SELECT timetable.delete_task(:"task_id")'
)
Options = [sqoKeepOpenOnCommit, sqoAutoApplyUpdates, sqoAutoCommit, sqoRefreshUsingSelect]
Params = <
item
DataType = ftLargeint
Name = 'chain_id'
ParamType = ptInput
end>
Macros = <>
ParseSQL = False
DataSource = dsChains
Left = 192
Top = 177
end
object dsTasks: TDataSource
DataSet = qryTasks
Left = 192
Top = 48
end
end