Commit Graph

17 Commits

Author SHA1 Message Date
Aurora Lahtela bc4aef8b2b Add some missing javadocs to not generate warnings 2024-01-06 18:01:50 +02:00
Aurora Lahtela 38774867f7 Made query page display some results
Fixed Activity group filter
2022-11-12 10:39:20 +02:00
Aurora Lahtela 0a14d17d7a Fixed issues related to MySQL ONLY_FULL_GROUP_BY
MySQL breaks GROUP BY syntax of standard SQL, and allows arbitrary columns with aggregate functions.
The ONLY_FULL_GROUP_BY stops this, instead raising an error. Since the SQL was originally designed
with this mode on, restricting the SQL broke the code in a few places.

Adding the extra group by clauses solves the issue without effecting query results.

These issues will be caught by MySQLTest in the future, since the issues could be reproduced by
enabling ONLY_FULL_GROUP_BY mode.

Affects issues:
- Fixed #2619
2022-09-25 10:30:13 +03:00
Aurora Lahtela 92910d647a Revert API jar to Java 8 and update to Java 11 APIs 2022-06-18 11:31:53 +03:00
Aurora Lahtela b74e338721
Query optimizations (#2320)
* Optimized network ping table query
* Removed icon id selection subqueries

- Take the icon ID into memory when the icons are stored

* Fix typos in the optimized ping table query
* Optimize server ping table query
* Attempt to optimize /v1/servers tps data query
* Optimize ping and geolocations tables uuid -> user_id foreign key
* Prevent Plan from crashing if patching takes too long

- HikariCP auto commit was true for some reason even though all transactions have commit mechanism built-in.
- The setting was reset during connection recreation and that could cause an index out of bounds error.

* Reduce try-nesting in ExecStatement
* Use user_id and server_id instead of uuid for plan_world_times table
* Use user_id and server_id instead of uuid for plan_sessions and plan_user_info table
* Fix more issues and test queries used by Query Filters
* Use deferRender for data tables to load data into the table faster
* Swap uuids to user ids for query page filters

Fixes an issue where SQL is too big to execute

Affects issues:
- #2196
2022-04-09 20:52:29 +03:00
Aurora Lahtela d06c753be1
Query page view server selector (#2117)
Affects issues:
- Close #1829
2021-10-09 13:17:12 +03:00
Rsl1122 94c9dd3f95 Username change Rsl1122 -> AuroraLS3 2021-02-13 15:16:03 +02:00
Risto Lahtela a3c16b4b21 Added activity graphs to query results 2021-01-29 11:02:45 +02:00
Risto Lahtela aac7bdc632 Begun work on Filters:
- Filter interface
- Wrote 5 filters
- Wrote QueryFilters that manages different Filters

Plan is to link the QueryFilters to Resolvers:
- One that returns all filters and their options as json
- One that users the query parameters (eg ?q={json}) and gets the filters
  - FilterQuery has a static method to parse the json
2021-01-29 11:02:31 +02:00
Risto Lahtela 08ea042144 Fixed checkstyle & activity index precision on SQLite 2020-05-09 09:38:43 +03:00
Risto Lahtela b375661047 Fixed inconsistency issues related to activity index SQL
- Subquery was not returning rows for active playtime of 0, fix: COALESCE
- Union was removing duplicate 0s, replaced with UNION ALL
- Query did not use floating point for calculation

Affects issues:
- Fixed #1388
2020-05-08 20:53:52 +03:00
Risto Lahtela 4cca2251a8 Optimized query for activity group graphs
- Removed 5-way union
- Removed 2 nested queries
- Calculated groups with java code from the queried activity index values.

Affects issues:
- Improvement for #1329
2020-05-03 15:18:46 +03:00
Rsl1122 a50576e6e9 Fixed wrong usage of the word 'parse'
Reason: Parse means extracting information - In many cases the word was being
        used wrong (In Finnish 'parsia' means 'to patch together', which caused
        the wrong use)

The word 'parse' replaced with 'build', 'create' or 'generate' where appropriate
2019-12-05 20:25:42 +02:00
Rsl1122 113ca21343 Changed a query using wrong table
Activity index grouping query for /network page was using plan_user_info
instead of plan_users.

This lead to duplication of users if a player had played on multiple
servers.

Affects issues:
- Fixed #1216
2019-11-09 17:57:10 +02:00
Rsl1122 549cad4da5 Use getDouble with SQL function AVG()
MySQL that restricts float being queried with getLong caused an
SQLException

All usages of getLong with AVG function replaced with
getDouble cast to long.

Affects issues:
- Fixed #1181
2019-10-19 12:42:25 +03:00
Rsl1122 e18ec134f6 Optimized (memory) /players page table query 2019-09-15 13:25:19 +03:00
Risto Lahtela 66a19d7de1 Removed system. from packages (#1147)
* system.commands -> commands

* system.delivery -> delivery

* system.gathering -> gathering

* system.identification -> identification

* system.processing -> processing

* system.settings -> settings

* system.storage -> storage

* system.version -> version

* system -> com.djrapitops.plan
2019-09-03 09:32:30 +03:00