Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

bogdanJ9
Copy link

@bogdanJ9 bogdanJ9 commented Jun 7, 2021

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.

@bogdanJ9 bogdanJ9 force-pushed the postgres-for-stats-plugin branch from 95a7fac to e3ba08e Compare June 7, 2021 15:43
@bogdanJ9 bogdanJ9 force-pushed the postgres-for-stats-plugin branch from e3ba08e to 3112cbf Compare June 7, 2021 15:48
@nickdnk
Copy link
Collaborator

nickdnk commented Jul 31, 2021

@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.

@splewis
Copy link
Owner

splewis commented Sep 26, 2021

Yes, could you add the new stats from #612:

  • utility_damage
  • enemies_flashed
  • friendlies_flashed
  • knife_kills

char teamString[16];
GetTeamString(team, teamString, sizeof(teamString));

// TODO: this should really get split up somehow. Once it hits 32-arguments
Copy link
Collaborator

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.

@nickdnk nickdnk marked this pull request as draft January 5, 2022 02:05
@nickdnk
Copy link
Collaborator

nickdnk commented Jan 5, 2022

@bogdanJ9 Thanks for this. Please take a look at @splewis' comment and include all required columns. When you've done that and checked it works we can look into merging it.

InitDebugLog("get5_debug", "get5_pgsql");

g_ForceMatchIDCvar = CreateConVar(
"get5_pgsql_force_matchid", "0",
Copy link
Collaborator

@nickdnk nickdnk Jul 29, 2022

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() {
Copy link
Collaborator

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;
Copy link
Collaborator

@nickdnk nickdnk Jul 29, 2022

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/

@nickdnk
Copy link
Collaborator

nickdnk commented Sep 15, 2022

@bogdanJ9 Do you have any intention to complete this PR? We'll accept it if you update it. If not, we'll close it.

@nickdnk
Copy link
Collaborator

nickdnk commented Oct 21, 2022

Closed based on inactivity.

@nickdnk nickdnk closed this Oct 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants