· 4 years ago · Apr 14, 2021, 06:22 PM
1CREATE TABLE IF NOT EXISTS xml_initial_data
2(
3 __id BIGINT GENERATED ALWAYS AS IDENTITY UNIQUE PRIMARY KEY,
4 __created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
5 __entity_name VARCHAR,
6 "_batchId" VARCHAR,
7 "_batchesLeft" VARCHAR,
8 "_batchUuid" VARCHAR,
9 "_dumpComplete" VARCHAR,
10 "_createdTime" VARCHAR,
11 "id" VARCHAR,
12 "name" VARCHAR,
13 "version" VARCHAR,
14 "type" VARCHAR,
15 "sportId" VARCHAR,
16 "venueId" VARCHAR,
17 "rootPartId" VARCHAR,
18 "currentPartId" VARCHAR,
19 "statusId" VARCHAR,
20 "typeId" VARCHAR,
21 "entityId" VARCHAR,
22 "entityTypeId" VARCHAR,
23 "collectorId" VARCHAR,
24 "scoringUnitId" VARCHAR,
25 "eventId" VARCHAR,
26 "eventTypeId" VARCHAR,
27 "eventPartId" VARCHAR,
28 "eventActionId" VARCHAR,
29 "eventInfoTypeId" VARCHAR,
30 "eventActionTypeId" VARCHAR,
31 "eventActionDetailTypeId" VARCHAR,
32 "eventParticipantInfoTypeId" VARCHAR,
33 "eventParticipantInfoDetailTypeId" VARCHAR,
34 "parentId" VARCHAR,
35 "parentEventId" VARCHAR,
36 "parentParticipantId" VARCHAR,
37 "providerId" VARCHAR,
38 "providerEntityId" VARCHAR,
39 "providerEntityTypeId" VARCHAR,
40 "participantId" VARCHAR,
41 "participantTypeId" VARCHAR,
42 "participantRoleId" VARCHAR,
43 "fromParticipantId" VARCHAR,
44 "toParticipantId" VARCHAR,
45 "startTime" VARCHAR,
46 "endTime" VARCHAR,
47 "retirementTime" VARCHAR,
48 "lastUpdateTime" VARCHAR,
49 "lastCollectedTime" VARCHAR,
50 "locationId" VARCHAR,
51 "fromLocationId" VARCHAR,
52 "toLocationId" VARCHAR,
53 "firstName" VARCHAR,
54 "lastName" VARCHAR,
55 "shortName" VARCHAR,
56 "birthTime" VARCHAR,
57 "countryId" VARCHAR,
58 "language" VARCHAR,
59
60 "isEnabled" VARCHAR,
61 "isAvailable" VARCHAR,
62 "isDrawPossible" VARCHAR,
63 "isMale" VARCHAR,
64 "isPrimary" VARCHAR,
65 "isIndividual" VARCHAR,
66 "isBookmaker" VARCHAR,
67 "isBettingExchange" VARCHAR,
68 "isLiveOddsApproved" VARCHAR,
69 "isNewsSource" VARCHAR,
70 "paramBoolean1" VARCHAR,
71 "paramBoolean1Description" VARCHAR,
72 "paramFloat1" VARCHAR,
73 "paramFloat2" VARCHAR,
74 "paramFloat1Description" VARCHAR,
75 "paramFloat2Description" VARCHAR,
76 "paramString1" VARCHAR,
77 "paramString1Description" VARCHAR,
78 "paramString1PossibleValues" VARCHAR,
79 "paramParticipantId1" VARCHAR,
80 "paramParticipantId2" VARCHAR,
81 "paramParticipantId1Description" VARCHAR,
82 "paramParticipantId2Description" VARCHAR,
83 "paramParticipantIdsMustBeOrdered" VARCHAR,
84 "paramParticipantRoleId" VARCHAR,
85 "paramParticipantRoleIdDescription" VARCHAR,
86 "paramEventPartId1Description" VARCHAR,
87 "paramEventStatusId1Description" VARCHAR,
88 "paramScoringUnitId1Description" VARCHAR,
89 "paramTime1Description" VARCHAR,
90 "hasLiveStatus" VARCHAR,
91 "hasParamBoolean1" VARCHAR,
92 "hasParamFloat1" VARCHAR,
93 "hasParamFloat2" VARCHAR,
94 "hasParamString1" VARCHAR,
95 "hasParamTime1" VARCHAR,
96 "hasParamEventStatusId1" VARCHAR,
97 "hasParamEventPartId1" VARCHAR,
98 "hasParamParticipantId1" VARCHAR,
99 "hasParamParticipantId2" VARCHAR,
100 "hasParamParticipantRoleId" VARCHAR,
101 "hasParamScoringUnitId1" VARCHAR,
102 "hasName" VARCHAR,
103 "hasFirstName" VARCHAR,
104 "hasLastName" VARCHAR,
105 "hasIsMale" VARCHAR,
106 "hasBirthTime" VARCHAR,
107 "hasNationalityId" VARCHAR,
108 "hasRetirementTime" VARCHAR,
109
110 "logoURL" VARCHAR,
111 "urlTemplate" VARCHAR,
112 "orderNum" VARCHAR,
113 "channel" VARCHAR,
114 "streamingproviderId" VARCHAR,
115 "bettingCommissionVACs" VARCHAR,
116 "description" VARCHAR
117);
118
119CREATE TABLE IF NOT EXISTS xml_update_data
120(
121 __id BIGINT GENERATED ALWAYS AS IDENTITY UNIQUE PRIMARY KEY,
122 __created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
123 __entity_name VARCHAR,
124 "_batchId" VARCHAR,
125 "_batchUuid" VARCHAR,
126 "_createdTime" VARCHAR,
127 "id" VARCHAR,
128 "name" VARCHAR,
129 "version" VARCHAR,
130 "type" VARCHAR,
131 "sportId" VARCHAR,
132 "venueId" VARCHAR,
133 "rootPartId" VARCHAR,
134 "currentPartId" VARCHAR,
135 "statusId" VARCHAR,
136 "typeId" VARCHAR,
137 "entityId" VARCHAR,
138 "entityTypeId" VARCHAR,
139 "collectorId" VARCHAR,
140 "scoringUnitId" VARCHAR,
141 "eventId" VARCHAR,
142 "eventTypeId" VARCHAR,
143 "eventPartId" VARCHAR,
144 "eventActionId" VARCHAR,
145 "eventInfoTypeId" VARCHAR,
146 "eventActionTypeId" VARCHAR,
147 "eventActionDetailTypeId" VARCHAR,
148 "eventParticipantInfoTypeId" VARCHAR,
149 "eventParticipantInfoDetailTypeId" VARCHAR,
150 "parentId" VARCHAR,
151 "parentEventId" VARCHAR,
152 "parentParticipantId" VARCHAR,
153 "providerId" VARCHAR,
154 "providerEntityId" VARCHAR,
155 "providerEntityTypeId" VARCHAR,
156 "participantId" VARCHAR,
157 "participantTypeId" VARCHAR,
158 "participantRoleId" VARCHAR,
159 "fromParticipantId" VARCHAR,
160 "toParticipantId" VARCHAR,
161 "startTime" VARCHAR,
162 "endTime" VARCHAR,
163 "retirementTime" VARCHAR,
164 "lastUpdateTime" VARCHAR,
165 "lastCollectedTime" VARCHAR,
166 "locationId" VARCHAR,
167 "fromLocationId" VARCHAR,
168 "toLocationId" VARCHAR,
169 "firstName" VARCHAR,
170 "lastName" VARCHAR,
171 "shortName" VARCHAR,
172 "birthTime" VARCHAR,
173 "countryId" VARCHAR,
174 "language" VARCHAR,
175
176 "isEnabled" VARCHAR,
177 "isAvailable" VARCHAR,
178 "isDrawPossible" VARCHAR,
179 "isMale" VARCHAR,
180 "isPrimary" VARCHAR,
181 "isIndividual" VARCHAR,
182 "isBookmaker" VARCHAR,
183 "isBettingExchange" VARCHAR,
184 "isLiveOddsApproved" VARCHAR,
185 "isNewsSource" VARCHAR,
186 "paramBoolean1" VARCHAR,
187 "paramBoolean1Description" VARCHAR,
188 "paramFloat1" VARCHAR,
189 "paramFloat2" VARCHAR,
190 "paramFloat1Description" VARCHAR,
191 "paramFloat2Description" VARCHAR,
192 "paramString1" VARCHAR,
193 "paramString1Description" VARCHAR,
194 "paramString1PossibleValues" VARCHAR,
195 "paramParticipantId1" VARCHAR,
196 "paramParticipantId2" VARCHAR,
197 "paramParticipantId1Description" VARCHAR,
198 "paramParticipantId2Description" VARCHAR,
199 "paramParticipantIdsMustBeOrdered" VARCHAR,
200 "paramParticipantRoleId" VARCHAR,
201 "paramParticipantRoleIdDescription" VARCHAR,
202 "paramEventPartId1Description" VARCHAR,
203 "paramEventStatusId1Description" VARCHAR,
204 "paramScoringUnitId1Description" VARCHAR,
205 "paramTime1Description" VARCHAR,
206 "hasLiveStatus" VARCHAR,
207 "hasParamBoolean1" VARCHAR,
208 "hasParamFloat1" VARCHAR,
209 "hasParamFloat2" VARCHAR,
210 "hasParamString1" VARCHAR,
211 "hasParamTime1" VARCHAR,
212 "hasParamEventStatusId1" VARCHAR,
213 "hasParamEventPartId1" VARCHAR,
214 "hasParamParticipantId1" VARCHAR,
215 "hasParamParticipantId2" VARCHAR,
216 "hasParamParticipantRoleId" VARCHAR,
217 "hasParamScoringUnitId1" VARCHAR,
218 "hasName" VARCHAR,
219 "hasFirstName" VARCHAR,
220 "hasLastName" VARCHAR,
221 "hasIsMale" VARCHAR,
222 "hasBirthTime" VARCHAR,
223 "hasNationalityId" VARCHAR,
224 "hasRetirementTime" VARCHAR,
225
226 "logoURL" VARCHAR,
227 "urlTemplate" VARCHAR,
228 "orderNum" VARCHAR,
229 "channel" VARCHAR,
230 "streamingproviderId" VARCHAR,
231 "bettingCommissionVACs" VARCHAR,
232 "description" VARCHAR
233);
234
235CREATE OR REPLACE FUNCTION func_insert_initial_xml(_xml_data VARCHAR)
236 RETURNS VOID AS
237$$
238BEGIN
239 WITH x AS (SELECT XMLPARSE(CONTENT _xml_data) AS source_xml)
240 INSERT
241 INTO xml_initial_data (__entity_name, "_batchId", "_batchesLeft", "_batchUuid", "_dumpComplete",
242 "_createdTime", id, name, version, type, "sportId", "venueId", "rootPartId", "currentPartId",
243 "statusId", "typeId", "entityId", "entityTypeId", "collectorId", "scoringUnitId", "eventId",
244 "eventTypeId", "eventPartId", "eventActionId", "eventInfoTypeId", "eventActionTypeId",
245 "eventActionDetailTypeId", "eventParticipantInfoTypeId", "eventParticipantInfoDetailTypeId",
246 "parentId", "parentEventId", "parentParticipantId", "providerId", "providerEntityId",
247 "providerEntityTypeId", "participantId", "participantTypeId", "participantRoleId",
248 "fromParticipantId", "toParticipantId", "startTime", "endTime", "retirementTime",
249 "lastUpdateTime", "lastCollectedTime", "locationId", "fromLocationId", "toLocationId",
250 "firstName", "lastName", "shortName", "birthTime", "countryId", language, "isEnabled",
251 "isAvailable", "isDrawPossible", "isMale", "isPrimary", "isIndividual", "isBookmaker",
252 "isBettingExchange", "isLiveOddsApproved", "isNewsSource", "paramBoolean1",
253 "paramBoolean1Description", "paramFloat1", "paramFloat2", "paramFloat1Description",
254 "paramFloat2Description", "paramString1", "paramString1Description",
255 "paramString1PossibleValues", "paramParticipantId1", "paramParticipantId2",
256 "paramParticipantId1Description", "paramParticipantId2Description",
257 "paramParticipantIdsMustBeOrdered", "paramParticipantRoleId",
258 "paramParticipantRoleIdDescription", "paramEventPartId1Description",
259 "paramEventStatusId1Description", "paramScoringUnitId1Description", "paramTime1Description",
260 "hasLiveStatus", "hasParamBoolean1", "hasParamFloat1", "hasParamFloat2", "hasParamString1",
261 "hasParamTime1", "hasParamEventStatusId1", "hasParamEventPartId1", "hasParamParticipantId1",
262 "hasParamParticipantId2", "hasParamParticipantRoleId", "hasParamScoringUnitId1", "hasName",
263 "hasFirstName", "hasLastName", "hasIsMale", "hasBirthTime", "hasNationalityId",
264 "hasRetirementTime", "logoURL", "urlTemplate", "orderNum", channel, "streamingproviderId",
265 "bettingCommissionVACs", description)
266 (
267 SELECT decoded.*
268 FROM x,
269 XMLTABLE('//sdql/*/entities/*' PASSING source_xml COLUMNS
270 __entity_name VARCHAR PATH 'name()',
271 "_batchId" VARCHAR PATH '../../@batchId',
272 "_batchesLeft" VARCHAR PATH '../../@batchesLeft',
273 "_batchUuid" VARCHAR PATH '../../@batchUuid',
274 "_dumpComplete" VARCHAR PATH '../../@dumpComplete',
275 "_createdTime" VARCHAR PATH '../../@createdTime',
276 "id" VARCHAR PATH '@id',
277 "name" VARCHAR PATH '@name',
278 "version" VARCHAR PATH '@version',
279 "type" VARCHAR PATH '@type',
280 "sportId" VARCHAR PATH '@sportId',
281 "venueId" VARCHAR PATH '@venueId',
282 "rootPartId" VARCHAR PATH '@rootPartId',
283 "currentPartId" VARCHAR PATH '@currentPartId',
284 "statusId" VARCHAR PATH '@statusId',
285 "typeId" VARCHAR PATH '@typeId',
286 "entityId" VARCHAR PATH '@entityId',
287 "entityTypeId" VARCHAR PATH '@entityTypeId',
288 "collectorId" VARCHAR PATH '@collectorId',
289 "scoringUnitId" VARCHAR PATH '@scoringUnitId',
290 "eventId" VARCHAR PATH '@eventId',
291 "eventTypeId" VARCHAR PATH '@eventTypeId',
292 "eventPartId" VARCHAR PATH '@eventPartId',
293 "eventActionId" VARCHAR PATH '@eventActionId',
294 "eventInfoTypeId" VARCHAR PATH '@eventInfoTypeId',
295 "eventActionTypeId" VARCHAR PATH '@eventActionTypeId',
296 "eventActionDetailTypeId" VARCHAR PATH '@eventActionDetailTypeId',
297 "eventParticipantInfoTypeId" VARCHAR PATH '@eventParticipantInfoTypeId',
298 "eventParticipantInfoDetailTypeId" VARCHAR PATH '@eventParticipantInfoDetailTypeId',
299 "parentId" VARCHAR PATH '@parentId',
300 "parentEventId" VARCHAR PATH '@parentEventId',
301 "parentParticipantId" VARCHAR PATH '@parentParticipantId',
302 "providerId" VARCHAR PATH '@providerId',
303 "providerEntityId" VARCHAR PATH '@providerEntityId',
304 "providerEntityTypeId" VARCHAR PATH '@providerEntityTypeId',
305 "participantId" VARCHAR PATH '@participantId',
306 "participantTypeId" VARCHAR PATH '@participantTypeId',
307 "participantRoleId" VARCHAR PATH '@participantRoleId',
308 "fromParticipantId" VARCHAR PATH '@fromParticipantId',
309 "toParticipantId" VARCHAR PATH '@toParticipantId',
310 "startTime" VARCHAR PATH '@startTime',
311 "endTime" VARCHAR PATH '@endTime',
312 "retirementTime" VARCHAR PATH '@retirementTime',
313 "lastUpdateTime" VARCHAR PATH '@lastUpdateTime',
314 "lastCollectedTime" VARCHAR PATH '@lastCollectedTime',
315 "locationId" VARCHAR PATH '@locationId',
316 "fromLocationId" VARCHAR PATH '@fromLocationId',
317 "toLocationId" VARCHAR PATH '@toLocationId',
318 "firstName" VARCHAR PATH '@firstName',
319 "lastName" VARCHAR PATH '@lastName',
320 "shortName" VARCHAR PATH '@shortName',
321 "birthTime" VARCHAR PATH '@birthTime',
322 "countryId" VARCHAR PATH '@countryId',
323 "language" VARCHAR PATH '@language',
324
325 "isEnabled" VARCHAR PATH '@isEnabled',
326 "isAvailable" VARCHAR PATH '@isAvailable',
327 "isDrawPossible" VARCHAR PATH '@isDrawPossible',
328 "isMale" VARCHAR PATH '@isMale',
329 "isPrimary" VARCHAR PATH '@isPrimary',
330 "isIndividual" VARCHAR PATH '@isIndividual',
331 "isBookmaker" VARCHAR PATH '@isBookmaker',
332 "isBettingExchange" VARCHAR PATH '@isBettingExchange',
333 "isLiveOddsApproved" VARCHAR PATH '@isLiveOddsApproved',
334 "isNewsSource" VARCHAR PATH '@isNewsSource',
335 "paramBoolean1" VARCHAR PATH '@paramBoolean1',
336 "paramBoolean1Description" VARCHAR PATH '@paramBoolean1Description',
337 "paramFloat1" VARCHAR PATH '@paramFloat1',
338 "paramFloat2" VARCHAR PATH '@paramFloat2',
339 "paramFloat1Description" VARCHAR PATH '@paramFloat1Description',
340 "paramFloat2Description" VARCHAR PATH '@paramFloat2Description',
341 "paramString1" VARCHAR PATH '@paramString1',
342 "paramString1Description" VARCHAR PATH '@paramString1Description',
343 "paramString1PossibleValues" VARCHAR PATH '@paramString1PossibleValues',
344 "paramParticipantId1" VARCHAR PATH '@paramParticipantId1',
345 "paramParticipantId2" VARCHAR PATH '@paramParticipantId2',
346 "paramParticipantId1Description" VARCHAR PATH '@paramParticipantId1Description',
347 "paramParticipantId2Description" VARCHAR PATH '@paramParticipantId2Description',
348 "paramParticipantIdsMustBeOrdered" VARCHAR PATH '@paramParticipantIdsMustBeOrdered',
349 "paramParticipantRoleId" VARCHAR PATH '@paramParticipantRoleId',
350 "paramParticipantRoleIdDescription" VARCHAR PATH '@paramParticipantRoleIdDescription',
351 "paramEventPartId1Description" VARCHAR PATH '@paramEventPartId1Description',
352 "paramEventStatusId1Description" VARCHAR PATH '@paramEventStatusId1Description',
353 "paramScoringUnitId1Description" VARCHAR PATH '@paramScoringUnitId1Description',
354 "paramTime1Description" VARCHAR PATH '@paramTime1Description',
355 "hasLiveStatus" VARCHAR PATH '@hasLiveStatus',
356 "hasParamBoolean1" VARCHAR PATH '@hasParamBoolean1',
357 "hasParamFloat1" VARCHAR PATH '@hasParamFloat1',
358 "hasParamFloat2" VARCHAR PATH '@hasParamFloat2',
359 "hasParamString1" VARCHAR PATH '@hasParamString1',
360 "hasParamTime1" VARCHAR PATH '@hasParamTime1',
361 "hasParamEventStatusId1" VARCHAR PATH '@hasParamEventStatusId1',
362 "hasParamEventPartId1" VARCHAR PATH '@hasParamEventPartId1',
363 "hasParamParticipantId1" VARCHAR PATH '@hasParamParticipantId1',
364 "hasParamParticipantId2" VARCHAR PATH '@hasParamParticipantId2',
365 "hasParamParticipantRoleId" VARCHAR PATH '@hasParamParticipantRoleId',
366 "hasParamScoringUnitId1" VARCHAR PATH '@hasParamScoringUnitId1',
367 "hasName" VARCHAR PATH '@hasName',
368 "hasFirstName" VARCHAR PATH '@hasFirstName',
369 "hasLastName" VARCHAR PATH '@hasLastName',
370 "hasIsMale" VARCHAR PATH '@hasIsMale',
371 "hasBirthTime" VARCHAR PATH '@hasBirthTime',
372 "hasNationalityId" VARCHAR PATH '@hasNationalityId',
373 "hasRetirementTime" VARCHAR PATH '@hasRetirementTime',
374
375 "logoURL" VARCHAR PATH '@logoURL',
376 "urlTemplate" VARCHAR PATH '@urlTemplate',
377 "orderNum" VARCHAR PATH '@orderNum',
378 "channel" VARCHAR PATH '@channel',
379 "streamingproviderId" VARCHAR PATH '@streamingproviderId',
380 "bettingCommissionVACs" VARCHAR PATH '@bettingCommissionVACs',
381 "description" VARCHAR PATH '@description') AS decoded
382 );
383END;
384$$ LANGUAGE plpgsql VOLATILE;
385
386CREATE OR REPLACE FUNCTION func_insert_update_xml(_xml_data VARCHAR)
387 RETURNS VOID AS
388$$
389BEGIN
390 WITH x AS (SELECT XMLPARSE(CONTENT _xml_data) AS source_xml)
391 INSERT
392 INTO xml_update_data (__entity_name, "_batchId", "_batchUuid", "_createdTime", id, name, version, type, "sportId",
393 "venueId", "rootPartId", "currentPartId", "statusId", "typeId", "entityId", "entityTypeId",
394 "collectorId", "scoringUnitId", "eventId", "eventTypeId", "eventPartId", "eventActionId",
395 "eventInfoTypeId", "eventActionTypeId", "eventActionDetailTypeId",
396 "eventParticipantInfoTypeId", "eventParticipantInfoDetailTypeId", "parentId", "parentEventId",
397 "parentParticipantId", "providerId", "providerEntityId", "providerEntityTypeId",
398 "participantId", "participantTypeId", "participantRoleId", "fromParticipantId",
399 "toParticipantId", "startTime", "endTime", "retirementTime", "lastUpdateTime",
400 "lastCollectedTime", "locationId", "fromLocationId", "toLocationId", "firstName", "lastName",
401 "shortName", "birthTime", "countryId", language, "isEnabled", "isAvailable", "isDrawPossible",
402 "isMale", "isPrimary", "isIndividual", "isBookmaker", "isBettingExchange",
403 "isLiveOddsApproved", "isNewsSource", "paramBoolean1", "paramBoolean1Description",
404 "paramFloat1", "paramFloat2", "paramFloat1Description", "paramFloat2Description",
405 "paramString1", "paramString1Description", "paramString1PossibleValues",
406 "paramParticipantId1", "paramParticipantId2", "paramParticipantId1Description",
407 "paramParticipantId2Description", "paramParticipantIdsMustBeOrdered",
408 "paramParticipantRoleId", "paramParticipantRoleIdDescription", "paramEventPartId1Description",
409 "paramEventStatusId1Description", "paramScoringUnitId1Description", "paramTime1Description",
410 "hasLiveStatus", "hasParamBoolean1", "hasParamFloat1", "hasParamFloat2", "hasParamString1",
411 "hasParamTime1", "hasParamEventStatusId1", "hasParamEventPartId1", "hasParamParticipantId1",
412 "hasParamParticipantId2", "hasParamParticipantRoleId", "hasParamScoringUnitId1", "hasName",
413 "hasFirstName", "hasLastName", "hasIsMale", "hasBirthTime", "hasNationalityId",
414 "hasRetirementTime", "logoURL", "urlTemplate", "orderNum", channel, "streamingproviderId",
415 "bettingCommissionVACs", description)
416 (
417 SELECT decoded.*
418 FROM x,
419 XMLTABLE('//sdql/*/*' PASSING source_xml COLUMNS
420 __entity_name VARCHAR PATH 'name()',
421 "_batchId" VARCHAR PATH '../@batchId',
422 "_batchUuid" VARCHAR PATH '../@batchUuid',
423 "_createdTime" VARCHAR PATH '../@createdTime',
424 "id" VARCHAR PATH '@id',
425 "name" VARCHAR PATH '@name',
426 "version" VARCHAR PATH '@version',
427 "type" VARCHAR PATH '@type',
428 "sportId" VARCHAR PATH '@sportId',
429 "venueId" VARCHAR PATH '@venueId',
430 "rootPartId" VARCHAR PATH '@rootPartId',
431 "currentPartId" VARCHAR PATH '@currentPartId',
432 "statusId" VARCHAR PATH '@statusId',
433 "typeId" VARCHAR PATH '@typeId',
434 "entityId" VARCHAR PATH '@entityId',
435 "entityTypeId" VARCHAR PATH '@entityTypeId',
436 "collectorId" VARCHAR PATH '@collectorId',
437 "scoringUnitId" VARCHAR PATH '@scoringUnitId',
438 "eventId" VARCHAR PATH '@eventId',
439 "eventTypeId" VARCHAR PATH '@eventTypeId',
440 "eventPartId" VARCHAR PATH '@eventPartId',
441 "eventActionId" VARCHAR PATH '@eventActionId',
442 "eventInfoTypeId" VARCHAR PATH '@eventInfoTypeId',
443 "eventActionTypeId" VARCHAR PATH '@eventActionTypeId',
444 "eventActionDetailTypeId" VARCHAR PATH '@eventActionDetailTypeId',
445 "eventParticipantInfoTypeId" VARCHAR PATH '@eventParticipantInfoTypeId',
446 "eventParticipantInfoDetailTypeId" VARCHAR PATH '@eventParticipantInfoDetailTypeId',
447 "parentId" VARCHAR PATH '@parentId',
448 "parentEventId" VARCHAR PATH '@parentEventId',
449 "parentParticipantId" VARCHAR PATH '@parentParticipantId',
450 "providerId" VARCHAR PATH '@providerId',
451 "providerEntityId" VARCHAR PATH '@providerEntityId',
452 "providerEntityTypeId" VARCHAR PATH '@providerEntityTypeId',
453 "participantId" VARCHAR PATH '@participantId',
454 "participantTypeId" VARCHAR PATH '@participantTypeId',
455 "participantRoleId" VARCHAR PATH '@participantRoleId',
456 "fromParticipantId" VARCHAR PATH '@fromParticipantId',
457 "toParticipantId" VARCHAR PATH '@toParticipantId',
458 "startTime" VARCHAR PATH '@startTime',
459 "endTime" VARCHAR PATH '@endTime',
460 "retirementTime" VARCHAR PATH '@retirementTime',
461 "lastUpdateTime" VARCHAR PATH '@lastUpdateTime',
462 "lastCollectedTime" VARCHAR PATH '@lastCollectedTime',
463 "locationId" VARCHAR PATH '@locationId',
464 "fromLocationId" VARCHAR PATH '@fromLocationId',
465 "toLocationId" VARCHAR PATH '@toLocationId',
466 "firstName" VARCHAR PATH '@firstName',
467 "lastName" VARCHAR PATH '@lastName',
468 "shortName" VARCHAR PATH '@shortName',
469 "birthTime" VARCHAR PATH '@birthTime',
470 "countryId" VARCHAR PATH '@countryId',
471 "language" VARCHAR PATH '@language',
472
473 "isEnabled" VARCHAR PATH '@isEnabled',
474 "isAvailable" VARCHAR PATH '@isAvailable',
475 "isDrawPossible" VARCHAR PATH '@isDrawPossible',
476 "isMale" VARCHAR PATH '@isMale',
477 "isPrimary" VARCHAR PATH '@isPrimary',
478 "isIndividual" VARCHAR PATH '@isIndividual',
479 "isBookmaker" VARCHAR PATH '@isBookmaker',
480 "isBettingExchange" VARCHAR PATH '@isBettingExchange',
481 "isLiveOddsApproved" VARCHAR PATH '@isLiveOddsApproved',
482 "isNewsSource" VARCHAR PATH '@isNewsSource',
483 "paramBoolean1" VARCHAR PATH '@paramBoolean1',
484 "paramBoolean1Description" VARCHAR PATH '@paramBoolean1Description',
485 "paramFloat1" VARCHAR PATH '@paramFloat1',
486 "paramFloat2" VARCHAR PATH '@paramFloat2',
487 "paramFloat1Description" VARCHAR PATH '@paramFloat1Description',
488 "paramFloat2Description" VARCHAR PATH '@paramFloat2Description',
489 "paramString1" VARCHAR PATH '@paramString1',
490 "paramString1Description" VARCHAR PATH '@paramString1Description',
491 "paramString1PossibleValues" VARCHAR PATH '@paramString1PossibleValues',
492 "paramParticipantId1" VARCHAR PATH '@paramParticipantId1',
493 "paramParticipantId2" VARCHAR PATH '@paramParticipantId2',
494 "paramParticipantId1Description" VARCHAR PATH '@paramParticipantId1Description',
495 "paramParticipantId2Description" VARCHAR PATH '@paramParticipantId2Description',
496 "paramParticipantIdsMustBeOrdered" VARCHAR PATH '@paramParticipantIdsMustBeOrdered',
497 "paramParticipantRoleId" VARCHAR PATH '@paramParticipantRoleId',
498 "paramParticipantRoleIdDescription" VARCHAR PATH '@paramParticipantRoleIdDescription',
499 "paramEventPartId1Description" VARCHAR PATH '@paramEventPartId1Description',
500 "paramEventStatusId1Description" VARCHAR PATH '@paramEventStatusId1Description',
501 "paramScoringUnitId1Description" VARCHAR PATH '@paramScoringUnitId1Description',
502 "paramTime1Description" VARCHAR PATH '@paramTime1Description',
503 "hasLiveStatus" VARCHAR PATH '@hasLiveStatus',
504 "hasParamBoolean1" VARCHAR PATH '@hasParamBoolean1',
505 "hasParamFloat1" VARCHAR PATH '@hasParamFloat1',
506 "hasParamFloat2" VARCHAR PATH '@hasParamFloat2',
507 "hasParamString1" VARCHAR PATH '@hasParamString1',
508 "hasParamTime1" VARCHAR PATH '@hasParamTime1',
509 "hasParamEventStatusId1" VARCHAR PATH '@hasParamEventStatusId1',
510 "hasParamEventPartId1" VARCHAR PATH '@hasParamEventPartId1',
511 "hasParamParticipantId1" VARCHAR PATH '@hasParamParticipantId1',
512 "hasParamParticipantId2" VARCHAR PATH '@hasParamParticipantId2',
513 "hasParamParticipantRoleId" VARCHAR PATH '@hasParamParticipantRoleId',
514 "hasParamScoringUnitId1" VARCHAR PATH '@hasParamScoringUnitId1',
515 "hasName" VARCHAR PATH '@hasName',
516 "hasFirstName" VARCHAR PATH '@hasFirstName',
517 "hasLastName" VARCHAR PATH '@hasLastName',
518 "hasIsMale" VARCHAR PATH '@hasIsMale',
519 "hasBirthTime" VARCHAR PATH '@hasBirthTime',
520 "hasNationalityId" VARCHAR PATH '@hasNationalityId',
521 "hasRetirementTime" VARCHAR PATH '@hasRetirementTime',
522
523 "logoURL" VARCHAR PATH '@logoURL',
524 "urlTemplate" VARCHAR PATH '@urlTemplate',
525 "orderNum" VARCHAR PATH '@orderNum',
526 "channel" VARCHAR PATH '@channel',
527 "streamingproviderId" VARCHAR PATH '@streamingproviderId',
528 "bettingCommissionVACs" VARCHAR PATH '@bettingCommissionVACs',
529 "description" VARCHAR PATH '@description') AS decoded
530 );
531END;
532$$ LANGUAGE plpgsql VOLATILE;