Commit Graph

123 Commits

Author SHA1 Message Date
cialloo
55c7836c67 Enhance database compatibility for rankings and statistics
- Updated SQL queries in shavit-rankings.sp to support PostgreSQL and SQLite, including handling of INSERT and REPLACE statements.
- Modified shavit-stats.sp to adapt SQL syntax based on the database driver, ensuring compatibility for playtime updates and statistics retrieval.
- Adjusted shavit-wr.sp to format time values correctly across different database systems and refined leaderboard queries.
- Enhanced shavit-zones.sp to use INSERT ON CONFLICT for PostgreSQL, maintaining compatibility with MySQL and SQLite.
- Introduced a global driver variable to manage database-specific logic throughout the scripts.
2025-07-13 10:54:05 +08:00
Awe
e5976001cf Fix database verison parsing 2025-01-10 14:17:53 -05:00
rtldg
66c730a897 fixups for mapchooser nominate menu after sqlite support was added to shavit-rankings 2024-03-26 20:02:27 +00:00
rtldg
7fb0f45c2c This rankings query was doing the wrong thing in WHERE 2023-12-13 09:29:23 +00:00
rtldg
fee8edeeda make sure it logs about sqlite pow hate 2023-03-16 10:35:04 +00:00
rtldg
787aa8ff34
sqlite rankings support & GetWeightedPoints deprecation (#1182)
* Wip sqlite rankings support & GetWeightedPoints deprecation

* Update shavit-rankings.sp

* maybe everything is working now?
2023-03-16 10:24:40 +00:00
rtldg
1449b9b3d5 revert this !top thing back so points have commas 2022-07-01 13:31:09 +00:00
rtldg
5056917d78 some log messages 2022-06-28 02:16:24 +00:00
rtldg
4486528880 preliminary postgresql support 2022-06-23 09:10:22 +00:00
rtldg
0f44dd1710 add shavit_core_log_sql & remove Database2/Transaction2 methmodmaps 2022-06-13 06:28:46 +00:00
rtldg
ef3ca621c4 add more contributors & copyright attributions. mostly done via git blame but also it's also likely i missed some people. 2022-05-25 11:43:57 +00:00
rtldg
5b5652a34d fix typo 2022-05-23 03:15:38 +00:00
rtldg
7a11acf2e6 remove points_calced_from since it should only update on wr now so it's unnecessary 2022-01-19 09:41:01 +00:00
rtldg
b3b7de37e2 trim out some unnecessary point recalculations 2022-01-19 01:24:03 +00:00
rtldg
0c91c19ba6 trim whitespace & add licenses 2022-01-01 10:15:28 +00:00
rtldg
ae0145430a remove some sourcemod 1.11 warnings 2022-01-01 10:15:18 +00:00
BoomShotKapow
3348e54316 SourceMod 1.11 dev changes & Query -> Query2 2022-01-01 10:12:53 +00:00
rtldg
8827864fb8 delay wrhrank queries since they're slow and block all the other queries which is very annoying for me since it's like a 4s query so i just sit there waiting for my cookies & such to load 2021-12-29 21:33:16 +00:00
rtldg
ede141d8c0 recalc on wr delete & remove recalc on map end 2021-12-29 19:06:23 +00:00
rtldg
4c46975584 remove unnecessary query 2021-12-29 18:13:32 +00:00
rtldg
345d6bf28e cleanup mvp test stuff that i think didn't work 2021-12-29 18:10:19 +00:00
BoomShotKapow
94d8d91a82 fix wrholderrank table creation error with versions of mysql 8.0 (#1097) 2021-12-29 11:40:13 +00:00
rtldg
223611d7a9 make cleaner !profile queries 2021-12-22 08:16:28 +00:00
rtldg
254eea7780 skip function stuff if shavit_rankings_weighting = 1 2021-12-14 11:26:27 +00:00
rtldg
616de1ce97 make sure some handles are deleted by littering deletes everywhere 2021-11-30 03:03:11 +00:00
rtldg
4fef03f925 remove new db connection stuff 2021-11-29 06:36:42 +00:00
rtldg
e32b79c941 make the setmaptier query not error 2021-11-28 06:02:20 +00:00
rtldg
6d21e25679 add some scuffed code to let you !settier N bhop_different_map 2021-11-28 03:08:41 +00:00
rtldg
64414f61e0 misc sql changes 2021-11-08 15:29:34 +00:00
rtldg
b9c6c47db4 swap #include <shavit> with <shavit/core> 2021-10-28 21:18:53 +00:00
rtldg
b5d8ad6e9a make sure changing map tier recalcs points 2021-10-26 15:37:50 +00:00
rtldg
673b172871 mess around with point calculation queries again 2021-10-18 07:23:01 +00:00
rtldg
1bb7b3e274 remove Shavit_OpenStatsMenu 2021-10-18 07:23:01 +00:00
rtldg
966ceea5f8 finish splitting shavit.inc 2021-10-18 07:22:50 +00:00
rtldg
df2e45f478 Merge branch 'master' into reorg 2021-10-17 04:48:48 +00:00
rtldg
cb8c7e8d56 add shavit_rankings_new_db_connection, shavit_stats_new_db_connection, and shavit_wr_new_db_connection 2021-10-17 04:46:01 +00:00
rtldg
41882d3465 reorganize playertimes columns (in create table). speed up point recalculation by inlining things where possible and caching wr last calculated against. 2021-10-10 07:50:45 +00:00
rtldg
7ca863f04b move sql table creation and migrations 2021-10-10 05:14:37 +00:00
rtldg
ae82d9a5ad add shavit_rankings_weighting_limit 2021-10-06 07:14:31 +00:00
rtldg
6c66c70094 test multiple sql connections in shavit-rankings 2021-10-05 16:28:51 +00:00
rtldg
7383cba61f remove duplicate map tier retreival 2021-10-05 16:17:01 +00:00
rtldg
838d33510b make shavit_rankings_weighting 1.0 not use a sql-function 2021-10-05 14:34:01 +00:00
rtldg
235cc9f241 work on improving rankings queries 2021-10-05 11:00:13 +00:00
rtldg
22a87ce3ee add Shavit_GuessPointsForTime so we can recalc styles only on WR 2021-10-05 04:43:10 +00:00
rtldg
4f8fd211f3 test speeding up recalc queries 2021-10-04 14:12:47 +00:00
rtldg
3155e3c15f add some more garbage to mess around with mvp count 2021-09-19 22:01:44 +00:00
rtldg
031e640552 add some stuff to hopefully fix mvp counts being broken on css and sliding between different players 2021-09-17 02:32:50 +00:00
rtldg
00d16405f6 use Transaction2 in more places 2021-09-14 01:43:23 +00:00
rtldg
fcab0a7db6 make sure we always fill the tier cache 2021-09-12 05:02:08 +00:00
rtldg
762c9a1923 swap GetTimerDatabaseHandle2 with Shavit_GetDatabase in a few places 2021-08-31 20:03:59 +00:00