· 4 years ago · Apr 14, 2021, 06:28 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",
243 "currentPartId",
244 "statusId", "typeId", "entityId", "entityTypeId", "collectorId", "scoringUnitId", "eventId",
245 "eventTypeId", "eventPartId", "eventActionId", "eventInfoTypeId", "eventActionTypeId",
246 "eventActionDetailTypeId", "eventParticipantInfoTypeId", "eventParticipantInfoDetailTypeId",
247 "parentId", "parentEventId", "parentParticipantId", "providerId", "providerEntityId",
248 "providerEntityTypeId", "participantId", "participantTypeId", "participantRoleId",
249 "fromParticipantId", "toParticipantId", "startTime", "endTime", "retirementTime",
250 "lastUpdateTime", "lastCollectedTime", "locationId", "fromLocationId", "toLocationId",
251 "firstName", "lastName", "shortName", "birthTime", "countryId", "language", "isEnabled",
252 "isAvailable", "isDrawPossible", "isMale", "isPrimary", "isIndividual", "isBookmaker",
253 "isBettingExchange", "isLiveOddsApproved", "isNewsSource", "paramBoolean1",
254 "paramBoolean1Description", "paramFloat1", "paramFloat2", "paramFloat1Description",
255 "paramFloat2Description", "paramString1", "paramString1Description",
256 "paramString1PossibleValues", "paramParticipantId1", "paramParticipantId2",
257 "paramParticipantId1Description", "paramParticipantId2Description",
258 "paramParticipantIdsMustBeOrdered", "paramParticipantRoleId",
259 "paramParticipantRoleIdDescription", "paramEventPartId1Description",
260 "paramEventStatusId1Description", "paramScoringUnitId1Description", "paramTime1Description",
261 "hasLiveStatus", "hasParamBoolean1", "hasParamFloat1", "hasParamFloat2", "hasParamString1",
262 "hasParamTime1", "hasParamEventStatusId1", "hasParamEventPartId1", "hasParamParticipantId1",
263 "hasParamParticipantId2", "hasParamParticipantRoleId", "hasParamScoringUnitId1", "hasName",
264 "hasFirstName", "hasLastName", "hasIsMale", "hasBirthTime", "hasNationalityId",
265 "hasRetirementTime", "logoURL", "urlTemplate", "orderNum", "channel", "streamingproviderId",
266 "bettingCommissionVACs", "description")
267 (
268 SELECT decoded.*
269 FROM x,
270 XMLTABLE('//sdql/*/entities/*' PASSING source_xml COLUMNS
271 __entity_name VARCHAR PATH 'name()',
272 "_batchId" VARCHAR PATH '../../@batchId',
273 "_batchesLeft" VARCHAR PATH '../../@batchesLeft',
274 "_batchUuid" VARCHAR PATH '../../@batchUuid',
275 "_dumpComplete" VARCHAR PATH '../../@dumpComplete',
276 "_createdTime" VARCHAR PATH '../../@createdTime',
277 "id" VARCHAR PATH '@id',
278 "name" VARCHAR PATH '@name',
279 "version" VARCHAR PATH '@version',
280 "type" VARCHAR PATH '@type',
281 "sportId" VARCHAR PATH '@sportId',
282 "venueId" VARCHAR PATH '@venueId',
283 "rootPartId" VARCHAR PATH '@rootPartId',
284 "currentPartId" VARCHAR PATH '@currentPartId',
285 "statusId" VARCHAR PATH '@statusId',
286 "typeId" VARCHAR PATH '@typeId',
287 "entityId" VARCHAR PATH '@entityId',
288 "entityTypeId" VARCHAR PATH '@entityTypeId',
289 "collectorId" VARCHAR PATH '@collectorId',
290 "scoringUnitId" VARCHAR PATH '@scoringUnitId',
291 "eventId" VARCHAR PATH '@eventId',
292 "eventTypeId" VARCHAR PATH '@eventTypeId',
293 "eventPartId" VARCHAR PATH '@eventPartId',
294 "eventActionId" VARCHAR PATH '@eventActionId',
295 "eventInfoTypeId" VARCHAR PATH '@eventInfoTypeId',
296 "eventActionTypeId" VARCHAR PATH '@eventActionTypeId',
297 "eventActionDetailTypeId" VARCHAR PATH '@eventActionDetailTypeId',
298 "eventParticipantInfoTypeId" VARCHAR PATH '@eventParticipantInfoTypeId',
299 "eventParticipantInfoDetailTypeId" VARCHAR PATH '@eventParticipantInfoDetailTypeId',
300 "parentId" VARCHAR PATH '@parentId',
301 "parentEventId" VARCHAR PATH '@parentEventId',
302 "parentParticipantId" VARCHAR PATH '@parentParticipantId',
303 "providerId" VARCHAR PATH '@providerId',
304 "providerEntityId" VARCHAR PATH '@providerEntityId',
305 "providerEntityTypeId" VARCHAR PATH '@providerEntityTypeId',
306 "participantId" VARCHAR PATH '@participantId',
307 "participantTypeId" VARCHAR PATH '@participantTypeId',
308 "participantRoleId" VARCHAR PATH '@participantRoleId',
309 "fromParticipantId" VARCHAR PATH '@fromParticipantId',
310 "toParticipantId" VARCHAR PATH '@toParticipantId',
311 "startTime" VARCHAR PATH '@startTime',
312 "endTime" VARCHAR PATH '@endTime',
313 "retirementTime" VARCHAR PATH '@retirementTime',
314 "lastUpdateTime" VARCHAR PATH '@lastUpdateTime',
315 "lastCollectedTime" VARCHAR PATH '@lastCollectedTime',
316 "locationId" VARCHAR PATH '@locationId',
317 "fromLocationId" VARCHAR PATH '@fromLocationId',
318 "toLocationId" VARCHAR PATH '@toLocationId',
319 "firstName" VARCHAR PATH '@firstName',
320 "lastName" VARCHAR PATH '@lastName',
321 "shortName" VARCHAR PATH '@shortName',
322 "birthTime" VARCHAR PATH '@birthTime',
323 "countryId" VARCHAR PATH '@countryId',
324 "language" VARCHAR PATH '@language',
325
326 "isEnabled" VARCHAR PATH '@isEnabled',
327 "isAvailable" VARCHAR PATH '@isAvailable',
328 "isDrawPossible" VARCHAR PATH '@isDrawPossible',
329 "isMale" VARCHAR PATH '@isMale',
330 "isPrimary" VARCHAR PATH '@isPrimary',
331 "isIndividual" VARCHAR PATH '@isIndividual',
332 "isBookmaker" VARCHAR PATH '@isBookmaker',
333 "isBettingExchange" VARCHAR PATH '@isBettingExchange',
334 "isLiveOddsApproved" VARCHAR PATH '@isLiveOddsApproved',
335 "isNewsSource" VARCHAR PATH '@isNewsSource',
336 "paramBoolean1" VARCHAR PATH '@paramBoolean1',
337 "paramBoolean1Description" VARCHAR PATH '@paramBoolean1Description',
338 "paramFloat1" VARCHAR PATH '@paramFloat1',
339 "paramFloat2" VARCHAR PATH '@paramFloat2',
340 "paramFloat1Description" VARCHAR PATH '@paramFloat1Description',
341 "paramFloat2Description" VARCHAR PATH '@paramFloat2Description',
342 "paramString1" VARCHAR PATH '@paramString1',
343 "paramString1Description" VARCHAR PATH '@paramString1Description',
344 "paramString1PossibleValues" VARCHAR PATH '@paramString1PossibleValues',
345 "paramParticipantId1" VARCHAR PATH '@paramParticipantId1',
346 "paramParticipantId2" VARCHAR PATH '@paramParticipantId2',
347 "paramParticipantId1Description" VARCHAR PATH '@paramParticipantId1Description',
348 "paramParticipantId2Description" VARCHAR PATH '@paramParticipantId2Description',
349 "paramParticipantIdsMustBeOrdered" VARCHAR PATH '@paramParticipantIdsMustBeOrdered',
350 "paramParticipantRoleId" VARCHAR PATH '@paramParticipantRoleId',
351 "paramParticipantRoleIdDescription" VARCHAR PATH '@paramParticipantRoleIdDescription',
352 "paramEventPartId1Description" VARCHAR PATH '@paramEventPartId1Description',
353 "paramEventStatusId1Description" VARCHAR PATH '@paramEventStatusId1Description',
354 "paramScoringUnitId1Description" VARCHAR PATH '@paramScoringUnitId1Description',
355 "paramTime1Description" VARCHAR PATH '@paramTime1Description',
356 "hasLiveStatus" VARCHAR PATH '@hasLiveStatus',
357 "hasParamBoolean1" VARCHAR PATH '@hasParamBoolean1',
358 "hasParamFloat1" VARCHAR PATH '@hasParamFloat1',
359 "hasParamFloat2" VARCHAR PATH '@hasParamFloat2',
360 "hasParamString1" VARCHAR PATH '@hasParamString1',
361 "hasParamTime1" VARCHAR PATH '@hasParamTime1',
362 "hasParamEventStatusId1" VARCHAR PATH '@hasParamEventStatusId1',
363 "hasParamEventPartId1" VARCHAR PATH '@hasParamEventPartId1',
364 "hasParamParticipantId1" VARCHAR PATH '@hasParamParticipantId1',
365 "hasParamParticipantId2" VARCHAR PATH '@hasParamParticipantId2',
366 "hasParamParticipantRoleId" VARCHAR PATH '@hasParamParticipantRoleId',
367 "hasParamScoringUnitId1" VARCHAR PATH '@hasParamScoringUnitId1',
368 "hasName" VARCHAR PATH '@hasName',
369 "hasFirstName" VARCHAR PATH '@hasFirstName',
370 "hasLastName" VARCHAR PATH '@hasLastName',
371 "hasIsMale" VARCHAR PATH '@hasIsMale',
372 "hasBirthTime" VARCHAR PATH '@hasBirthTime',
373 "hasNationalityId" VARCHAR PATH '@hasNationalityId',
374 "hasRetirementTime" VARCHAR PATH '@hasRetirementTime',
375
376 "logoURL" VARCHAR PATH '@logoURL',
377 "urlTemplate" VARCHAR PATH '@urlTemplate',
378 "orderNum" VARCHAR PATH '@orderNum',
379 "channel" VARCHAR PATH '@channel',
380 "streamingproviderId" VARCHAR PATH '@streamingproviderId',
381 "bettingCommissionVACs" VARCHAR PATH '@bettingCommissionVACs',
382 "description" VARCHAR PATH '@description') AS decoded
383 );
384END;
385$$ LANGUAGE plpgsql VOLATILE;
386
387CREATE OR REPLACE FUNCTION func_insert_update_xml(_xml_data VARCHAR)
388 RETURNS VOID AS
389$$
390BEGIN
391 WITH x AS (SELECT XMLPARSE(CONTENT _xml_data) AS source_xml)
392 INSERT
393 INTO xml_update_data (__entity_name, "_batchId", "_batchUuid", "_createdTime", "id", "name", "version", "type",
394 "sportId",
395 "venueId", "rootPartId", "currentPartId", "statusId", "typeId", "entityId", "entityTypeId",
396 "collectorId", "scoringUnitId", "eventId", "eventTypeId", "eventPartId", "eventActionId",
397 "eventInfoTypeId", "eventActionTypeId", "eventActionDetailTypeId",
398 "eventParticipantInfoTypeId", "eventParticipantInfoDetailTypeId", "parentId", "parentEventId",
399 "parentParticipantId", "providerId", "providerEntityId", "providerEntityTypeId",
400 "participantId", "participantTypeId", "participantRoleId", "fromParticipantId",
401 "toParticipantId", "startTime", "endTime", "retirementTime", "lastUpdateTime",
402 "lastCollectedTime", "locationId", "fromLocationId", "toLocationId", "firstName", "lastName",
403 "shortName", "birthTime", "countryId", "language", "isEnabled", "isAvailable",
404 "isDrawPossible",
405 "isMale", "isPrimary", "isIndividual", "isBookmaker", "isBettingExchange",
406 "isLiveOddsApproved", "isNewsSource", "paramBoolean1", "paramBoolean1Description",
407 "paramFloat1", "paramFloat2", "paramFloat1Description", "paramFloat2Description",
408 "paramString1", "paramString1Description", "paramString1PossibleValues",
409 "paramParticipantId1", "paramParticipantId2", "paramParticipantId1Description",
410 "paramParticipantId2Description", "paramParticipantIdsMustBeOrdered",
411 "paramParticipantRoleId", "paramParticipantRoleIdDescription", "paramEventPartId1Description",
412 "paramEventStatusId1Description", "paramScoringUnitId1Description", "paramTime1Description",
413 "hasLiveStatus", "hasParamBoolean1", "hasParamFloat1", "hasParamFloat2", "hasParamString1",
414 "hasParamTime1", "hasParamEventStatusId1", "hasParamEventPartId1", "hasParamParticipantId1",
415 "hasParamParticipantId2", "hasParamParticipantRoleId", "hasParamScoringUnitId1", "hasName",
416 "hasFirstName", "hasLastName", "hasIsMale", "hasBirthTime", "hasNationalityId",
417 "hasRetirementTime", "logoURL", "urlTemplate", "orderNum", "channel", "streamingproviderId",
418 "bettingCommissionVACs", "description")
419 (
420 SELECT decoded.*
421 FROM x,
422 XMLTABLE('//sdql/*/*' PASSING source_xml COLUMNS
423 __entity_name VARCHAR PATH 'name()',
424 "_batchId" VARCHAR PATH '../@batchId',
425 "_batchUuid" VARCHAR PATH '../@batchUuid',
426 "_createdTime" VARCHAR PATH '../@createdTime',
427 "id" VARCHAR PATH '@id',
428 "name" VARCHAR PATH '@name',
429 "version" VARCHAR PATH '@version',
430 "type" VARCHAR PATH '@type',
431 "sportId" VARCHAR PATH '@sportId',
432 "venueId" VARCHAR PATH '@venueId',
433 "rootPartId" VARCHAR PATH '@rootPartId',
434 "currentPartId" VARCHAR PATH '@currentPartId',
435 "statusId" VARCHAR PATH '@statusId',
436 "typeId" VARCHAR PATH '@typeId',
437 "entityId" VARCHAR PATH '@entityId',
438 "entityTypeId" VARCHAR PATH '@entityTypeId',
439 "collectorId" VARCHAR PATH '@collectorId',
440 "scoringUnitId" VARCHAR PATH '@scoringUnitId',
441 "eventId" VARCHAR PATH '@eventId',
442 "eventTypeId" VARCHAR PATH '@eventTypeId',
443 "eventPartId" VARCHAR PATH '@eventPartId',
444 "eventActionId" VARCHAR PATH '@eventActionId',
445 "eventInfoTypeId" VARCHAR PATH '@eventInfoTypeId',
446 "eventActionTypeId" VARCHAR PATH '@eventActionTypeId',
447 "eventActionDetailTypeId" VARCHAR PATH '@eventActionDetailTypeId',
448 "eventParticipantInfoTypeId" VARCHAR PATH '@eventParticipantInfoTypeId',
449 "eventParticipantInfoDetailTypeId" VARCHAR PATH '@eventParticipantInfoDetailTypeId',
450 "parentId" VARCHAR PATH '@parentId',
451 "parentEventId" VARCHAR PATH '@parentEventId',
452 "parentParticipantId" VARCHAR PATH '@parentParticipantId',
453 "providerId" VARCHAR PATH '@providerId',
454 "providerEntityId" VARCHAR PATH '@providerEntityId',
455 "providerEntityTypeId" VARCHAR PATH '@providerEntityTypeId',
456 "participantId" VARCHAR PATH '@participantId',
457 "participantTypeId" VARCHAR PATH '@participantTypeId',
458 "participantRoleId" VARCHAR PATH '@participantRoleId',
459 "fromParticipantId" VARCHAR PATH '@fromParticipantId',
460 "toParticipantId" VARCHAR PATH '@toParticipantId',
461 "startTime" VARCHAR PATH '@startTime',
462 "endTime" VARCHAR PATH '@endTime',
463 "retirementTime" VARCHAR PATH '@retirementTime',
464 "lastUpdateTime" VARCHAR PATH '@lastUpdateTime',
465 "lastCollectedTime" VARCHAR PATH '@lastCollectedTime',
466 "locationId" VARCHAR PATH '@locationId',
467 "fromLocationId" VARCHAR PATH '@fromLocationId',
468 "toLocationId" VARCHAR PATH '@toLocationId',
469 "firstName" VARCHAR PATH '@firstName',
470 "lastName" VARCHAR PATH '@lastName',
471 "shortName" VARCHAR PATH '@shortName',
472 "birthTime" VARCHAR PATH '@birthTime',
473 "countryId" VARCHAR PATH '@countryId',
474 "language" VARCHAR PATH '@language',
475
476 "isEnabled" VARCHAR PATH '@isEnabled',
477 "isAvailable" VARCHAR PATH '@isAvailable',
478 "isDrawPossible" VARCHAR PATH '@isDrawPossible',
479 "isMale" VARCHAR PATH '@isMale',
480 "isPrimary" VARCHAR PATH '@isPrimary',
481 "isIndividual" VARCHAR PATH '@isIndividual',
482 "isBookmaker" VARCHAR PATH '@isBookmaker',
483 "isBettingExchange" VARCHAR PATH '@isBettingExchange',
484 "isLiveOddsApproved" VARCHAR PATH '@isLiveOddsApproved',
485 "isNewsSource" VARCHAR PATH '@isNewsSource',
486 "paramBoolean1" VARCHAR PATH '@paramBoolean1',
487 "paramBoolean1Description" VARCHAR PATH '@paramBoolean1Description',
488 "paramFloat1" VARCHAR PATH '@paramFloat1',
489 "paramFloat2" VARCHAR PATH '@paramFloat2',
490 "paramFloat1Description" VARCHAR PATH '@paramFloat1Description',
491 "paramFloat2Description" VARCHAR PATH '@paramFloat2Description',
492 "paramString1" VARCHAR PATH '@paramString1',
493 "paramString1Description" VARCHAR PATH '@paramString1Description',
494 "paramString1PossibleValues" VARCHAR PATH '@paramString1PossibleValues',
495 "paramParticipantId1" VARCHAR PATH '@paramParticipantId1',
496 "paramParticipantId2" VARCHAR PATH '@paramParticipantId2',
497 "paramParticipantId1Description" VARCHAR PATH '@paramParticipantId1Description',
498 "paramParticipantId2Description" VARCHAR PATH '@paramParticipantId2Description',
499 "paramParticipantIdsMustBeOrdered" VARCHAR PATH '@paramParticipantIdsMustBeOrdered',
500 "paramParticipantRoleId" VARCHAR PATH '@paramParticipantRoleId',
501 "paramParticipantRoleIdDescription" VARCHAR PATH '@paramParticipantRoleIdDescription',
502 "paramEventPartId1Description" VARCHAR PATH '@paramEventPartId1Description',
503 "paramEventStatusId1Description" VARCHAR PATH '@paramEventStatusId1Description',
504 "paramScoringUnitId1Description" VARCHAR PATH '@paramScoringUnitId1Description',
505 "paramTime1Description" VARCHAR PATH '@paramTime1Description',
506 "hasLiveStatus" VARCHAR PATH '@hasLiveStatus',
507 "hasParamBoolean1" VARCHAR PATH '@hasParamBoolean1',
508 "hasParamFloat1" VARCHAR PATH '@hasParamFloat1',
509 "hasParamFloat2" VARCHAR PATH '@hasParamFloat2',
510 "hasParamString1" VARCHAR PATH '@hasParamString1',
511 "hasParamTime1" VARCHAR PATH '@hasParamTime1',
512 "hasParamEventStatusId1" VARCHAR PATH '@hasParamEventStatusId1',
513 "hasParamEventPartId1" VARCHAR PATH '@hasParamEventPartId1',
514 "hasParamParticipantId1" VARCHAR PATH '@hasParamParticipantId1',
515 "hasParamParticipantId2" VARCHAR PATH '@hasParamParticipantId2',
516 "hasParamParticipantRoleId" VARCHAR PATH '@hasParamParticipantRoleId',
517 "hasParamScoringUnitId1" VARCHAR PATH '@hasParamScoringUnitId1',
518 "hasName" VARCHAR PATH '@hasName',
519 "hasFirstName" VARCHAR PATH '@hasFirstName',
520 "hasLastName" VARCHAR PATH '@hasLastName',
521 "hasIsMale" VARCHAR PATH '@hasIsMale',
522 "hasBirthTime" VARCHAR PATH '@hasBirthTime',
523 "hasNationalityId" VARCHAR PATH '@hasNationalityId',
524 "hasRetirementTime" VARCHAR PATH '@hasRetirementTime',
525
526 "logoURL" VARCHAR PATH '@logoURL',
527 "urlTemplate" VARCHAR PATH '@urlTemplate',
528 "orderNum" VARCHAR PATH '@orderNum',
529 "channel" VARCHAR PATH '@channel',
530 "streamingproviderId" VARCHAR PATH '@streamingproviderId',
531 "bettingCommissionVACs" VARCHAR PATH '@bettingCommissionVACs',
532 "description" VARCHAR PATH '@description') AS decoded
533 );
534END;
535$$ LANGUAGE plpgsql VOLATILE;