added users.count_miss
This commit is contained in:
parent
70a26cac24
commit
45cb5afc0a
@ -17,7 +17,7 @@ import org.jooq.ForeignKey
|
||||
import org.jooq.Name
|
||||
import org.jooq.Record
|
||||
import org.jooq.Records
|
||||
import org.jooq.Row17
|
||||
import org.jooq.Row18
|
||||
import org.jooq.Schema
|
||||
import org.jooq.SelectField
|
||||
import org.jooq.Table
|
||||
@ -148,6 +148,11 @@ open class Users(
|
||||
*/
|
||||
val IS_ADMIN: TableField<UsersRecord, Boolean?> = createField(DSL.name("is_admin"), SQLDataType.BOOLEAN.defaultValue(DSL.field(DSL.raw("false"), SQLDataType.BOOLEAN)), this, "")
|
||||
|
||||
/**
|
||||
* The column <code>public.users.count_miss</code>.
|
||||
*/
|
||||
val COUNT_MISS: TableField<UsersRecord, Long?> = createField(DSL.name("count_miss"), SQLDataType.BIGINT, this, "")
|
||||
|
||||
private constructor(alias: Name, aliased: Table<UsersRecord>?): this(alias, null, null, aliased, null)
|
||||
private constructor(alias: Name, aliased: Table<UsersRecord>?, parameters: Array<Field<*>?>?): this(alias, null, null, aliased, parameters)
|
||||
|
||||
@ -189,18 +194,18 @@ open class Users(
|
||||
override fun rename(name: Table<*>): Users = Users(name.getQualifiedName(), null)
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Row17 type methods
|
||||
// Row18 type methods
|
||||
// -------------------------------------------------------------------------
|
||||
override fun fieldsRow(): Row17<Long?, String?, LocalDateTime?, String?, Long?, Long?, Double?, Double?, Long?, Long?, Long?, Long?, Long?, Long?, Long?, OffsetDateTime?, Boolean?> = super.fieldsRow() as Row17<Long?, String?, LocalDateTime?, String?, Long?, Long?, Double?, Double?, Long?, Long?, Long?, Long?, Long?, Long?, Long?, OffsetDateTime?, Boolean?>
|
||||
override fun fieldsRow(): Row18<Long?, String?, LocalDateTime?, String?, Long?, Long?, Double?, Double?, Long?, Long?, Long?, Long?, Long?, Long?, Long?, OffsetDateTime?, Boolean?, Long?> = super.fieldsRow() as Row18<Long?, String?, LocalDateTime?, String?, Long?, Long?, Double?, Double?, Long?, Long?, Long?, Long?, Long?, Long?, Long?, OffsetDateTime?, Boolean?, Long?>
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Function)}.
|
||||
*/
|
||||
fun <U> mapping(from: (Long?, String?, LocalDateTime?, String?, Long?, Long?, Double?, Double?, Long?, Long?, Long?, Long?, Long?, Long?, Long?, OffsetDateTime?, Boolean?) -> U): SelectField<U> = convertFrom(Records.mapping(from))
|
||||
fun <U> mapping(from: (Long?, String?, LocalDateTime?, String?, Long?, Long?, Double?, Double?, Long?, Long?, Long?, Long?, Long?, Long?, Long?, OffsetDateTime?, Boolean?, Long?) -> U): SelectField<U> = convertFrom(Records.mapping(from))
|
||||
|
||||
/**
|
||||
* Convenience mapping calling {@link SelectField#convertFrom(Class,
|
||||
* Function)}.
|
||||
*/
|
||||
fun <U> mapping(toType: Class<U>, from: (Long?, String?, LocalDateTime?, String?, Long?, Long?, Double?, Double?, Long?, Long?, Long?, Long?, Long?, Long?, Long?, OffsetDateTime?, Boolean?) -> U): SelectField<U> = convertFrom(toType, Records.mapping(from))
|
||||
fun <U> mapping(toType: Class<U>, from: (Long?, String?, LocalDateTime?, String?, Long?, Long?, Double?, Double?, Long?, Long?, Long?, Long?, Long?, Long?, Long?, OffsetDateTime?, Boolean?, Long?) -> U): SelectField<U> = convertFrom(toType, Records.mapping(from))
|
||||
}
|
||||
|
||||
@ -11,8 +11,8 @@ import java.time.OffsetDateTime
|
||||
|
||||
import org.jooq.Field
|
||||
import org.jooq.Record1
|
||||
import org.jooq.Record17
|
||||
import org.jooq.Row17
|
||||
import org.jooq.Record18
|
||||
import org.jooq.Row18
|
||||
import org.jooq.impl.UpdatableRecordImpl
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@ import org.jooq.impl.UpdatableRecordImpl
|
||||
* This class is generated by jOOQ.
|
||||
*/
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
open class UsersRecord private constructor() : UpdatableRecordImpl<UsersRecord>(Users.USERS), Record17<Long?, String?, LocalDateTime?, String?, Long?, Long?, Double?, Double?, Long?, Long?, Long?, Long?, Long?, Long?, Long?, OffsetDateTime?, Boolean?> {
|
||||
open class UsersRecord private constructor() : UpdatableRecordImpl<UsersRecord>(Users.USERS), Record18<Long?, String?, LocalDateTime?, String?, Long?, Long?, Double?, Double?, Long?, Long?, Long?, Long?, Long?, Long?, Long?, OffsetDateTime?, Boolean?, Long?> {
|
||||
|
||||
open var userId: Long?
|
||||
set(value): Unit = set(0, value)
|
||||
@ -92,6 +92,10 @@ open class UsersRecord private constructor() : UpdatableRecordImpl<UsersRecord>(
|
||||
set(value): Unit = set(16, value)
|
||||
get(): Boolean? = get(16) as Boolean?
|
||||
|
||||
open var countMiss: Long?
|
||||
set(value): Unit = set(17, value)
|
||||
get(): Long? = get(17) as Long?
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Primary key information
|
||||
// -------------------------------------------------------------------------
|
||||
@ -99,11 +103,11 @@ open class UsersRecord private constructor() : UpdatableRecordImpl<UsersRecord>(
|
||||
override fun key(): Record1<Long?> = super.key() as Record1<Long?>
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Record17 type implementation
|
||||
// Record18 type implementation
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
override fun fieldsRow(): Row17<Long?, String?, LocalDateTime?, String?, Long?, Long?, Double?, Double?, Long?, Long?, Long?, Long?, Long?, Long?, Long?, OffsetDateTime?, Boolean?> = super.fieldsRow() as Row17<Long?, String?, LocalDateTime?, String?, Long?, Long?, Double?, Double?, Long?, Long?, Long?, Long?, Long?, Long?, Long?, OffsetDateTime?, Boolean?>
|
||||
override fun valuesRow(): Row17<Long?, String?, LocalDateTime?, String?, Long?, Long?, Double?, Double?, Long?, Long?, Long?, Long?, Long?, Long?, Long?, OffsetDateTime?, Boolean?> = super.valuesRow() as Row17<Long?, String?, LocalDateTime?, String?, Long?, Long?, Double?, Double?, Long?, Long?, Long?, Long?, Long?, Long?, Long?, OffsetDateTime?, Boolean?>
|
||||
override fun fieldsRow(): Row18<Long?, String?, LocalDateTime?, String?, Long?, Long?, Double?, Double?, Long?, Long?, Long?, Long?, Long?, Long?, Long?, OffsetDateTime?, Boolean?, Long?> = super.fieldsRow() as Row18<Long?, String?, LocalDateTime?, String?, Long?, Long?, Double?, Double?, Long?, Long?, Long?, Long?, Long?, Long?, Long?, OffsetDateTime?, Boolean?, Long?>
|
||||
override fun valuesRow(): Row18<Long?, String?, LocalDateTime?, String?, Long?, Long?, Double?, Double?, Long?, Long?, Long?, Long?, Long?, Long?, Long?, OffsetDateTime?, Boolean?, Long?> = super.valuesRow() as Row18<Long?, String?, LocalDateTime?, String?, Long?, Long?, Double?, Double?, Long?, Long?, Long?, Long?, Long?, Long?, Long?, OffsetDateTime?, Boolean?, Long?>
|
||||
override fun field1(): Field<Long?> = Users.USERS.USER_ID
|
||||
override fun field2(): Field<String?> = Users.USERS.USERNAME
|
||||
override fun field3(): Field<LocalDateTime?> = Users.USERS.JOIN_DATE
|
||||
@ -121,6 +125,7 @@ open class UsersRecord private constructor() : UpdatableRecordImpl<UsersRecord>(
|
||||
override fun field15(): Field<Long?> = Users.USERS.COUNT_50
|
||||
override fun field16(): Field<OffsetDateTime?> = Users.USERS.SYS_LAST_UPDATE
|
||||
override fun field17(): Field<Boolean?> = Users.USERS.IS_ADMIN
|
||||
override fun field18(): Field<Long?> = Users.USERS.COUNT_MISS
|
||||
override fun component1(): Long? = userId
|
||||
override fun component2(): String? = username
|
||||
override fun component3(): LocalDateTime? = joinDate
|
||||
@ -138,6 +143,7 @@ open class UsersRecord private constructor() : UpdatableRecordImpl<UsersRecord>(
|
||||
override fun component15(): Long? = count_50
|
||||
override fun component16(): OffsetDateTime? = sysLastUpdate
|
||||
override fun component17(): Boolean? = isAdmin
|
||||
override fun component18(): Long? = countMiss
|
||||
override fun value1(): Long? = userId
|
||||
override fun value2(): String? = username
|
||||
override fun value3(): LocalDateTime? = joinDate
|
||||
@ -155,6 +161,7 @@ open class UsersRecord private constructor() : UpdatableRecordImpl<UsersRecord>(
|
||||
override fun value15(): Long? = count_50
|
||||
override fun value16(): OffsetDateTime? = sysLastUpdate
|
||||
override fun value17(): Boolean? = isAdmin
|
||||
override fun value18(): Long? = countMiss
|
||||
|
||||
override fun value1(value: Long?): UsersRecord {
|
||||
set(0, value)
|
||||
@ -241,7 +248,12 @@ open class UsersRecord private constructor() : UpdatableRecordImpl<UsersRecord>(
|
||||
return this
|
||||
}
|
||||
|
||||
override fun values(value1: Long?, value2: String?, value3: LocalDateTime?, value4: String?, value5: Long?, value6: Long?, value7: Double?, value8: Double?, value9: Long?, value10: Long?, value11: Long?, value12: Long?, value13: Long?, value14: Long?, value15: Long?, value16: OffsetDateTime?, value17: Boolean?): UsersRecord {
|
||||
override fun value18(value: Long?): UsersRecord {
|
||||
set(17, value)
|
||||
return this
|
||||
}
|
||||
|
||||
override fun values(value1: Long?, value2: String?, value3: LocalDateTime?, value4: String?, value5: Long?, value6: Long?, value7: Double?, value8: Double?, value9: Long?, value10: Long?, value11: Long?, value12: Long?, value13: Long?, value14: Long?, value15: Long?, value16: OffsetDateTime?, value17: Boolean?, value18: Long?): UsersRecord {
|
||||
this.value1(value1)
|
||||
this.value2(value2)
|
||||
this.value3(value3)
|
||||
@ -259,13 +271,14 @@ open class UsersRecord private constructor() : UpdatableRecordImpl<UsersRecord>(
|
||||
this.value15(value15)
|
||||
this.value16(value16)
|
||||
this.value17(value17)
|
||||
this.value18(value18)
|
||||
return this
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a detached, initialised UsersRecord
|
||||
*/
|
||||
constructor(userId: Long? = null, username: String? = null, joinDate: LocalDateTime? = null, country: String? = null, countryRank: Long? = null, rank: Long? = null, ppRaw: Double? = null, accuracy: Double? = null, playcount: Long? = null, totalScore: Long? = null, rankedScore: Long? = null, secondsPlayed: Long? = null, count_100: Long? = null, count_300: Long? = null, count_50: Long? = null, sysLastUpdate: OffsetDateTime? = null, isAdmin: Boolean? = null): this() {
|
||||
constructor(userId: Long? = null, username: String? = null, joinDate: LocalDateTime? = null, country: String? = null, countryRank: Long? = null, rank: Long? = null, ppRaw: Double? = null, accuracy: Double? = null, playcount: Long? = null, totalScore: Long? = null, rankedScore: Long? = null, secondsPlayed: Long? = null, count_100: Long? = null, count_300: Long? = null, count_50: Long? = null, sysLastUpdate: OffsetDateTime? = null, isAdmin: Boolean? = null, countMiss: Long? = null): this() {
|
||||
this.userId = userId
|
||||
this.username = username
|
||||
this.joinDate = joinDate
|
||||
@ -283,6 +296,7 @@ open class UsersRecord private constructor() : UpdatableRecordImpl<UsersRecord>(
|
||||
this.count_50 = count_50
|
||||
this.sysLastUpdate = sysLastUpdate
|
||||
this.isAdmin = isAdmin
|
||||
this.countMiss = countMiss
|
||||
resetChangedOnNotNull()
|
||||
}
|
||||
}
|
||||
|
||||
@ -120,6 +120,7 @@ class UserService(
|
||||
.set(USERS.COUNT_300, userStatistics?.count_300)
|
||||
.set(USERS.COUNT_100, userStatistics?.count_100)
|
||||
.set(USERS.COUNT_50, userStatistics?.count_50)
|
||||
.set(USERS.COUNT_MISS, userStatistics?.count_miss)
|
||||
.apply {
|
||||
if(apiUser.join_date != null) {
|
||||
set(USERS.JOIN_DATE, OffsetDateTime.parse(apiUser.join_date).toLocalDateTime())
|
||||
|
||||
@ -33,7 +33,7 @@ class SearchSchemaController(
|
||||
InternalSchemaField("user_count_300", "300s", Category.user, Type.number, false, "number of 300 hits", databaseField = USERS.COUNT_300),
|
||||
InternalSchemaField("user_count_100", "100s", Category.user, Type.number, false, "number of 100 hits", databaseField = USERS.COUNT_100),
|
||||
InternalSchemaField("user_count_50", "50s", Category.user, Type.number, false, "number of 50 hits", databaseField = USERS.COUNT_50),
|
||||
InternalSchemaField("user_count_miss", "Misses", Category.user, Type.number, false, "missed hits"), // TODO: Why no miss count?
|
||||
InternalSchemaField("user_count_miss", "Misses", Category.user, Type.number, false, "missed hits", databaseField = USERS.COUNT_MISS),
|
||||
|
||||
// Score fields
|
||||
InternalSchemaField("is_banned", "Banned", Category.score, Type.boolean, false, "has to score been deleted?", databaseField = SCORES.IS_BANNED),
|
||||
|
||||
@ -0,0 +1,2 @@
|
||||
ALTER TABLE public.users
|
||||
ADD COLUMN count_miss int8;
|
||||
Loading…
Reference in New Issue
Block a user