Interface TimeSQL

All Superinterfaces:
SQL
All Known Subinterfaces:
TimeH2, TimeMariaDB, TimeMySQL, TimePostgreSQL, TimeSQLite

public interface TimeSQL extends SQL
SQL interface for player playtime data operations in FlectonePulse.
Since:
1.9.0
  • Method Summary

    Modifier and Type
    Method
    Description
    findByPlayer(int playerId)
     
    getAllPlayTimes(int limit, int offset)
     
    int
     
    void
    updateLastSeen(double last, double total, int playerId)
     
    default void
    upsert(int playerId, long first, long last, long total, int sessions)
    Inserts a new playtime record or updates an existing one.
  • Method Details

    • updateLastSeen

      void updateLastSeen(double last, double total, int playerId)
    • getTotalCount

      int getTotalCount()
    • findByPlayer

      Optional<PlayTime> findByPlayer(int playerId)
    • getAllPlayTimes

      List<PlayTime> getAllPlayTimes(int limit, int offset)
    • upsert

      default void upsert(int playerId, long first, long last, long total, int sessions)
      Inserts a new playtime record or updates an existing one.
      Parameters:
      playerId - the player ID
      first - the timestamp of first join (only used if record is new)
      last - the timestamp of last seen
      total - the total playtime in seconds
      sessions - the number of sessions
      Throws:
      UnsupportedDatabaseOperationException - if not overridden