mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-11-07 03:10:56 +01:00
Fixed checkstyle & activity index precision on SQLite
This commit is contained in:
parent
b375661047
commit
08ea042144
@ -197,7 +197,7 @@ public class SessionsMutator {
|
||||
return session -> {
|
||||
Long start = session.getUnsafe(SessionKeys.START);
|
||||
long end = session.getValue(SessionKeys.END).orElse(System.currentTimeMillis());
|
||||
return (after <= end && start <= before);
|
||||
return after <= end && start <= before;
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -88,7 +88,7 @@ public class ActivityIndexQueries {
|
||||
String selectThreeWeeks = selectActivePlaytimeSQL + UNION_ALL + selectActivePlaytimeSQL + UNION_ALL + selectActivePlaytimeSQL;
|
||||
|
||||
return SELECT +
|
||||
"5.0 - 5.0 * AVG(1.0 / (?/2.0 * (q1.active_playtime/?) +1.0)) as activity_index," +
|
||||
"5.0 - 5.0 * AVG(1.0 / (?/2.0 * (q1.active_playtime*1.0/?) +1.0)) as activity_index," +
|
||||
"q1." + SessionsTable.USER_UUID +
|
||||
FROM + '(' + selectThreeWeeks + ") q1" +
|
||||
GROUP_BY + "q1." + SessionsTable.USER_UUID;
|
||||
|
@ -90,7 +90,7 @@ public class NetworkActivityIndexQueries {
|
||||
String selectThreeWeeks = selectActivePlaytimeSQL + UNION_ALL + selectActivePlaytimeSQL + UNION_ALL + selectActivePlaytimeSQL;
|
||||
|
||||
return SELECT +
|
||||
"5.0 - 5.0 * AVG(1.0 / (?/2.0 * (q1.active_playtime/?) +1.0)) as activity_index," +
|
||||
"5.0 - 5.0 * AVG(1.0 / (?/2.0 * (q1.active_playtime*1.0/?) +1.0)) as activity_index," +
|
||||
"q1." + SessionsTable.USER_UUID +
|
||||
FROM + '(' + selectThreeWeeks + ") q1" +
|
||||
GROUP_BY + "q1." + SessionsTable.USER_UUID;
|
||||
|
Loading…
Reference in New Issue
Block a user