diff options
| author | Kapil Viren Ahuja <kvahuja@users.noreply.github.com> | 2017-02-19 17:04:35 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-02-19 17:04:35 +0530 |
| commit | 7eb07c0ccf2f464e3936b24136e41471ff1c1ff7 (patch) | |
| tree | c117aecbc2276c875edd7a328f15ea872c1c8b64 /queries/match.sql | |
| parent | eaf6b29760f13040444707eecf9c342c67bd6ffb (diff) | |
| parent | d940ad82f7e34576bf6cc6b8a93cbc298765315e (diff) | |
| download | processor-7eb07c0ccf2f464e3936b24136e41471ff1c1ff7.tar.gz processor-7eb07c0ccf2f464e3936b24136e41471ff1c1ff7.zip | |
Merge pull request #14 from vainglorygame/features/web-db-model-refactoring
Features web db model refactoring
Diffstat (limited to 'queries/match.sql')
| -rw-r--r-- | queries/match.sql | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/queries/match.sql b/queries/match.sql index 0ff0c62..4f82933 100644 --- a/queries/match.sql +++ b/queries/match.sql @@ -1,18 +1,15 @@ SELECT -id AS "match_id", +id AS "apiId", +(attributes->>'createdAt')::timestamp as "createdAt", (attributes->>'duration')::int AS "duration", attributes->>'gameMode' AS "gameMode", -COALESCE(NULLIF(attributes->>'patchVersion', ''), '0')::int AS "patchVersion", -attributes->>'shardId' AS "shard", -attributes->'stats'->>'endGameReason' AS "result", +COALESCE(NULLIF(attributes->>'patchVersion', ''), '0') AS "patchVersion", +attributes->>'shardId' AS "shardId", +attributes->'stats'->>'endGameReason' AS "endGameReason", attributes->'stats'->>'queue' AS "queue", -false AS "anyAFK", -'' AS "winningTeam", -0 AS "krakenCaptures", -0 AS "laneMinionsSlayed", -0 AS "jungleMinionsSlayed", -0 AS "heroDeaths" +relationships->'rosters'->'data'->0->>'id' as roster_1, +relationships->'rosters'->'data'->1->>'id' as roster_2 FROM match |
