-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rewritten queries to support stats plugin compatibility with PostgreSQL #674
Conversation
95a7fac
to
e3ba08e
Compare
e3ba08e
to
3112cbf
Compare
@splewis You should probably merge my PR before this one, so this one can get updated to include the columns I added. Putting this one in first just means you'll have breaking changes twice. |
Yes, could you add the new stats from #612:
|
char teamString[16]; | ||
GetTeamString(team, teamString, sizeof(teamString)); | ||
|
||
// TODO: this should really get split up somehow. Once it hits 32-arguments |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the 32 argument comment. It's no longer a limitation.
InitDebugLog("get5_debug", "get5_pgsql"); | ||
|
||
g_ForceMatchIDCvar = CreateConVar( | ||
"get5_pgsql_force_matchid", "0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to go and it should read the matchid
instead. It is included in the forward that gets called when the series starts. Look at the cases here: https://github.com/splewis/get5/pull/795/files and make sure that "scrim" and "manual" are both considered candidates for auto-increment.
} | ||
} | ||
|
||
static int MapNumber() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this and use the native Get5_GetMapNumber()
.
Database db = null; | ||
char queryBuffer[2048]; | ||
|
||
int g_MatchID = -1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't duplicate g_MatchID
here. Use the GetMatchId
method on the events from the forwards: https://splewis.github.io/get5/events_and_forwards/
@bogdanJ9 Do you have any intention to complete this PR? We'll accept it if you update it. If not, we'll close it. |
Closed based on inactivity. |
PostgreSQL support appeared in version 1.11 of SourceMod (development).
This pull request contains SQL script for creating tables in the database (misc\import_stats_pgsql.sql) and a plugin with query support.