mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-15 05:41:51 +08:00
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
This commit is contained in:
parent
68c845e71b
commit
549cad4da5
@ -292,7 +292,7 @@ public class ActivityIndexQueries {
|
||||
|
||||
@Override
|
||||
public Long processResults(ResultSet set) throws SQLException {
|
||||
return set.next() ? set.getLong("average") : 0;
|
||||
return set.next() ? (long) set.getDouble("average") : 0;
|
||||
}
|
||||
});
|
||||
};
|
||||
@ -326,7 +326,7 @@ public class ActivityIndexQueries {
|
||||
|
||||
@Override
|
||||
public Long processResults(ResultSet set) throws SQLException {
|
||||
return set.next() ? set.getLong("average") : 0;
|
||||
return set.next() ? (long) set.getDouble("average") : 0;
|
||||
}
|
||||
});
|
||||
};
|
||||
@ -361,7 +361,7 @@ public class ActivityIndexQueries {
|
||||
|
||||
@Override
|
||||
public Long processResults(ResultSet set) throws SQLException {
|
||||
return set.next() ? set.getLong("average") : 0;
|
||||
return set.next() ? (long) set.getDouble("average") : 0;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
@ -282,7 +282,7 @@ public class NetworkActivityIndexQueries {
|
||||
|
||||
@Override
|
||||
public Long processResults(ResultSet set) throws SQLException {
|
||||
return set.next() ? set.getLong("average") : 0;
|
||||
return set.next() ? (long) set.getDouble("average") : 0;
|
||||
}
|
||||
});
|
||||
};
|
||||
@ -314,7 +314,7 @@ public class NetworkActivityIndexQueries {
|
||||
|
||||
@Override
|
||||
public Long processResults(ResultSet set) throws SQLException {
|
||||
return set.next() ? set.getLong("average") : 0;
|
||||
return set.next() ? (long) set.getDouble("average") : 0;
|
||||
}
|
||||
});
|
||||
};
|
||||
@ -347,7 +347,7 @@ public class NetworkActivityIndexQueries {
|
||||
|
||||
@Override
|
||||
public Long processResults(ResultSet set) throws SQLException {
|
||||
return set.next() ? set.getLong("average") : 0;
|
||||
return set.next() ? (long) set.getDouble("average") : 0;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
@ -616,7 +616,7 @@ public class SessionQueries {
|
||||
|
||||
@Override
|
||||
public Long processResults(ResultSet set) throws SQLException {
|
||||
return set.next() ? set.getLong("average") : 0;
|
||||
return set.next() ? (long) set.getDouble("average") : 0;
|
||||
}
|
||||
});
|
||||
};
|
||||
@ -644,7 +644,7 @@ public class SessionQueries {
|
||||
|
||||
@Override
|
||||
public Long processResults(ResultSet set) throws SQLException {
|
||||
return set.next() ? set.getLong("average") : 0;
|
||||
return set.next() ? (long) set.getDouble("average") : 0;
|
||||
}
|
||||
});
|
||||
};
|
||||
@ -677,7 +677,7 @@ public class SessionQueries {
|
||||
|
||||
@Override
|
||||
public Long processResults(ResultSet set) throws SQLException {
|
||||
return set.next() ? set.getLong("average") : 0;
|
||||
return set.next() ? (long) set.getDouble("average") : 0;
|
||||
}
|
||||
});
|
||||
};
|
||||
@ -705,7 +705,7 @@ public class SessionQueries {
|
||||
|
||||
@Override
|
||||
public Long processResults(ResultSet set) throws SQLException {
|
||||
return set.next() ? set.getLong("average") : 0;
|
||||
return set.next() ? (long) set.getDouble("average") : 0;
|
||||
}
|
||||
});
|
||||
};
|
||||
@ -738,7 +738,7 @@ public class SessionQueries {
|
||||
|
||||
@Override
|
||||
public Long processResults(ResultSet set) throws SQLException {
|
||||
return set.next() ? set.getLong("average") : 0;
|
||||
return set.next() ? (long) set.getDouble("average") : 0;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
@ -333,7 +333,7 @@ public class TPSQueries {
|
||||
|
||||
@Override
|
||||
public Long processResults(ResultSet set) throws SQLException {
|
||||
return set.next() ? set.getLong("average") : -1L;
|
||||
return set.next() ? (long) set.getDouble("average") : -1L;
|
||||
}
|
||||
};
|
||||
}
|
||||
@ -353,7 +353,7 @@ public class TPSQueries {
|
||||
|
||||
@Override
|
||||
public Long processResults(ResultSet set) throws SQLException {
|
||||
return set.next() ? set.getLong("average") : -1L;
|
||||
return set.next() ? (long) set.getDouble("average") : -1L;
|
||||
}
|
||||
};
|
||||
}
|
||||
@ -373,7 +373,7 @@ public class TPSQueries {
|
||||
|
||||
@Override
|
||||
public Long processResults(ResultSet set) throws SQLException {
|
||||
return set.next() ? set.getLong("average") : -1L;
|
||||
return set.next() ? (long) set.getDouble("average") : -1L;
|
||||
}
|
||||
};
|
||||
}
|
||||
@ -433,7 +433,7 @@ public class TPSQueries {
|
||||
|
||||
@Override
|
||||
public Long processResults(ResultSet set) throws SQLException {
|
||||
return set.next() ? set.getLong("average") : -1L;
|
||||
return set.next() ? (long) set.getDouble("average") : -1L;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user