diff options
| author | Kapil Viren Ahuja <kvahuja@users.noreply.github.com> | 2017-02-27 19:12:59 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-02-27 19:12:59 +0530 |
| commit | 65f7c3cddaa7b4a495c283ccf7c9b415bb365f4b (patch) | |
| tree | b5c8df31ad2fce3fedcfc564297496d191d3b11f /queries/match.sql | |
| parent | 2309c313b648e06b3c441ab8aafd845939dedc48 (diff) | |
| parent | 3575da2783ba62ddf3784ae814c8fec862c0eb1a (diff) | |
| download | processor-65f7c3cddaa7b4a495c283ccf7c9b415bb365f4b.tar.gz processor-65f7c3cddaa7b4a495c283ccf7c9b415bb365f4b.zip | |
Merge pull request #22 from vainglorygame/rewrite
rewrite to use joblib (fixes #20), use updated raw schema, check for …
Diffstat (limited to 'queries/match.sql')
| -rw-r--r-- | queries/match.sql | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/queries/match.sql b/queries/match.sql index a07652f..1e6d37f 100644 --- a/queries/match.sql +++ b/queries/match.sql @@ -1,15 +1,15 @@ SELECT -id AS "apiId", -(attributes->>'createdAt')::timestamp as "createdAt", -(attributes->>'duration')::int AS "duration", -attributes->>'gameMode' AS "gameMode", -COALESCE(NULLIF(attributes->>'patchVersion', ''), '0') AS "patchVersion", -attributes->>'shardId' AS "shardId", -attributes->'stats'->>'endGameReason' AS "endGameReason", -attributes->'stats'->>'queue' AS "queue" , +match.id AS "apiId", +(match.data->'data'->'attributes'->>'createdAt')::timestamp as "createdAt", +(match.data->'data'->'attributes'->>'duration')::int AS "duration", +match.data->'data'->'attributes'->>'gameMode' AS "gameMode", +COALESCE(NULLIF(match.data->'data'->'attributes'->>'patchVersion', ''), '0') AS "patchVersion", +match.data->'data'->'attributes'->>'shardId' AS "shardId", +match.data->'data'->'attributes'->'stats'->>'endGameReason' AS "endGameReason", +match.data->'data'->'attributes'->'stats'->>'queue' AS "queue", -relationships->'rosters'->'data'->0->>'id' as "roster_1", -relationships->'rosters'->'data'->1->>'id' as "roster_2" +match.data->'relations'->0->'data'->>'id' as "roster_1", +match.data->'relations'->1->'data'->>'id' as "roster_2" -FROM "match" +FROM match WHERE id=$1 |
