-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Detect invalid logs and mark in DB (#57)
* start implementation * finish error impl, set is_valid * add force-parse parameter
- Loading branch information
1 parent
0a15275
commit 0d1fb4d
Showing
13 changed files
with
402 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
EVENT table (table is new) | ||
|
||
| name | type | values | notes | | ||
|-----------------|----------|---------|----------------------------| | ||
| eventId | | | auto-increment, NOT NULL | | ||
| logId | | | log table id ref, NOT NULL | | ||
| isFirstLog | bool | | default true | | ||
| eventType | enum | 0-71 | NOT NULL | | ||
| rawLine | string | | NOT NULL | | ||
| lineNumber | number | | NOT NULL | | ||
| timestamp | datetime | | NOT NULL | | ||
| gameTime | number | seconds | NOT NULL | | ||
| extraData | string | | (prefer json format?) | | ||
| playerFrom | | | player table id ref | | ||
| playerFromClass | short | 0-9 | | | ||
| playerTo | | | player table id ref | | ||
| playerToClass | short | 0-9 | | | ||
| withWeapon | short | 0-39 | | | ||
| playerFromFlag | bool | | default false | | ||
| playerToFlag | bool | | default false | | ||
|
||
|
||
PLAYER table (table is new) | ||
|
||
| name | type | desc | notes | | ||
|-----------------|----------|---------|----------------------------| | ||
| playerId | | | auto-increment, NOT NULL | | ||
| playerName | string | | NOT NULL | | ||
| playerAlias | string | | | | ||
| steamId | number | | see [SteamID doc](https://developer.valvesoftware.com/wiki/SteamID) | | ||
|
||
|
||
LOGS table (* are new columns) | ||
|
||
| name | type | values | notes | | ||
|-----------------|----------|----------|----------------------------| | ||
| * logId | | | auto-increment, NOT NULL | | ||
| parsedlog | string | | output URI slug | | ||
| log_file1 | string | | matches name in uploads/ | | ||
| log_file2 | string | | matches name in uploads/ | | ||
| date_parsed | datetime | | initial upload time | | ||
| date_match | datetime | | reported in local time | | ||
| map | string | | can be "<multiple>" | | ||
| server | string | | | | ||
| num_players | int | | | | ||
| * is_valid | bool | | default false | | ||
|
||
|
||
PARSEDLOGS table (table is new) | ||
|
||
| name | type | values | notes | | ||
|-----------------|--------------|----------|----------------------------| | ||
| logId | | | auto-increment, NOT NULL | | ||
| jsonSummary | varchar(MAX) | | full json | | ||
|
||
|
||
MAPLOCATIONS table (table is new) | ||
|
||
| name | type | values | notes | | ||
|-----------------|--------------|----------|----------------------------| | ||
| locationId | | | auto-increment, NOT NULL | | ||
| map | string | | NOT NULL, add index | | ||
| name | string | | user-provided name/callout | | ||
| geom | geometry | | will be POLYGON Z, typ. | | ||
|
||
SELECT name | ||
FROM mapLocations | ||
WHERE ST_3DIntersects( | ||
geom, | ||
'POINT Z($x, $y, $z)'::geometry | ||
) | ||
LIMIT 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.