diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2017-03-28 18:30:06 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2017-03-28 18:30:06 +0200 |
| commit | dfa0872dd7940b6d2759d8901274f459edf1b46e (patch) | |
| tree | 761d559790e496cf750908fa9018671124435236 /queries/roster.sql | |
| parent | 57ac9c2b03f9e46de6ea4a16eb3954868d1427c9 (diff) | |
| download | processor-dfa0872dd7940b6d2759d8901274f459edf1b46e.tar.gz processor-dfa0872dd7940b6d2759d8901274f459edf1b46e.zip | |
rewrite in NodeJS
Diffstat (limited to 'queries/roster.sql')
| -rw-r--r-- | queries/roster.sql | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/queries/roster.sql b/queries/roster.sql deleted file mode 100644 index f6500fb..0000000 --- a/queries/roster.sql +++ /dev/null @@ -1,20 +0,0 @@ -WITH rosters AS (SELECT - id AS matchid, - JSONB_ARRAY_ELEMENTS(match.data->'relations') AS roster -FROM match WHERE id=$1) -SELECT -roster->'data'->>'id' AS "api_id", -matchid AS "match_api_id", -(roster->'data'->'attributes'->'stats'->>'acesEarned')::int AS "aces_earned", -(roster->'data'->'attributes'->'stats'->>'gold')::int AS "gold", -(roster->'data'->'attributes'->'stats'->>'heroKills')::int AS "hero_kills", -(roster->'data'->'attributes'->'stats'->>'krakenCaptures')::int AS "kraken_captures", -roster->'data'->'attributes'->'stats'->>'side' AS "side", -roster->'data'->'attributes'->'stats'->>'side' AS "team_color", -(roster->'data'->'attributes'->'stats'->>'turretKills')::int AS "turret_kills", -(roster->'data'->'attributes'->'stats'->>'turretsRemaining')::int AS "turrets_remaining", - -roster->'relations'->0->'data'->>'id' AS "participant_1", -roster->'relations'->1->'data'->>'id' AS "participant_2", -roster->'relations'->2->'data'->>'id' AS "participant_3" -FROM rosters |
