From f79acd1956d17b87d927d69d0af07d7e709578e5 Mon Sep 17 00:00:00 2001 From: "nise.moe" Date: Sat, 8 Jun 2024 14:28:11 +0200 Subject: [PATCH] Updating Spring/Kotlin versions, rebuilding JooQ --- .../com/nisemoe/konata/CompareReplayPair.kt | 2 +- nise-backend/Build.sh | 2 +- nise-backend/pom.xml | 8 +- .../com/nisemoe/generated/DefaultCatalog.kt | 6 +- .../com/nisemoe/generated/indexes/Indexes.kt | 3 + .../com/nisemoe/generated/tables/Beatmaps.kt | 93 +++++--- .../generated/tables/FlywaySchemaHistory.kt | 92 +++++--- .../nisemoe/generated/tables/OsuApiKeys.kt | 93 +++++--- .../nisemoe/generated/tables/RedditPost.kt | 92 +++++--- .../com/nisemoe/generated/tables/Scores.kt | 113 ++++++++- .../generated/tables/ScoresJudgements.kt | 117 +++++++--- .../generated/tables/ScoresSimilarity.kt | 92 +++++--- .../generated/tables/UpdateUserQueue.kt | 93 +++++--- .../nisemoe/generated/tables/UserFollows.kt | 126 ++++++++--- .../nisemoe/generated/tables/UserScores.kt | 83 ++++++- .../generated/tables/UserScoresSimilarity.kt | 92 +++++--- .../com/nisemoe/generated/tables/Users.kt | 146 ++++++++++-- .../tables/records/BeatmapsRecord.kt | 214 +----------------- .../records/FlywaySchemaHistoryRecord.kt | 106 +-------- .../tables/records/OsuApiKeysRecord.kt | 61 +---- .../tables/records/RedditPostRecord.kt | 61 +---- .../tables/records/ScoresJudgementsRecord.kt | 97 +------- .../tables/records/ScoresSimilarityRecord.kt | 106 +-------- .../tables/records/UpdateUserQueueRecord.kt | 97 +------- .../tables/records/UserFollowsRecord.kt | 33 +-- .../records/UserScoresSimilarityRecord.kt | 97 +------- .../generated/tables/records/UsersRecord.kt | 196 +--------------- .../nise/controller/BanlistController.kt | 2 +- nise-frontend/Build.sh | 2 +- 29 files changed, 965 insertions(+), 1360 deletions(-) diff --git a/konata/src/main/kotlin/com/nisemoe/konata/CompareReplayPair.kt b/konata/src/main/kotlin/com/nisemoe/konata/CompareReplayPair.kt index 00a0cd2..791c412 100644 --- a/konata/src/main/kotlin/com/nisemoe/konata/CompareReplayPair.kt +++ b/konata/src/main/kotlin/com/nisemoe/konata/CompareReplayPair.kt @@ -95,7 +95,7 @@ private fun linearInterpolate(replayA: Replay, replayB: Replay): F64Array { val lIndex = replayA.axis.lastIndex var maxLower = 0 - for (indexB in 0..= 0) index else -(index + 1) diff --git a/nise-backend/Build.sh b/nise-backend/Build.sh index a62e03a..78389e9 100755 --- a/nise-backend/Build.sh +++ b/nise-backend/Build.sh @@ -11,7 +11,7 @@ jabba use 21.0.2 # Variables for Docker image IMAGE_NAME="nise-backend" -IMAGE_REGISTRY="git.gengo.tech/nuff" +IMAGE_REGISTRY="git.nise.moe/nuff" IMAGE_VERSION="latest" # Clean up previous build artifacts diff --git a/nise-backend/pom.xml b/nise-backend/pom.xml index 072aeb5..31a2aa5 100644 --- a/nise-backend/pom.xml +++ b/nise-backend/pom.xml @@ -6,7 +6,7 @@ org.springframework.boot spring-boot-starter-parent - 3.2.3 + 3.3.0 @@ -19,7 +19,7 @@ 21 1.17.6 - 1.9.22 + 2.0.0 @@ -90,6 +90,10 @@ org.flywaydb flyway-core + + org.flywaydb + flyway-database-postgresql + org.springframework.boot spring-boot-starter-jooq diff --git a/nise-backend/src/main/kotlin/com/nisemoe/generated/DefaultCatalog.kt b/nise-backend/src/main/kotlin/com/nisemoe/generated/DefaultCatalog.kt index 6641e21..1e04cfa 100644 --- a/nise-backend/src/main/kotlin/com/nisemoe/generated/DefaultCatalog.kt +++ b/nise-backend/src/main/kotlin/com/nisemoe/generated/DefaultCatalog.kt @@ -34,10 +34,10 @@ open class DefaultCatalog : CatalogImpl("") { ) /** - * A reference to the 3.18 minor release of the code generator. If this + * A reference to the 3.19 minor release of the code generator. If this * doesn't compile, it's because the runtime library uses an older minor - * release, namely: 3.18. You can turn off the generation of this reference + * release, namely: 3.19. You can turn off the generation of this reference * by specifying /configuration/generator/generate/jooqVersionReference */ - private val REQUIRE_RUNTIME_JOOQ_VERSION = Constants.VERSION_3_18 + private val REQUIRE_RUNTIME_JOOQ_VERSION = Constants.VERSION_3_19 } diff --git a/nise-backend/src/main/kotlin/com/nisemoe/generated/indexes/Indexes.kt b/nise-backend/src/main/kotlin/com/nisemoe/generated/indexes/Indexes.kt index d0b8b8e..251361b 100644 --- a/nise-backend/src/main/kotlin/com/nisemoe/generated/indexes/Indexes.kt +++ b/nise-backend/src/main/kotlin/com/nisemoe/generated/indexes/Indexes.kt @@ -8,6 +8,7 @@ import com.nisemoe.generated.tables.FlywaySchemaHistory import com.nisemoe.generated.tables.Scores import com.nisemoe.generated.tables.ScoresJudgements import com.nisemoe.generated.tables.ScoresSimilarity +import com.nisemoe.generated.tables.Users import org.jooq.Index import org.jooq.impl.DSL @@ -29,3 +30,5 @@ val IDX_SCORES_JUDGEMENTS_SCORE_ID: Index = Internal.createIndex(DSL.name("idx_s val IDX_SCORES_REPLAY_ID: Index = Internal.createIndex(DSL.name("idx_scores_replay_id"), Scores.SCORES, arrayOf(Scores.SCORES.REPLAY_ID), false) val IDX_SCORES_UR: Index = Internal.createIndex(DSL.name("idx_scores_ur"), Scores.SCORES, arrayOf(Scores.SCORES.UR), false) val IDX_SCORES_USER_ID: Index = Internal.createIndex(DSL.name("idx_scores_user_id"), Scores.SCORES, arrayOf(Scores.SCORES.USER_ID), false) +val IDX_USERS_IS_BANNED_FALSE: Index = Internal.createIndex(DSL.name("idx_users_is_banned_false"), Users.USERS, arrayOf(Users.USERS.IS_BANNED), false) +val IDX_USERS_IS_BANNED_TRUE: Index = Internal.createIndex(DSL.name("idx_users_is_banned_true"), Users.USERS, arrayOf(Users.USERS.IS_BANNED), false) diff --git a/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/Beatmaps.kt b/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/Beatmaps.kt index a067553..ee354ff 100644 --- a/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/Beatmaps.kt +++ b/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/Beatmaps.kt @@ -9,22 +9,26 @@ import com.nisemoe.generated.keys.BEATMAPS_PKEY import com.nisemoe.generated.tables.records.BeatmapsRecord import java.time.OffsetDateTime -import java.util.function.Function +import kotlin.collections.Collection + +import org.jooq.Condition import org.jooq.Field import org.jooq.ForeignKey +import org.jooq.InverseForeignKey import org.jooq.Name +import org.jooq.PlainSQL +import org.jooq.QueryPart import org.jooq.Record -import org.jooq.Records -import org.jooq.Row22 +import org.jooq.SQL import org.jooq.Schema -import org.jooq.SelectField +import org.jooq.Select +import org.jooq.Stringly import org.jooq.Table import org.jooq.TableField import org.jooq.TableOptions import org.jooq.UniqueKey import org.jooq.impl.DSL -import org.jooq.impl.Internal import org.jooq.impl.SQLDataType import org.jooq.impl.TableImpl @@ -35,19 +39,23 @@ import org.jooq.impl.TableImpl @Suppress("UNCHECKED_CAST") open class Beatmaps( alias: Name, - child: Table?, - path: ForeignKey?, + path: Table?, + childPath: ForeignKey?, + parentPath: InverseForeignKey?, aliased: Table?, - parameters: Array?>? + parameters: Array?>?, + where: Condition? ): TableImpl( alias, Public.PUBLIC, - child, path, + childPath, + parentPath, aliased, parameters, DSL.comment(""), - TableOptions.table() + TableOptions.table(), + where, ) { companion object { @@ -172,8 +180,9 @@ open class Beatmaps( */ val MAX_COMBO: TableField = createField(DSL.name("max_combo"), SQLDataType.INTEGER, this, "") - private constructor(alias: Name, aliased: Table?): this(alias, null, null, aliased, null) - private constructor(alias: Name, aliased: Table?, parameters: Array?>?): this(alias, null, null, aliased, parameters) + private constructor(alias: Name, aliased: Table?): this(alias, null, null, null, aliased, null, null) + private constructor(alias: Name, aliased: Table?, parameters: Array?>?): this(alias, null, null, null, aliased, parameters, null) + private constructor(alias: Name, aliased: Table?, where: Condition?): this(alias, null, null, null, aliased, null, where) /** * Create an aliased public.beatmaps table reference @@ -189,13 +198,11 @@ open class Beatmaps( * Create a public.beatmaps table reference */ constructor(): this(DSL.name("beatmaps"), null) - - constructor(child: Table, key: ForeignKey): this(Internal.createPathAlias(child, key), child, key, BEATMAPS, null) override fun getSchema(): Schema? = if (aliased()) null else Public.PUBLIC override fun getPrimaryKey(): UniqueKey = BEATMAPS_PKEY override fun `as`(alias: String): Beatmaps = Beatmaps(DSL.name(alias), this) override fun `as`(alias: Name): Beatmaps = Beatmaps(alias, this) - override fun `as`(alias: Table<*>): Beatmaps = Beatmaps(alias.getQualifiedName(), this) + override fun `as`(alias: Table<*>): Beatmaps = Beatmaps(alias.qualifiedName, this) /** * Rename this table @@ -210,21 +217,55 @@ open class Beatmaps( /** * Rename this table */ - override fun rename(name: Table<*>): Beatmaps = Beatmaps(name.getQualifiedName(), null) - - // ------------------------------------------------------------------------- - // Row22 type methods - // ------------------------------------------------------------------------- - override fun fieldsRow(): Row22 = super.fieldsRow() as Row22 + override fun rename(name: Table<*>): Beatmaps = Beatmaps(name.qualifiedName, null) /** - * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + * Create an inline derived table from this table */ - fun mapping(from: (Int?, String?, Int?, String?, String?, Double?, String?, String?, OffsetDateTime?, String?, String?, String?, Int?, Double?, Double?, Double?, Double?, Double?, Int?, Int?, Int?, Int?) -> U): SelectField = convertFrom(Records.mapping(from)) + override fun where(condition: Condition?): Beatmaps = Beatmaps(qualifiedName, if (aliased()) this else null, condition) /** - * Convenience mapping calling {@link SelectField#convertFrom(Class, - * Function)}. + * Create an inline derived table from this table */ - fun mapping(toType: Class, from: (Int?, String?, Int?, String?, String?, Double?, String?, String?, OffsetDateTime?, String?, String?, String?, Int?, Double?, Double?, Double?, Double?, Double?, Int?, Int?, Int?, Int?) -> U): SelectField = convertFrom(toType, Records.mapping(from)) + override fun where(conditions: Collection): Beatmaps = where(DSL.and(conditions)) + + /** + * Create an inline derived table from this table + */ + override fun where(vararg conditions: Condition?): Beatmaps = where(DSL.and(*conditions)) + + /** + * Create an inline derived table from this table + */ + override fun where(condition: Field?): Beatmaps = where(DSL.condition(condition)) + + /** + * Create an inline derived table from this table + */ + @PlainSQL override fun where(condition: SQL): Beatmaps = where(DSL.condition(condition)) + + /** + * Create an inline derived table from this table + */ + @PlainSQL override fun where(@Stringly.SQL condition: String): Beatmaps = where(DSL.condition(condition)) + + /** + * Create an inline derived table from this table + */ + @PlainSQL override fun where(@Stringly.SQL condition: String, vararg binds: Any?): Beatmaps = where(DSL.condition(condition, *binds)) + + /** + * Create an inline derived table from this table + */ + @PlainSQL override fun where(@Stringly.SQL condition: String, vararg parts: QueryPart): Beatmaps = where(DSL.condition(condition, *parts)) + + /** + * Create an inline derived table from this table + */ + override fun whereExists(select: Select<*>): Beatmaps = where(DSL.exists(select)) + + /** + * Create an inline derived table from this table + */ + override fun whereNotExists(select: Select<*>): Beatmaps = where(DSL.notExists(select)) } diff --git a/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/FlywaySchemaHistory.kt b/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/FlywaySchemaHistory.kt index 48b35ca..4c15370 100644 --- a/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/FlywaySchemaHistory.kt +++ b/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/FlywaySchemaHistory.kt @@ -10,25 +10,28 @@ import com.nisemoe.generated.keys.FLYWAY_SCHEMA_HISTORY_PK import com.nisemoe.generated.tables.records.FlywaySchemaHistoryRecord import java.time.LocalDateTime -import java.util.function.Function +import kotlin.collections.Collection import kotlin.collections.List +import org.jooq.Condition import org.jooq.Field import org.jooq.ForeignKey import org.jooq.Index +import org.jooq.InverseForeignKey import org.jooq.Name +import org.jooq.PlainSQL +import org.jooq.QueryPart import org.jooq.Record -import org.jooq.Records -import org.jooq.Row10 +import org.jooq.SQL import org.jooq.Schema -import org.jooq.SelectField +import org.jooq.Select +import org.jooq.Stringly import org.jooq.Table import org.jooq.TableField import org.jooq.TableOptions import org.jooq.UniqueKey import org.jooq.impl.DSL -import org.jooq.impl.Internal import org.jooq.impl.SQLDataType import org.jooq.impl.TableImpl @@ -39,19 +42,23 @@ import org.jooq.impl.TableImpl @Suppress("UNCHECKED_CAST") open class FlywaySchemaHistory( alias: Name, - child: Table?, - path: ForeignKey?, + path: Table?, + childPath: ForeignKey?, + parentPath: InverseForeignKey?, aliased: Table?, - parameters: Array?>? + parameters: Array?>?, + where: Condition? ): TableImpl( alias, Public.PUBLIC, - child, path, + childPath, + parentPath, aliased, parameters, DSL.comment(""), - TableOptions.table() + TableOptions.table(), + where, ) { companion object { @@ -116,8 +123,9 @@ open class FlywaySchemaHistory( */ val SUCCESS: TableField = createField(DSL.name("success"), SQLDataType.BOOLEAN.nullable(false), this, "") - private constructor(alias: Name, aliased: Table?): this(alias, null, null, aliased, null) - private constructor(alias: Name, aliased: Table?, parameters: Array?>?): this(alias, null, null, aliased, parameters) + private constructor(alias: Name, aliased: Table?): this(alias, null, null, null, aliased, null, null) + private constructor(alias: Name, aliased: Table?, parameters: Array?>?): this(alias, null, null, null, aliased, parameters, null) + private constructor(alias: Name, aliased: Table?, where: Condition?): this(alias, null, null, null, aliased, null, where) /** * Create an aliased public.flyway_schema_history table @@ -135,14 +143,12 @@ open class FlywaySchemaHistory( * Create a public.flyway_schema_history table reference */ constructor(): this(DSL.name("flyway_schema_history"), null) - - constructor(child: Table, key: ForeignKey): this(Internal.createPathAlias(child, key), child, key, FLYWAY_SCHEMA_HISTORY, null) override fun getSchema(): Schema? = if (aliased()) null else Public.PUBLIC override fun getIndexes(): List = listOf(FLYWAY_SCHEMA_HISTORY_S_IDX) override fun getPrimaryKey(): UniqueKey = FLYWAY_SCHEMA_HISTORY_PK override fun `as`(alias: String): FlywaySchemaHistory = FlywaySchemaHistory(DSL.name(alias), this) override fun `as`(alias: Name): FlywaySchemaHistory = FlywaySchemaHistory(alias, this) - override fun `as`(alias: Table<*>): FlywaySchemaHistory = FlywaySchemaHistory(alias.getQualifiedName(), this) + override fun `as`(alias: Table<*>): FlywaySchemaHistory = FlywaySchemaHistory(alias.qualifiedName, this) /** * Rename this table @@ -157,21 +163,55 @@ open class FlywaySchemaHistory( /** * Rename this table */ - override fun rename(name: Table<*>): FlywaySchemaHistory = FlywaySchemaHistory(name.getQualifiedName(), null) - - // ------------------------------------------------------------------------- - // Row10 type methods - // ------------------------------------------------------------------------- - override fun fieldsRow(): Row10 = super.fieldsRow() as Row10 + override fun rename(name: Table<*>): FlywaySchemaHistory = FlywaySchemaHistory(name.qualifiedName, null) /** - * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + * Create an inline derived table from this table */ - fun mapping(from: (Int?, String?, String?, String?, String?, Int?, String?, LocalDateTime?, Int?, Boolean?) -> U): SelectField = convertFrom(Records.mapping(from)) + override fun where(condition: Condition?): FlywaySchemaHistory = FlywaySchemaHistory(qualifiedName, if (aliased()) this else null, condition) /** - * Convenience mapping calling {@link SelectField#convertFrom(Class, - * Function)}. + * Create an inline derived table from this table */ - fun mapping(toType: Class, from: (Int?, String?, String?, String?, String?, Int?, String?, LocalDateTime?, Int?, Boolean?) -> U): SelectField = convertFrom(toType, Records.mapping(from)) + override fun where(conditions: Collection): FlywaySchemaHistory = where(DSL.and(conditions)) + + /** + * Create an inline derived table from this table + */ + override fun where(vararg conditions: Condition?): FlywaySchemaHistory = where(DSL.and(*conditions)) + + /** + * Create an inline derived table from this table + */ + override fun where(condition: Field?): FlywaySchemaHistory = where(DSL.condition(condition)) + + /** + * Create an inline derived table from this table + */ + @PlainSQL override fun where(condition: SQL): FlywaySchemaHistory = where(DSL.condition(condition)) + + /** + * Create an inline derived table from this table + */ + @PlainSQL override fun where(@Stringly.SQL condition: String): FlywaySchemaHistory = where(DSL.condition(condition)) + + /** + * Create an inline derived table from this table + */ + @PlainSQL override fun where(@Stringly.SQL condition: String, vararg binds: Any?): FlywaySchemaHistory = where(DSL.condition(condition, *binds)) + + /** + * Create an inline derived table from this table + */ + @PlainSQL override fun where(@Stringly.SQL condition: String, vararg parts: QueryPart): FlywaySchemaHistory = where(DSL.condition(condition, *parts)) + + /** + * Create an inline derived table from this table + */ + override fun whereExists(select: Select<*>): FlywaySchemaHistory = where(DSL.exists(select)) + + /** + * Create an inline derived table from this table + */ + override fun whereNotExists(select: Select<*>): FlywaySchemaHistory = where(DSL.notExists(select)) } diff --git a/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/OsuApiKeys.kt b/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/OsuApiKeys.kt index 444bca0..7278fb8 100644 --- a/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/OsuApiKeys.kt +++ b/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/OsuApiKeys.kt @@ -9,23 +9,27 @@ import com.nisemoe.generated.keys.OSU_API_KEYS_PKEY import com.nisemoe.generated.tables.records.OsuApiKeysRecord import java.time.OffsetDateTime -import java.util.function.Function +import kotlin.collections.Collection + +import org.jooq.Condition import org.jooq.Field import org.jooq.ForeignKey import org.jooq.Identity +import org.jooq.InverseForeignKey import org.jooq.Name +import org.jooq.PlainSQL +import org.jooq.QueryPart import org.jooq.Record -import org.jooq.Records -import org.jooq.Row5 +import org.jooq.SQL import org.jooq.Schema -import org.jooq.SelectField +import org.jooq.Select +import org.jooq.Stringly import org.jooq.Table import org.jooq.TableField import org.jooq.TableOptions import org.jooq.UniqueKey import org.jooq.impl.DSL -import org.jooq.impl.Internal import org.jooq.impl.SQLDataType import org.jooq.impl.TableImpl @@ -36,19 +40,23 @@ import org.jooq.impl.TableImpl @Suppress("UNCHECKED_CAST") open class OsuApiKeys( alias: Name, - child: Table?, - path: ForeignKey?, + path: Table?, + childPath: ForeignKey?, + parentPath: InverseForeignKey?, aliased: Table?, - parameters: Array?>? + parameters: Array?>?, + where: Condition? ): TableImpl( alias, Public.PUBLIC, - child, path, + childPath, + parentPath, aliased, parameters, DSL.comment(""), - TableOptions.table() + TableOptions.table(), + where, ) { companion object { @@ -88,8 +96,9 @@ open class OsuApiKeys( */ val IS_ACTIVE: TableField = createField(DSL.name("is_active"), SQLDataType.BOOLEAN.nullable(false).defaultValue(DSL.field(DSL.raw("true"), SQLDataType.BOOLEAN)), this, "") - private constructor(alias: Name, aliased: Table?): this(alias, null, null, aliased, null) - private constructor(alias: Name, aliased: Table?, parameters: Array?>?): this(alias, null, null, aliased, parameters) + private constructor(alias: Name, aliased: Table?): this(alias, null, null, null, aliased, null, null) + private constructor(alias: Name, aliased: Table?, parameters: Array?>?): this(alias, null, null, null, aliased, parameters, null) + private constructor(alias: Name, aliased: Table?, where: Condition?): this(alias, null, null, null, aliased, null, where) /** * Create an aliased public.osu_api_keys table reference @@ -105,14 +114,12 @@ open class OsuApiKeys( * Create a public.osu_api_keys table reference */ constructor(): this(DSL.name("osu_api_keys"), null) - - constructor(child: Table, key: ForeignKey): this(Internal.createPathAlias(child, key), child, key, OSU_API_KEYS, null) override fun getSchema(): Schema? = if (aliased()) null else Public.PUBLIC override fun getIdentity(): Identity = super.getIdentity() as Identity override fun getPrimaryKey(): UniqueKey = OSU_API_KEYS_PKEY override fun `as`(alias: String): OsuApiKeys = OsuApiKeys(DSL.name(alias), this) override fun `as`(alias: Name): OsuApiKeys = OsuApiKeys(alias, this) - override fun `as`(alias: Table<*>): OsuApiKeys = OsuApiKeys(alias.getQualifiedName(), this) + override fun `as`(alias: Table<*>): OsuApiKeys = OsuApiKeys(alias.qualifiedName, this) /** * Rename this table @@ -127,21 +134,55 @@ open class OsuApiKeys( /** * Rename this table */ - override fun rename(name: Table<*>): OsuApiKeys = OsuApiKeys(name.getQualifiedName(), null) - - // ------------------------------------------------------------------------- - // Row5 type methods - // ------------------------------------------------------------------------- - override fun fieldsRow(): Row5 = super.fieldsRow() as Row5 + override fun rename(name: Table<*>): OsuApiKeys = OsuApiKeys(name.qualifiedName, null) /** - * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + * Create an inline derived table from this table */ - fun mapping(from: (Int?, String?, OffsetDateTime?, Boolean?, Boolean?) -> U): SelectField = convertFrom(Records.mapping(from)) + override fun where(condition: Condition?): OsuApiKeys = OsuApiKeys(qualifiedName, if (aliased()) this else null, condition) /** - * Convenience mapping calling {@link SelectField#convertFrom(Class, - * Function)}. + * Create an inline derived table from this table */ - fun mapping(toType: Class, from: (Int?, String?, OffsetDateTime?, Boolean?, Boolean?) -> U): SelectField = convertFrom(toType, Records.mapping(from)) + override fun where(conditions: Collection): OsuApiKeys = where(DSL.and(conditions)) + + /** + * Create an inline derived table from this table + */ + override fun where(vararg conditions: Condition?): OsuApiKeys = where(DSL.and(*conditions)) + + /** + * Create an inline derived table from this table + */ + override fun where(condition: Field?): OsuApiKeys = where(DSL.condition(condition)) + + /** + * Create an inline derived table from this table + */ + @PlainSQL override fun where(condition: SQL): OsuApiKeys = where(DSL.condition(condition)) + + /** + * Create an inline derived table from this table + */ + @PlainSQL override fun where(@Stringly.SQL condition: String): OsuApiKeys = where(DSL.condition(condition)) + + /** + * Create an inline derived table from this table + */ + @PlainSQL override fun where(@Stringly.SQL condition: String, vararg binds: Any?): OsuApiKeys = where(DSL.condition(condition, *binds)) + + /** + * Create an inline derived table from this table + */ + @PlainSQL override fun where(@Stringly.SQL condition: String, vararg parts: QueryPart): OsuApiKeys = where(DSL.condition(condition, *parts)) + + /** + * Create an inline derived table from this table + */ + override fun whereExists(select: Select<*>): OsuApiKeys = where(DSL.exists(select)) + + /** + * Create an inline derived table from this table + */ + override fun whereNotExists(select: Select<*>): OsuApiKeys = where(DSL.notExists(select)) } diff --git a/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/RedditPost.kt b/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/RedditPost.kt index fc6a4b8..f8036af 100644 --- a/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/RedditPost.kt +++ b/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/RedditPost.kt @@ -8,22 +8,25 @@ import com.nisemoe.generated.Public import com.nisemoe.generated.keys.REDDIT_POST_PKEY import com.nisemoe.generated.tables.records.RedditPostRecord -import java.util.function.Function +import kotlin.collections.Collection +import org.jooq.Condition import org.jooq.Field import org.jooq.ForeignKey +import org.jooq.InverseForeignKey import org.jooq.Name +import org.jooq.PlainSQL +import org.jooq.QueryPart import org.jooq.Record -import org.jooq.Records -import org.jooq.Row5 +import org.jooq.SQL import org.jooq.Schema -import org.jooq.SelectField +import org.jooq.Select +import org.jooq.Stringly import org.jooq.Table import org.jooq.TableField import org.jooq.TableOptions import org.jooq.UniqueKey import org.jooq.impl.DSL -import org.jooq.impl.Internal import org.jooq.impl.SQLDataType import org.jooq.impl.TableImpl @@ -34,19 +37,23 @@ import org.jooq.impl.TableImpl @Suppress("UNCHECKED_CAST") open class RedditPost( alias: Name, - child: Table?, - path: ForeignKey?, + path: Table?, + childPath: ForeignKey?, + parentPath: InverseForeignKey?, aliased: Table?, - parameters: Array?>? + parameters: Array?>?, + where: Condition? ): TableImpl( alias, Public.PUBLIC, - child, path, + childPath, + parentPath, aliased, parameters, DSL.comment(""), - TableOptions.table() + TableOptions.table(), + where, ) { companion object { @@ -86,8 +93,9 @@ open class RedditPost( */ val IS_CHECKED: TableField = createField(DSL.name("is_checked"), SQLDataType.BOOLEAN.defaultValue(DSL.field(DSL.raw("false"), SQLDataType.BOOLEAN)), this, "") - private constructor(alias: Name, aliased: Table?): this(alias, null, null, aliased, null) - private constructor(alias: Name, aliased: Table?, parameters: Array?>?): this(alias, null, null, aliased, parameters) + private constructor(alias: Name, aliased: Table?): this(alias, null, null, null, aliased, null, null) + private constructor(alias: Name, aliased: Table?, parameters: Array?>?): this(alias, null, null, null, aliased, parameters, null) + private constructor(alias: Name, aliased: Table?, where: Condition?): this(alias, null, null, null, aliased, null, where) /** * Create an aliased public.reddit_post table reference @@ -103,13 +111,11 @@ open class RedditPost( * Create a public.reddit_post table reference */ constructor(): this(DSL.name("reddit_post"), null) - - constructor(child: Table, key: ForeignKey): this(Internal.createPathAlias(child, key), child, key, REDDIT_POST, null) override fun getSchema(): Schema? = if (aliased()) null else Public.PUBLIC override fun getPrimaryKey(): UniqueKey = REDDIT_POST_PKEY override fun `as`(alias: String): RedditPost = RedditPost(DSL.name(alias), this) override fun `as`(alias: Name): RedditPost = RedditPost(alias, this) - override fun `as`(alias: Table<*>): RedditPost = RedditPost(alias.getQualifiedName(), this) + override fun `as`(alias: Table<*>): RedditPost = RedditPost(alias.qualifiedName, this) /** * Rename this table @@ -124,21 +130,55 @@ open class RedditPost( /** * Rename this table */ - override fun rename(name: Table<*>): RedditPost = RedditPost(name.getQualifiedName(), null) - - // ------------------------------------------------------------------------- - // Row5 type methods - // ------------------------------------------------------------------------- - override fun fieldsRow(): Row5 = super.fieldsRow() as Row5 + override fun rename(name: Table<*>): RedditPost = RedditPost(name.qualifiedName, null) /** - * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + * Create an inline derived table from this table */ - fun mapping(from: (String?, String?, Double?, String?, Boolean?) -> U): SelectField = convertFrom(Records.mapping(from)) + override fun where(condition: Condition?): RedditPost = RedditPost(qualifiedName, if (aliased()) this else null, condition) /** - * Convenience mapping calling {@link SelectField#convertFrom(Class, - * Function)}. + * Create an inline derived table from this table */ - fun mapping(toType: Class, from: (String?, String?, Double?, String?, Boolean?) -> U): SelectField = convertFrom(toType, Records.mapping(from)) + override fun where(conditions: Collection): RedditPost = where(DSL.and(conditions)) + + /** + * Create an inline derived table from this table + */ + override fun where(vararg conditions: Condition?): RedditPost = where(DSL.and(*conditions)) + + /** + * Create an inline derived table from this table + */ + override fun where(condition: Field?): RedditPost = where(DSL.condition(condition)) + + /** + * Create an inline derived table from this table + */ + @PlainSQL override fun where(condition: SQL): RedditPost = where(DSL.condition(condition)) + + /** + * Create an inline derived table from this table + */ + @PlainSQL override fun where(@Stringly.SQL condition: String): RedditPost = where(DSL.condition(condition)) + + /** + * Create an inline derived table from this table + */ + @PlainSQL override fun where(@Stringly.SQL condition: String, vararg binds: Any?): RedditPost = where(DSL.condition(condition, *binds)) + + /** + * Create an inline derived table from this table + */ + @PlainSQL override fun where(@Stringly.SQL condition: String, vararg parts: QueryPart): RedditPost = where(DSL.condition(condition, *parts)) + + /** + * Create an inline derived table from this table + */ + override fun whereExists(select: Select<*>): RedditPost = where(DSL.exists(select)) + + /** + * Create an inline derived table from this table + */ + override fun whereNotExists(select: Select<*>): RedditPost = where(DSL.notExists(select)) } diff --git a/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/Scores.kt b/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/Scores.kt index 25b80ba..ee82dfe 100644 --- a/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/Scores.kt +++ b/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/Scores.kt @@ -12,20 +12,31 @@ import com.nisemoe.generated.indexes.IDX_SCORES_REPLAY_ID import com.nisemoe.generated.indexes.IDX_SCORES_UR import com.nisemoe.generated.indexes.IDX_SCORES_USER_ID import com.nisemoe.generated.keys.REPLAY_ID_UNIQUE +import com.nisemoe.generated.keys.SCORES_JUDGEMENTS__SCORES_JUDGEMENTS_SCORE_ID_FKEY import com.nisemoe.generated.keys.SCORES_PKEY +import com.nisemoe.generated.tables.ScoresJudgements.ScoresJudgementsPath import com.nisemoe.generated.tables.records.ScoresRecord import java.time.LocalDateTime import java.time.OffsetDateTime +import kotlin.collections.Collection import kotlin.collections.List +import org.jooq.Condition import org.jooq.Field import org.jooq.ForeignKey import org.jooq.Index +import org.jooq.InverseForeignKey import org.jooq.Name +import org.jooq.Path +import org.jooq.PlainSQL +import org.jooq.QueryPart import org.jooq.Record +import org.jooq.SQL import org.jooq.Schema +import org.jooq.Select +import org.jooq.Stringly import org.jooq.Table import org.jooq.TableField import org.jooq.TableOptions @@ -42,19 +53,23 @@ import org.jooq.impl.TableImpl @Suppress("UNCHECKED_CAST") open class Scores( alias: Name, - child: Table?, - path: ForeignKey?, + path: Table?, + childPath: ForeignKey?, + parentPath: InverseForeignKey?, aliased: Table?, - parameters: Array?>? + parameters: Array?>?, + where: Condition? ): TableImpl( alias, Public.PUBLIC, - child, path, + childPath, + parentPath, aliased, parameters, DSL.comment(""), - TableOptions.table() + TableOptions.table(), + where, ) { companion object { @@ -302,8 +317,9 @@ open class Scores( */ val JUDGEMENTS: TableField = createField(DSL.name("judgements"), SQLDataType.BLOB, this, "") - private constructor(alias: Name, aliased: Table?): this(alias, null, null, aliased, null) - private constructor(alias: Name, aliased: Table?, parameters: Array?>?): this(alias, null, null, aliased, parameters) + private constructor(alias: Name, aliased: Table?): this(alias, null, null, null, aliased, null, null) + private constructor(alias: Name, aliased: Table?, parameters: Array?>?): this(alias, null, null, null, aliased, parameters, null) + private constructor(alias: Name, aliased: Table?, where: Condition?): this(alias, null, null, null, aliased, null, where) /** * Create an aliased public.scores table reference @@ -320,14 +336,41 @@ open class Scores( */ constructor(): this(DSL.name("scores"), null) - constructor(child: Table, key: ForeignKey): this(Internal.createPathAlias(child, key), child, key, SCORES, null) + constructor(path: Table, childPath: ForeignKey?, parentPath: InverseForeignKey?): this(Internal.createPathAlias(path, childPath, parentPath), path, childPath, parentPath, SCORES, null, null) + + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ + open class ScoresPath : Scores, Path { + constructor(path: Table, childPath: ForeignKey?, parentPath: InverseForeignKey?): super(path, childPath, parentPath) + private constructor(alias: Name, aliased: Table): super(alias, aliased) + override fun `as`(alias: String): ScoresPath = ScoresPath(DSL.name(alias), this) + override fun `as`(alias: Name): ScoresPath = ScoresPath(alias, this) + override fun `as`(alias: Table<*>): ScoresPath = ScoresPath(alias.qualifiedName, this) + } override fun getSchema(): Schema? = if (aliased()) null else Public.PUBLIC override fun getIndexes(): List = listOf(IDX_SCORES_BEATMAP_ID, IDX_SCORES_BEATMAP_ID_REPLAY_ID, IDX_SCORES_BEATMAP_ID_REPLAY_ID_UR, IDX_SCORES_REPLAY_ID, IDX_SCORES_UR, IDX_SCORES_USER_ID) override fun getPrimaryKey(): UniqueKey = SCORES_PKEY override fun getUniqueKeys(): List> = listOf(REPLAY_ID_UNIQUE) + + private lateinit var _scoresJudgements: ScoresJudgementsPath + + /** + * Get the implicit to-many join path to the + * public.scores_judgements table + */ + fun scoresJudgements(): ScoresJudgementsPath { + if (!this::_scoresJudgements.isInitialized) + _scoresJudgements = ScoresJudgementsPath(this, null, SCORES_JUDGEMENTS__SCORES_JUDGEMENTS_SCORE_ID_FKEY.inverseKey) + + return _scoresJudgements; + } + + val scoresJudgements: ScoresJudgementsPath + get(): ScoresJudgementsPath = scoresJudgements() override fun `as`(alias: String): Scores = Scores(DSL.name(alias), this) override fun `as`(alias: Name): Scores = Scores(alias, this) - override fun `as`(alias: Table<*>): Scores = Scores(alias.getQualifiedName(), this) + override fun `as`(alias: Table<*>): Scores = Scores(alias.qualifiedName, this) /** * Rename this table @@ -342,5 +385,55 @@ open class Scores( /** * Rename this table */ - override fun rename(name: Table<*>): Scores = Scores(name.getQualifiedName(), null) + override fun rename(name: Table<*>): Scores = Scores(name.qualifiedName, null) + + /** + * Create an inline derived table from this table + */ + override fun where(condition: Condition?): Scores = Scores(qualifiedName, if (aliased()) this else null, condition) + + /** + * Create an inline derived table from this table + */ + override fun where(conditions: Collection): Scores = where(DSL.and(conditions)) + + /** + * Create an inline derived table from this table + */ + override fun where(vararg conditions: Condition?): Scores = where(DSL.and(*conditions)) + + /** + * Create an inline derived table from this table + */ + override fun where(condition: Field?): Scores = where(DSL.condition(condition)) + + /** + * Create an inline derived table from this table + */ + @PlainSQL override fun where(condition: SQL): Scores = where(DSL.condition(condition)) + + /** + * Create an inline derived table from this table + */ + @PlainSQL override fun where(@Stringly.SQL condition: String): Scores = where(DSL.condition(condition)) + + /** + * Create an inline derived table from this table + */ + @PlainSQL override fun where(@Stringly.SQL condition: String, vararg binds: Any?): Scores = where(DSL.condition(condition, *binds)) + + /** + * Create an inline derived table from this table + */ + @PlainSQL override fun where(@Stringly.SQL condition: String, vararg parts: QueryPart): Scores = where(DSL.condition(condition, *parts)) + + /** + * Create an inline derived table from this table + */ + override fun whereExists(select: Select<*>): Scores = where(DSL.exists(select)) + + /** + * Create an inline derived table from this table + */ + override fun whereNotExists(select: Select<*>): Scores = where(DSL.notExists(select)) } diff --git a/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/ScoresJudgements.kt b/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/ScoresJudgements.kt index ed68834..bb79200 100644 --- a/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/ScoresJudgements.kt +++ b/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/ScoresJudgements.kt @@ -9,21 +9,26 @@ import com.nisemoe.generated.enums.JudgementType import com.nisemoe.generated.indexes.IDX_SCORES_JUDGEMENTS_SCORE_ID import com.nisemoe.generated.keys.SCORES_JUDGEMENTS_PKEY import com.nisemoe.generated.keys.SCORES_JUDGEMENTS__SCORES_JUDGEMENTS_SCORE_ID_FKEY +import com.nisemoe.generated.tables.Scores.ScoresPath import com.nisemoe.generated.tables.records.ScoresJudgementsRecord -import java.util.function.Function - +import kotlin.collections.Collection import kotlin.collections.List +import org.jooq.Condition import org.jooq.Field import org.jooq.ForeignKey import org.jooq.Index +import org.jooq.InverseForeignKey import org.jooq.Name +import org.jooq.Path +import org.jooq.PlainSQL +import org.jooq.QueryPart import org.jooq.Record -import org.jooq.Records -import org.jooq.Row9 +import org.jooq.SQL import org.jooq.Schema -import org.jooq.SelectField +import org.jooq.Select +import org.jooq.Stringly import org.jooq.Table import org.jooq.TableField import org.jooq.TableOptions @@ -40,19 +45,23 @@ import org.jooq.impl.TableImpl @Suppress("UNCHECKED_CAST") open class ScoresJudgements( alias: Name, - child: Table?, - path: ForeignKey?, + path: Table?, + childPath: ForeignKey?, + parentPath: InverseForeignKey?, aliased: Table?, - parameters: Array?>? + parameters: Array?>?, + where: Condition? ): TableImpl( alias, Public.PUBLIC, - child, path, + childPath, + parentPath, aliased, parameters, DSL.comment(""), - TableOptions.table() + TableOptions.table(), + where, ) { companion object { @@ -90,7 +99,7 @@ open class ScoresJudgements( /** * The column public.scores_judgements.type. */ - val TYPE: TableField = createField(DSL.name("type"), SQLDataType.VARCHAR.asEnumDataType(com.nisemoe.generated.enums.JudgementType::class.java), this, "") + val TYPE: TableField = createField(DSL.name("type"), SQLDataType.VARCHAR.asEnumDataType(JudgementType::class.java), this, "") /** * The column public.scores_judgements.distance_center. @@ -112,8 +121,9 @@ open class ScoresJudgements( */ val SCORE_ID: TableField = createField(DSL.name("score_id"), SQLDataType.INTEGER, this, "") - private constructor(alias: Name, aliased: Table?): this(alias, null, null, aliased, null) - private constructor(alias: Name, aliased: Table?, parameters: Array?>?): this(alias, null, null, aliased, parameters) + private constructor(alias: Name, aliased: Table?): this(alias, null, null, null, aliased, null, null) + private constructor(alias: Name, aliased: Table?, parameters: Array?>?): this(alias, null, null, null, aliased, parameters, null) + private constructor(alias: Name, aliased: Table?, where: Condition?): this(alias, null, null, null, aliased, null, where) /** * Create an aliased public.scores_judgements table reference @@ -130,29 +140,40 @@ open class ScoresJudgements( */ constructor(): this(DSL.name("scores_judgements"), null) - constructor(child: Table, key: ForeignKey): this(Internal.createPathAlias(child, key), child, key, SCORES_JUDGEMENTS, null) + constructor(path: Table, childPath: ForeignKey?, parentPath: InverseForeignKey?): this(Internal.createPathAlias(path, childPath, parentPath), path, childPath, parentPath, SCORES_JUDGEMENTS, null, null) + + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ + open class ScoresJudgementsPath : ScoresJudgements, Path { + constructor(path: Table, childPath: ForeignKey?, parentPath: InverseForeignKey?): super(path, childPath, parentPath) + private constructor(alias: Name, aliased: Table): super(alias, aliased) + override fun `as`(alias: String): ScoresJudgementsPath = ScoresJudgementsPath(DSL.name(alias), this) + override fun `as`(alias: Name): ScoresJudgementsPath = ScoresJudgementsPath(alias, this) + override fun `as`(alias: Table<*>): ScoresJudgementsPath = ScoresJudgementsPath(alias.qualifiedName, this) + } override fun getSchema(): Schema? = if (aliased()) null else Public.PUBLIC override fun getIndexes(): List = listOf(IDX_SCORES_JUDGEMENTS_SCORE_ID) override fun getPrimaryKey(): UniqueKey = SCORES_JUDGEMENTS_PKEY override fun getReferences(): List> = listOf(SCORES_JUDGEMENTS__SCORES_JUDGEMENTS_SCORE_ID_FKEY) - private lateinit var _scores: Scores + private lateinit var _scores: ScoresPath /** * Get the implicit join path to the public.scores table. */ - fun scores(): Scores { + fun scores(): ScoresPath { if (!this::_scores.isInitialized) - _scores = Scores(this, SCORES_JUDGEMENTS__SCORES_JUDGEMENTS_SCORE_ID_FKEY) + _scores = ScoresPath(this, SCORES_JUDGEMENTS__SCORES_JUDGEMENTS_SCORE_ID_FKEY, null) return _scores; } - val scores: Scores - get(): Scores = scores() + val scores: ScoresPath + get(): ScoresPath = scores() override fun `as`(alias: String): ScoresJudgements = ScoresJudgements(DSL.name(alias), this) override fun `as`(alias: Name): ScoresJudgements = ScoresJudgements(alias, this) - override fun `as`(alias: Table<*>): ScoresJudgements = ScoresJudgements(alias.getQualifiedName(), this) + override fun `as`(alias: Table<*>): ScoresJudgements = ScoresJudgements(alias.qualifiedName, this) /** * Rename this table @@ -167,21 +188,55 @@ open class ScoresJudgements( /** * Rename this table */ - override fun rename(name: Table<*>): ScoresJudgements = ScoresJudgements(name.getQualifiedName(), null) - - // ------------------------------------------------------------------------- - // Row9 type methods - // ------------------------------------------------------------------------- - override fun fieldsRow(): Row9 = super.fieldsRow() as Row9 + override fun rename(name: Table<*>): ScoresJudgements = ScoresJudgements(name.qualifiedName, null) /** - * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + * Create an inline derived table from this table */ - fun mapping(from: (Int?, Double?, Double?, Double?, JudgementType?, Double?, Double?, Double?, Int?) -> U): SelectField = convertFrom(Records.mapping(from)) + override fun where(condition: Condition?): ScoresJudgements = ScoresJudgements(qualifiedName, if (aliased()) this else null, condition) /** - * Convenience mapping calling {@link SelectField#convertFrom(Class, - * Function)}. + * Create an inline derived table from this table */ - fun mapping(toType: Class, from: (Int?, Double?, Double?, Double?, JudgementType?, Double?, Double?, Double?, Int?) -> U): SelectField = convertFrom(toType, Records.mapping(from)) + override fun where(conditions: Collection): ScoresJudgements = where(DSL.and(conditions)) + + /** + * Create an inline derived table from this table + */ + override fun where(vararg conditions: Condition?): ScoresJudgements = where(DSL.and(*conditions)) + + /** + * Create an inline derived table from this table + */ + override fun where(condition: Field?): ScoresJudgements = where(DSL.condition(condition)) + + /** + * Create an inline derived table from this table + */ + @PlainSQL override fun where(condition: SQL): ScoresJudgements = where(DSL.condition(condition)) + + /** + * Create an inline derived table from this table + */ + @PlainSQL override fun where(@Stringly.SQL condition: String): ScoresJudgements = where(DSL.condition(condition)) + + /** + * Create an inline derived table from this table + */ + @PlainSQL override fun where(@Stringly.SQL condition: String, vararg binds: Any?): ScoresJudgements = where(DSL.condition(condition, *binds)) + + /** + * Create an inline derived table from this table + */ + @PlainSQL override fun where(@Stringly.SQL condition: String, vararg parts: QueryPart): ScoresJudgements = where(DSL.condition(condition, *parts)) + + /** + * Create an inline derived table from this table + */ + override fun whereExists(select: Select<*>): ScoresJudgements = where(DSL.exists(select)) + + /** + * Create an inline derived table from this table + */ + override fun whereNotExists(select: Select<*>): ScoresJudgements = where(DSL.notExists(select)) } diff --git a/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/ScoresSimilarity.kt b/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/ScoresSimilarity.kt index e235af2..6e18118 100644 --- a/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/ScoresSimilarity.kt +++ b/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/ScoresSimilarity.kt @@ -12,25 +12,28 @@ import com.nisemoe.generated.keys.UNIQUE_BEATMAP_REPLAY_IDS import com.nisemoe.generated.tables.records.ScoresSimilarityRecord import java.time.LocalDateTime -import java.util.function.Function +import kotlin.collections.Collection import kotlin.collections.List +import org.jooq.Condition import org.jooq.Field import org.jooq.ForeignKey import org.jooq.Index +import org.jooq.InverseForeignKey import org.jooq.Name +import org.jooq.PlainSQL +import org.jooq.QueryPart import org.jooq.Record -import org.jooq.Records -import org.jooq.Row10 +import org.jooq.SQL import org.jooq.Schema -import org.jooq.SelectField +import org.jooq.Select +import org.jooq.Stringly import org.jooq.Table import org.jooq.TableField import org.jooq.TableOptions import org.jooq.UniqueKey import org.jooq.impl.DSL -import org.jooq.impl.Internal import org.jooq.impl.SQLDataType import org.jooq.impl.TableImpl @@ -41,19 +44,23 @@ import org.jooq.impl.TableImpl @Suppress("UNCHECKED_CAST") open class ScoresSimilarity( alias: Name, - child: Table?, - path: ForeignKey?, + path: Table?, + childPath: ForeignKey?, + parentPath: InverseForeignKey?, aliased: Table?, - parameters: Array?>? + parameters: Array?>?, + where: Condition? ): TableImpl( alias, Public.PUBLIC, - child, path, + childPath, + parentPath, aliased, parameters, DSL.comment(""), - TableOptions.table() + TableOptions.table(), + where, ) { companion object { @@ -119,8 +126,9 @@ open class ScoresSimilarity( */ val CG_CORRELATION: TableField = createField(DSL.name("cg_correlation"), SQLDataType.DOUBLE, this, "") - private constructor(alias: Name, aliased: Table?): this(alias, null, null, aliased, null) - private constructor(alias: Name, aliased: Table?, parameters: Array?>?): this(alias, null, null, aliased, parameters) + private constructor(alias: Name, aliased: Table?): this(alias, null, null, null, aliased, null, null) + private constructor(alias: Name, aliased: Table?, parameters: Array?>?): this(alias, null, null, null, aliased, parameters, null) + private constructor(alias: Name, aliased: Table?, where: Condition?): this(alias, null, null, null, aliased, null, where) /** * Create an aliased public.scores_similarity table reference @@ -136,15 +144,13 @@ open class ScoresSimilarity( * Create a public.scores_similarity table reference */ constructor(): this(DSL.name("scores_similarity"), null) - - constructor(child: Table, key: ForeignKey): this(Internal.createPathAlias(child, key), child, key, SCORES_SIMILARITY, null) override fun getSchema(): Schema? = if (aliased()) null else Public.PUBLIC override fun getIndexes(): List = listOf(IDX_REPLAY_IDS, IDX_REPLAY_IDS_PAIRS) override fun getPrimaryKey(): UniqueKey = SCORES_SIMILARITY_PKEY override fun getUniqueKeys(): List> = listOf(UNIQUE_BEATMAP_REPLAY_IDS) override fun `as`(alias: String): ScoresSimilarity = ScoresSimilarity(DSL.name(alias), this) override fun `as`(alias: Name): ScoresSimilarity = ScoresSimilarity(alias, this) - override fun `as`(alias: Table<*>): ScoresSimilarity = ScoresSimilarity(alias.getQualifiedName(), this) + override fun `as`(alias: Table<*>): ScoresSimilarity = ScoresSimilarity(alias.qualifiedName, this) /** * Rename this table @@ -159,21 +165,55 @@ open class ScoresSimilarity( /** * Rename this table */ - override fun rename(name: Table<*>): ScoresSimilarity = ScoresSimilarity(name.getQualifiedName(), null) - - // ------------------------------------------------------------------------- - // Row10 type methods - // ------------------------------------------------------------------------- - override fun fieldsRow(): Row10 = super.fieldsRow() as Row10 + override fun rename(name: Table<*>): ScoresSimilarity = ScoresSimilarity(name.qualifiedName, null) /** - * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + * Create an inline derived table from this table */ - fun mapping(from: (Int?, Int?, Long?, Long?, Double?, Double?, LocalDateTime?, Boolean?, Double?, Double?) -> U): SelectField = convertFrom(Records.mapping(from)) + override fun where(condition: Condition?): ScoresSimilarity = ScoresSimilarity(qualifiedName, if (aliased()) this else null, condition) /** - * Convenience mapping calling {@link SelectField#convertFrom(Class, - * Function)}. + * Create an inline derived table from this table */ - fun mapping(toType: Class, from: (Int?, Int?, Long?, Long?, Double?, Double?, LocalDateTime?, Boolean?, Double?, Double?) -> U): SelectField = convertFrom(toType, Records.mapping(from)) + override fun where(conditions: Collection): ScoresSimilarity = where(DSL.and(conditions)) + + /** + * Create an inline derived table from this table + */ + override fun where(vararg conditions: Condition?): ScoresSimilarity = where(DSL.and(*conditions)) + + /** + * Create an inline derived table from this table + */ + override fun where(condition: Field?): ScoresSimilarity = where(DSL.condition(condition)) + + /** + * Create an inline derived table from this table + */ + @PlainSQL override fun where(condition: SQL): ScoresSimilarity = where(DSL.condition(condition)) + + /** + * Create an inline derived table from this table + */ + @PlainSQL override fun where(@Stringly.SQL condition: String): ScoresSimilarity = where(DSL.condition(condition)) + + /** + * Create an inline derived table from this table + */ + @PlainSQL override fun where(@Stringly.SQL condition: String, vararg binds: Any?): ScoresSimilarity = where(DSL.condition(condition, *binds)) + + /** + * Create an inline derived table from this table + */ + @PlainSQL override fun where(@Stringly.SQL condition: String, vararg parts: QueryPart): ScoresSimilarity = where(DSL.condition(condition, *parts)) + + /** + * Create an inline derived table from this table + */ + override fun whereExists(select: Select<*>): ScoresSimilarity = where(DSL.exists(select)) + + /** + * Create an inline derived table from this table + */ + override fun whereNotExists(select: Select<*>): ScoresSimilarity = where(DSL.notExists(select)) } diff --git a/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/UpdateUserQueue.kt b/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/UpdateUserQueue.kt index a82cfd6..e3b193d 100644 --- a/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/UpdateUserQueue.kt +++ b/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/UpdateUserQueue.kt @@ -10,23 +10,27 @@ import com.nisemoe.generated.tables.records.UpdateUserQueueRecord import java.time.LocalDateTime import java.time.OffsetDateTime -import java.util.function.Function +import kotlin.collections.Collection + +import org.jooq.Condition import org.jooq.Field import org.jooq.ForeignKey import org.jooq.Identity +import org.jooq.InverseForeignKey import org.jooq.Name +import org.jooq.PlainSQL +import org.jooq.QueryPart import org.jooq.Record -import org.jooq.Records -import org.jooq.Row9 +import org.jooq.SQL import org.jooq.Schema -import org.jooq.SelectField +import org.jooq.Select +import org.jooq.Stringly import org.jooq.Table import org.jooq.TableField import org.jooq.TableOptions import org.jooq.UniqueKey import org.jooq.impl.DSL -import org.jooq.impl.Internal import org.jooq.impl.SQLDataType import org.jooq.impl.TableImpl @@ -37,19 +41,23 @@ import org.jooq.impl.TableImpl @Suppress("UNCHECKED_CAST") open class UpdateUserQueue( alias: Name, - child: Table?, - path: ForeignKey?, + path: Table?, + childPath: ForeignKey?, + parentPath: InverseForeignKey?, aliased: Table?, - parameters: Array?>? + parameters: Array?>?, + where: Condition? ): TableImpl( alias, Public.PUBLIC, - child, path, + childPath, + parentPath, aliased, parameters, DSL.comment(""), - TableOptions.table() + TableOptions.table(), + where, ) { companion object { @@ -109,8 +117,9 @@ open class UpdateUserQueue( */ val HAS_FAILED: TableField = createField(DSL.name("has_failed"), SQLDataType.BOOLEAN.nullable(false).defaultValue(DSL.field(DSL.raw("false"), SQLDataType.BOOLEAN)), this, "") - private constructor(alias: Name, aliased: Table?): this(alias, null, null, aliased, null) - private constructor(alias: Name, aliased: Table?, parameters: Array?>?): this(alias, null, null, aliased, parameters) + private constructor(alias: Name, aliased: Table?): this(alias, null, null, null, aliased, null, null) + private constructor(alias: Name, aliased: Table?, parameters: Array?>?): this(alias, null, null, null, aliased, parameters, null) + private constructor(alias: Name, aliased: Table?, where: Condition?): this(alias, null, null, null, aliased, null, where) /** * Create an aliased public.update_user_queue table reference @@ -126,14 +135,12 @@ open class UpdateUserQueue( * Create a public.update_user_queue table reference */ constructor(): this(DSL.name("update_user_queue"), null) - - constructor(child: Table, key: ForeignKey): this(Internal.createPathAlias(child, key), child, key, UPDATE_USER_QUEUE, null) override fun getSchema(): Schema? = if (aliased()) null else Public.PUBLIC override fun getIdentity(): Identity = super.getIdentity() as Identity override fun getPrimaryKey(): UniqueKey = UPDATE_USER_QUEUE_PKEY override fun `as`(alias: String): UpdateUserQueue = UpdateUserQueue(DSL.name(alias), this) override fun `as`(alias: Name): UpdateUserQueue = UpdateUserQueue(alias, this) - override fun `as`(alias: Table<*>): UpdateUserQueue = UpdateUserQueue(alias.getQualifiedName(), this) + override fun `as`(alias: Table<*>): UpdateUserQueue = UpdateUserQueue(alias.qualifiedName, this) /** * Rename this table @@ -148,21 +155,55 @@ open class UpdateUserQueue( /** * Rename this table */ - override fun rename(name: Table<*>): UpdateUserQueue = UpdateUserQueue(name.getQualifiedName(), null) - - // ------------------------------------------------------------------------- - // Row9 type methods - // ------------------------------------------------------------------------- - override fun fieldsRow(): Row9 = super.fieldsRow() as Row9 + override fun rename(name: Table<*>): UpdateUserQueue = UpdateUserQueue(name.qualifiedName, null) /** - * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + * Create an inline derived table from this table */ - fun mapping(from: (Int?, Long?, Boolean?, LocalDateTime?, OffsetDateTime?, Int?, Int?, Long?, Boolean?) -> U): SelectField = convertFrom(Records.mapping(from)) + override fun where(condition: Condition?): UpdateUserQueue = UpdateUserQueue(qualifiedName, if (aliased()) this else null, condition) /** - * Convenience mapping calling {@link SelectField#convertFrom(Class, - * Function)}. + * Create an inline derived table from this table */ - fun mapping(toType: Class, from: (Int?, Long?, Boolean?, LocalDateTime?, OffsetDateTime?, Int?, Int?, Long?, Boolean?) -> U): SelectField = convertFrom(toType, Records.mapping(from)) + override fun where(conditions: Collection): UpdateUserQueue = where(DSL.and(conditions)) + + /** + * Create an inline derived table from this table + */ + override fun where(vararg conditions: Condition?): UpdateUserQueue = where(DSL.and(*conditions)) + + /** + * Create an inline derived table from this table + */ + override fun where(condition: Field?): UpdateUserQueue = where(DSL.condition(condition)) + + /** + * Create an inline derived table from this table + */ + @PlainSQL override fun where(condition: SQL): UpdateUserQueue = where(DSL.condition(condition)) + + /** + * Create an inline derived table from this table + */ + @PlainSQL override fun where(@Stringly.SQL condition: String): UpdateUserQueue = where(DSL.condition(condition)) + + /** + * Create an inline derived table from this table + */ + @PlainSQL override fun where(@Stringly.SQL condition: String, vararg binds: Any?): UpdateUserQueue = where(DSL.condition(condition, *binds)) + + /** + * Create an inline derived table from this table + */ + @PlainSQL override fun where(@Stringly.SQL condition: String, vararg parts: QueryPart): UpdateUserQueue = where(DSL.condition(condition, *parts)) + + /** + * Create an inline derived table from this table + */ + override fun whereExists(select: Select<*>): UpdateUserQueue = where(DSL.exists(select)) + + /** + * Create an inline derived table from this table + */ + override fun whereNotExists(select: Select<*>): UpdateUserQueue = where(DSL.notExists(select)) } diff --git a/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/UserFollows.kt b/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/UserFollows.kt index 565380f..5f24774 100644 --- a/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/UserFollows.kt +++ b/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/UserFollows.kt @@ -8,21 +8,26 @@ import com.nisemoe.generated.Public import com.nisemoe.generated.keys.USER_FOLLOWS_PKEY import com.nisemoe.generated.keys.USER_FOLLOWS__USER_FOLLOWS_FOLLOWS_USER_ID_FKEY import com.nisemoe.generated.keys.USER_FOLLOWS__USER_FOLLOWS_USER_ID_FKEY +import com.nisemoe.generated.tables.Users.UsersPath import com.nisemoe.generated.tables.records.UserFollowsRecord -import java.util.function.Function - +import kotlin.collections.Collection import kotlin.collections.List +import org.jooq.Condition import org.jooq.Field import org.jooq.ForeignKey import org.jooq.Identity +import org.jooq.InverseForeignKey import org.jooq.Name +import org.jooq.Path +import org.jooq.PlainSQL +import org.jooq.QueryPart import org.jooq.Record -import org.jooq.Records -import org.jooq.Row2 +import org.jooq.SQL import org.jooq.Schema -import org.jooq.SelectField +import org.jooq.Select +import org.jooq.Stringly import org.jooq.Table import org.jooq.TableField import org.jooq.TableOptions @@ -39,19 +44,23 @@ import org.jooq.impl.TableImpl @Suppress("UNCHECKED_CAST") open class UserFollows( alias: Name, - child: Table?, - path: ForeignKey?, + path: Table?, + childPath: ForeignKey?, + parentPath: InverseForeignKey?, aliased: Table?, - parameters: Array?>? + parameters: Array?>?, + where: Condition? ): TableImpl( alias, Public.PUBLIC, - child, path, + childPath, + parentPath, aliased, parameters, DSL.comment(""), - TableOptions.table() + TableOptions.table(), + where, ) { companion object { @@ -76,8 +85,9 @@ open class UserFollows( */ val FOLLOWS_USER_ID: TableField = createField(DSL.name("follows_user_id"), SQLDataType.BIGINT.nullable(false).identity(true), this, "") - private constructor(alias: Name, aliased: Table?): this(alias, null, null, aliased, null) - private constructor(alias: Name, aliased: Table?, parameters: Array?>?): this(alias, null, null, aliased, parameters) + private constructor(alias: Name, aliased: Table?): this(alias, null, null, null, aliased, null, null) + private constructor(alias: Name, aliased: Table?, parameters: Array?>?): this(alias, null, null, null, aliased, parameters, null) + private constructor(alias: Name, aliased: Table?, where: Condition?): this(alias, null, null, null, aliased, null, where) /** * Create an aliased public.user_follows table reference @@ -94,45 +104,57 @@ open class UserFollows( */ constructor(): this(DSL.name("user_follows"), null) - constructor(child: Table, key: ForeignKey): this(Internal.createPathAlias(child, key), child, key, USER_FOLLOWS, null) + constructor(path: Table, childPath: ForeignKey?, parentPath: InverseForeignKey?): this(Internal.createPathAlias(path, childPath, parentPath), path, childPath, parentPath, USER_FOLLOWS, null, null) + + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ + open class UserFollowsPath : UserFollows, Path { + constructor(path: Table, childPath: ForeignKey?, parentPath: InverseForeignKey?): super(path, childPath, parentPath) + private constructor(alias: Name, aliased: Table): super(alias, aliased) + override fun `as`(alias: String): UserFollowsPath = UserFollowsPath(DSL.name(alias), this) + override fun `as`(alias: Name): UserFollowsPath = UserFollowsPath(alias, this) + override fun `as`(alias: Table<*>): UserFollowsPath = UserFollowsPath(alias.qualifiedName, this) + } override fun getSchema(): Schema? = if (aliased()) null else Public.PUBLIC override fun getIdentity(): Identity = super.getIdentity() as Identity override fun getPrimaryKey(): UniqueKey = USER_FOLLOWS_PKEY override fun getReferences(): List> = listOf(USER_FOLLOWS__USER_FOLLOWS_USER_ID_FKEY, USER_FOLLOWS__USER_FOLLOWS_FOLLOWS_USER_ID_FKEY) - private lateinit var _userFollowsUserIdFkey: Users - private lateinit var _userFollowsFollowsUserIdFkey: Users + private lateinit var _userFollowsUserIdFkey: UsersPath /** * Get the implicit join path to the public.users table, via * the user_follows_user_id_fkey key. */ - fun userFollowsUserIdFkey(): Users { + fun userFollowsUserIdFkey(): UsersPath { if (!this::_userFollowsUserIdFkey.isInitialized) - _userFollowsUserIdFkey = Users(this, USER_FOLLOWS__USER_FOLLOWS_USER_ID_FKEY) + _userFollowsUserIdFkey = UsersPath(this, USER_FOLLOWS__USER_FOLLOWS_USER_ID_FKEY, null) return _userFollowsUserIdFkey; } - val userFollowsUserIdFkey: Users - get(): Users = userFollowsUserIdFkey() + val userFollowsUserIdFkey: UsersPath + get(): UsersPath = userFollowsUserIdFkey() + + private lateinit var _userFollowsFollowsUserIdFkey: UsersPath /** * Get the implicit join path to the public.users table, via * the user_follows_follows_user_id_fkey key. */ - fun userFollowsFollowsUserIdFkey(): Users { + fun userFollowsFollowsUserIdFkey(): UsersPath { if (!this::_userFollowsFollowsUserIdFkey.isInitialized) - _userFollowsFollowsUserIdFkey = Users(this, USER_FOLLOWS__USER_FOLLOWS_FOLLOWS_USER_ID_FKEY) + _userFollowsFollowsUserIdFkey = UsersPath(this, USER_FOLLOWS__USER_FOLLOWS_FOLLOWS_USER_ID_FKEY, null) return _userFollowsFollowsUserIdFkey; } - val userFollowsFollowsUserIdFkey: Users - get(): Users = userFollowsFollowsUserIdFkey() + val userFollowsFollowsUserIdFkey: UsersPath + get(): UsersPath = userFollowsFollowsUserIdFkey() override fun `as`(alias: String): UserFollows = UserFollows(DSL.name(alias), this) override fun `as`(alias: Name): UserFollows = UserFollows(alias, this) - override fun `as`(alias: Table<*>): UserFollows = UserFollows(alias.getQualifiedName(), this) + override fun `as`(alias: Table<*>): UserFollows = UserFollows(alias.qualifiedName, this) /** * Rename this table @@ -147,21 +169,55 @@ open class UserFollows( /** * Rename this table */ - override fun rename(name: Table<*>): UserFollows = UserFollows(name.getQualifiedName(), null) - - // ------------------------------------------------------------------------- - // Row2 type methods - // ------------------------------------------------------------------------- - override fun fieldsRow(): Row2 = super.fieldsRow() as Row2 + override fun rename(name: Table<*>): UserFollows = UserFollows(name.qualifiedName, null) /** - * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + * Create an inline derived table from this table */ - fun mapping(from: (Long?, Long?) -> U): SelectField = convertFrom(Records.mapping(from)) + override fun where(condition: Condition?): UserFollows = UserFollows(qualifiedName, if (aliased()) this else null, condition) /** - * Convenience mapping calling {@link SelectField#convertFrom(Class, - * Function)}. + * Create an inline derived table from this table */ - fun mapping(toType: Class, from: (Long?, Long?) -> U): SelectField = convertFrom(toType, Records.mapping(from)) + override fun where(conditions: Collection): UserFollows = where(DSL.and(conditions)) + + /** + * Create an inline derived table from this table + */ + override fun where(vararg conditions: Condition?): UserFollows = where(DSL.and(*conditions)) + + /** + * Create an inline derived table from this table + */ + override fun where(condition: Field?): UserFollows = where(DSL.condition(condition)) + + /** + * Create an inline derived table from this table + */ + @PlainSQL override fun where(condition: SQL): UserFollows = where(DSL.condition(condition)) + + /** + * Create an inline derived table from this table + */ + @PlainSQL override fun where(@Stringly.SQL condition: String): UserFollows = where(DSL.condition(condition)) + + /** + * Create an inline derived table from this table + */ + @PlainSQL override fun where(@Stringly.SQL condition: String, vararg binds: Any?): UserFollows = where(DSL.condition(condition, *binds)) + + /** + * Create an inline derived table from this table + */ + @PlainSQL override fun where(@Stringly.SQL condition: String, vararg parts: QueryPart): UserFollows = where(DSL.condition(condition, *parts)) + + /** + * Create an inline derived table from this table + */ + override fun whereExists(select: Select<*>): UserFollows = where(DSL.exists(select)) + + /** + * Create an inline derived table from this table + */ + override fun whereNotExists(select: Select<*>): UserFollows = where(DSL.notExists(select)) } diff --git a/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/UserScores.kt b/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/UserScores.kt index 06a421f..9c27151 100644 --- a/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/UserScores.kt +++ b/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/UserScores.kt @@ -10,14 +10,22 @@ import com.nisemoe.generated.tables.records.UserScoresRecord import java.time.OffsetDateTime import java.util.UUID +import kotlin.collections.Collection import kotlin.collections.List import org.jooq.Check +import org.jooq.Condition import org.jooq.Field import org.jooq.ForeignKey +import org.jooq.InverseForeignKey import org.jooq.Name +import org.jooq.PlainSQL +import org.jooq.QueryPart import org.jooq.Record +import org.jooq.SQL import org.jooq.Schema +import org.jooq.Select +import org.jooq.Stringly import org.jooq.Table import org.jooq.TableField import org.jooq.TableOptions @@ -33,19 +41,23 @@ import org.jooq.impl.TableImpl @Suppress("UNCHECKED_CAST") open class UserScores( alias: Name, - child: Table?, - path: ForeignKey?, + path: Table?, + childPath: ForeignKey?, + parentPath: InverseForeignKey?, aliased: Table?, - parameters: Array?>? + parameters: Array?>?, + where: Condition? ): TableImpl( alias, Public.PUBLIC, - child, path, + childPath, + parentPath, aliased, parameters, DSL.comment(""), - TableOptions.table() + TableOptions.table(), + where, ) { companion object { @@ -310,8 +322,9 @@ open class UserScores( */ val JUDGEMENTS: TableField = createField(DSL.name("judgements"), SQLDataType.BLOB, this, "") - private constructor(alias: Name, aliased: Table?): this(alias, null, null, aliased, null) - private constructor(alias: Name, aliased: Table?, parameters: Array?>?): this(alias, null, null, aliased, parameters) + private constructor(alias: Name, aliased: Table?): this(alias, null, null, null, aliased, null, null) + private constructor(alias: Name, aliased: Table?, parameters: Array?>?): this(alias, null, null, null, aliased, parameters, null) + private constructor(alias: Name, aliased: Table?, where: Condition?): this(alias, null, null, null, aliased, null, where) /** * Create an aliased public.user_scores table reference @@ -327,8 +340,6 @@ open class UserScores( * Create a public.user_scores table reference */ constructor(): this(DSL.name("user_scores"), null) - - constructor(child: Table, key: ForeignKey): this(Internal.createPathAlias(child, key), child, key, USER_SCORES, null) override fun getSchema(): Schema? = if (aliased()) null else Public.PUBLIC override fun getChecks(): List> = listOf( Internal.createCheck(this, DSL.name("life_bar_graph_check"), "((octet_length(life_bar_graph) <= 524288))", true), @@ -336,7 +347,7 @@ open class UserScores( ) override fun `as`(alias: String): UserScores = UserScores(DSL.name(alias), this) override fun `as`(alias: Name): UserScores = UserScores(alias, this) - override fun `as`(alias: Table<*>): UserScores = UserScores(alias.getQualifiedName(), this) + override fun `as`(alias: Table<*>): UserScores = UserScores(alias.qualifiedName, this) /** * Rename this table @@ -351,5 +362,55 @@ open class UserScores( /** * Rename this table */ - override fun rename(name: Table<*>): UserScores = UserScores(name.getQualifiedName(), null) + override fun rename(name: Table<*>): UserScores = UserScores(name.qualifiedName, null) + + /** + * Create an inline derived table from this table + */ + override fun where(condition: Condition?): UserScores = UserScores(qualifiedName, if (aliased()) this else null, condition) + + /** + * Create an inline derived table from this table + */ + override fun where(conditions: Collection): UserScores = where(DSL.and(conditions)) + + /** + * Create an inline derived table from this table + */ + override fun where(vararg conditions: Condition?): UserScores = where(DSL.and(*conditions)) + + /** + * Create an inline derived table from this table + */ + override fun where(condition: Field?): UserScores = where(DSL.condition(condition)) + + /** + * Create an inline derived table from this table + */ + @PlainSQL override fun where(condition: SQL): UserScores = where(DSL.condition(condition)) + + /** + * Create an inline derived table from this table + */ + @PlainSQL override fun where(@Stringly.SQL condition: String): UserScores = where(DSL.condition(condition)) + + /** + * Create an inline derived table from this table + */ + @PlainSQL override fun where(@Stringly.SQL condition: String, vararg binds: Any?): UserScores = where(DSL.condition(condition, *binds)) + + /** + * Create an inline derived table from this table + */ + @PlainSQL override fun where(@Stringly.SQL condition: String, vararg parts: QueryPart): UserScores = where(DSL.condition(condition, *parts)) + + /** + * Create an inline derived table from this table + */ + override fun whereExists(select: Select<*>): UserScores = where(DSL.exists(select)) + + /** + * Create an inline derived table from this table + */ + override fun whereNotExists(select: Select<*>): UserScores = where(DSL.notExists(select)) } diff --git a/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/UserScoresSimilarity.kt b/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/UserScoresSimilarity.kt index 046c060..9672ff5 100644 --- a/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/UserScoresSimilarity.kt +++ b/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/UserScoresSimilarity.kt @@ -11,25 +11,28 @@ import com.nisemoe.generated.tables.records.UserScoresSimilarityRecord import java.time.OffsetDateTime import java.util.UUID -import java.util.function.Function +import kotlin.collections.Collection import kotlin.collections.List +import org.jooq.Condition import org.jooq.Field import org.jooq.ForeignKey import org.jooq.Identity +import org.jooq.InverseForeignKey import org.jooq.Name +import org.jooq.PlainSQL +import org.jooq.QueryPart import org.jooq.Record -import org.jooq.Records -import org.jooq.Row9 +import org.jooq.SQL import org.jooq.Schema -import org.jooq.SelectField +import org.jooq.Select +import org.jooq.Stringly import org.jooq.Table import org.jooq.TableField import org.jooq.TableOptions import org.jooq.UniqueKey import org.jooq.impl.DSL -import org.jooq.impl.Internal import org.jooq.impl.SQLDataType import org.jooq.impl.TableImpl @@ -40,19 +43,23 @@ import org.jooq.impl.TableImpl @Suppress("UNCHECKED_CAST") open class UserScoresSimilarity( alias: Name, - child: Table?, - path: ForeignKey?, + path: Table?, + childPath: ForeignKey?, + parentPath: InverseForeignKey?, aliased: Table?, - parameters: Array?>? + parameters: Array?>?, + where: Condition? ): TableImpl( alias, Public.PUBLIC, - child, path, + childPath, + parentPath, aliased, parameters, DSL.comment(""), - TableOptions.table() + TableOptions.table(), + where, ) { companion object { @@ -112,8 +119,9 @@ open class UserScoresSimilarity( */ val CG_CORRELATION: TableField = createField(DSL.name("cg_correlation"), SQLDataType.DOUBLE, this, "") - private constructor(alias: Name, aliased: Table?): this(alias, null, null, aliased, null) - private constructor(alias: Name, aliased: Table?, parameters: Array?>?): this(alias, null, null, aliased, parameters) + private constructor(alias: Name, aliased: Table?): this(alias, null, null, null, aliased, null, null) + private constructor(alias: Name, aliased: Table?, parameters: Array?>?): this(alias, null, null, null, aliased, parameters, null) + private constructor(alias: Name, aliased: Table?, where: Condition?): this(alias, null, null, null, aliased, null, where) /** * Create an aliased public.user_scores_similarity table @@ -131,15 +139,13 @@ open class UserScoresSimilarity( * Create a public.user_scores_similarity table reference */ constructor(): this(DSL.name("user_scores_similarity"), null) - - constructor(child: Table, key: ForeignKey): this(Internal.createPathAlias(child, key), child, key, USER_SCORES_SIMILARITY, null) override fun getSchema(): Schema? = if (aliased()) null else Public.PUBLIC override fun getIdentity(): Identity = super.getIdentity() as Identity override fun getPrimaryKey(): UniqueKey = USER_SCORES_SIMILARITY_PKEY override fun getUniqueKeys(): List> = listOf(USER_SCORES_UNIQUE_BEATMAP_REPLAY_IDS) override fun `as`(alias: String): UserScoresSimilarity = UserScoresSimilarity(DSL.name(alias), this) override fun `as`(alias: Name): UserScoresSimilarity = UserScoresSimilarity(alias, this) - override fun `as`(alias: Table<*>): UserScoresSimilarity = UserScoresSimilarity(alias.getQualifiedName(), this) + override fun `as`(alias: Table<*>): UserScoresSimilarity = UserScoresSimilarity(alias.qualifiedName, this) /** * Rename this table @@ -154,21 +160,55 @@ open class UserScoresSimilarity( /** * Rename this table */ - override fun rename(name: Table<*>): UserScoresSimilarity = UserScoresSimilarity(name.getQualifiedName(), null) - - // ------------------------------------------------------------------------- - // Row9 type methods - // ------------------------------------------------------------------------- - override fun fieldsRow(): Row9 = super.fieldsRow() as Row9 + override fun rename(name: Table<*>): UserScoresSimilarity = UserScoresSimilarity(name.qualifiedName, null) /** - * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + * Create an inline derived table from this table */ - fun mapping(from: (Int?, Int?, UUID?, Long?, Double?, Double?, OffsetDateTime?, Double?, Double?) -> U): SelectField = convertFrom(Records.mapping(from)) + override fun where(condition: Condition?): UserScoresSimilarity = UserScoresSimilarity(qualifiedName, if (aliased()) this else null, condition) /** - * Convenience mapping calling {@link SelectField#convertFrom(Class, - * Function)}. + * Create an inline derived table from this table */ - fun mapping(toType: Class, from: (Int?, Int?, UUID?, Long?, Double?, Double?, OffsetDateTime?, Double?, Double?) -> U): SelectField = convertFrom(toType, Records.mapping(from)) + override fun where(conditions: Collection): UserScoresSimilarity = where(DSL.and(conditions)) + + /** + * Create an inline derived table from this table + */ + override fun where(vararg conditions: Condition?): UserScoresSimilarity = where(DSL.and(*conditions)) + + /** + * Create an inline derived table from this table + */ + override fun where(condition: Field?): UserScoresSimilarity = where(DSL.condition(condition)) + + /** + * Create an inline derived table from this table + */ + @PlainSQL override fun where(condition: SQL): UserScoresSimilarity = where(DSL.condition(condition)) + + /** + * Create an inline derived table from this table + */ + @PlainSQL override fun where(@Stringly.SQL condition: String): UserScoresSimilarity = where(DSL.condition(condition)) + + /** + * Create an inline derived table from this table + */ + @PlainSQL override fun where(@Stringly.SQL condition: String, vararg binds: Any?): UserScoresSimilarity = where(DSL.condition(condition, *binds)) + + /** + * Create an inline derived table from this table + */ + @PlainSQL override fun where(@Stringly.SQL condition: String, vararg parts: QueryPart): UserScoresSimilarity = where(DSL.condition(condition, *parts)) + + /** + * Create an inline derived table from this table + */ + override fun whereExists(select: Select<*>): UserScoresSimilarity = where(DSL.exists(select)) + + /** + * Create an inline derived table from this table + */ + override fun whereNotExists(select: Select<*>): UserScoresSimilarity = where(DSL.notExists(select)) } diff --git a/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/Users.kt b/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/Users.kt index b239023..fdcc759 100644 --- a/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/Users.kt +++ b/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/Users.kt @@ -5,21 +5,34 @@ package com.nisemoe.generated.tables import com.nisemoe.generated.Public +import com.nisemoe.generated.indexes.IDX_USERS_IS_BANNED_FALSE +import com.nisemoe.generated.indexes.IDX_USERS_IS_BANNED_TRUE import com.nisemoe.generated.keys.USERS_PKEY +import com.nisemoe.generated.keys.USER_FOLLOWS__USER_FOLLOWS_FOLLOWS_USER_ID_FKEY +import com.nisemoe.generated.keys.USER_FOLLOWS__USER_FOLLOWS_USER_ID_FKEY +import com.nisemoe.generated.tables.UserFollows.UserFollowsPath import com.nisemoe.generated.tables.records.UsersRecord import java.time.LocalDateTime import java.time.OffsetDateTime -import java.util.function.Function +import kotlin.collections.Collection +import kotlin.collections.List + +import org.jooq.Condition import org.jooq.Field import org.jooq.ForeignKey +import org.jooq.Index +import org.jooq.InverseForeignKey import org.jooq.Name +import org.jooq.Path +import org.jooq.PlainSQL +import org.jooq.QueryPart import org.jooq.Record -import org.jooq.Records -import org.jooq.Row20 +import org.jooq.SQL import org.jooq.Schema -import org.jooq.SelectField +import org.jooq.Select +import org.jooq.Stringly import org.jooq.Table import org.jooq.TableField import org.jooq.TableOptions @@ -36,19 +49,23 @@ import org.jooq.impl.TableImpl @Suppress("UNCHECKED_CAST") open class Users( alias: Name, - child: Table?, - path: ForeignKey?, + path: Table?, + childPath: ForeignKey?, + parentPath: InverseForeignKey?, aliased: Table?, - parameters: Array?>? + parameters: Array?>?, + where: Condition? ): TableImpl( alias, Public.PUBLIC, - child, path, + childPath, + parentPath, aliased, parameters, DSL.comment(""), - TableOptions.table() + TableOptions.table(), + where, ) { companion object { @@ -163,8 +180,9 @@ open class Users( */ val APPROX_BAN_DATE: TableField = createField(DSL.name("approx_ban_date"), SQLDataType.TIMESTAMPWITHTIMEZONE(6), this, "") - private constructor(alias: Name, aliased: Table?): this(alias, null, null, aliased, null) - private constructor(alias: Name, aliased: Table?, parameters: Array?>?): this(alias, null, null, aliased, parameters) + private constructor(alias: Name, aliased: Table?): this(alias, null, null, null, aliased, null, null) + private constructor(alias: Name, aliased: Table?, parameters: Array?>?): this(alias, null, null, null, aliased, parameters, null) + private constructor(alias: Name, aliased: Table?, where: Condition?): this(alias, null, null, null, aliased, null, where) /** * Create an aliased public.users table reference @@ -181,12 +199,58 @@ open class Users( */ constructor(): this(DSL.name("users"), null) - constructor(child: Table, key: ForeignKey): this(Internal.createPathAlias(child, key), child, key, USERS, null) + constructor(path: Table, childPath: ForeignKey?, parentPath: InverseForeignKey?): this(Internal.createPathAlias(path, childPath, parentPath), path, childPath, parentPath, USERS, null, null) + + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ + open class UsersPath : Users, Path { + constructor(path: Table, childPath: ForeignKey?, parentPath: InverseForeignKey?): super(path, childPath, parentPath) + private constructor(alias: Name, aliased: Table): super(alias, aliased) + override fun `as`(alias: String): UsersPath = UsersPath(DSL.name(alias), this) + override fun `as`(alias: Name): UsersPath = UsersPath(alias, this) + override fun `as`(alias: Table<*>): UsersPath = UsersPath(alias.qualifiedName, this) + } override fun getSchema(): Schema? = if (aliased()) null else Public.PUBLIC + override fun getIndexes(): List = listOf(IDX_USERS_IS_BANNED_FALSE, IDX_USERS_IS_BANNED_TRUE) override fun getPrimaryKey(): UniqueKey = USERS_PKEY + + private lateinit var _userFollowsFollowsUserIdFkey: UserFollowsPath + + /** + * Get the implicit to-many join path to the + * public.user_follows table, via the + * user_follows_follows_user_id_fkey key + */ + fun userFollowsFollowsUserIdFkey(): UserFollowsPath { + if (!this::_userFollowsFollowsUserIdFkey.isInitialized) + _userFollowsFollowsUserIdFkey = UserFollowsPath(this, null, USER_FOLLOWS__USER_FOLLOWS_FOLLOWS_USER_ID_FKEY.inverseKey) + + return _userFollowsFollowsUserIdFkey; + } + + val userFollowsFollowsUserIdFkey: UserFollowsPath + get(): UserFollowsPath = userFollowsFollowsUserIdFkey() + + private lateinit var _userFollowsUserIdFkey: UserFollowsPath + + /** + * Get the implicit to-many join path to the + * public.user_follows table, via the + * user_follows_user_id_fkey key + */ + fun userFollowsUserIdFkey(): UserFollowsPath { + if (!this::_userFollowsUserIdFkey.isInitialized) + _userFollowsUserIdFkey = UserFollowsPath(this, null, USER_FOLLOWS__USER_FOLLOWS_USER_ID_FKEY.inverseKey) + + return _userFollowsUserIdFkey; + } + + val userFollowsUserIdFkey: UserFollowsPath + get(): UserFollowsPath = userFollowsUserIdFkey() override fun `as`(alias: String): Users = Users(DSL.name(alias), this) override fun `as`(alias: Name): Users = Users(alias, this) - override fun `as`(alias: Table<*>): Users = Users(alias.getQualifiedName(), this) + override fun `as`(alias: Table<*>): Users = Users(alias.qualifiedName, this) /** * Rename this table @@ -201,21 +265,55 @@ open class Users( /** * Rename this table */ - override fun rename(name: Table<*>): Users = Users(name.getQualifiedName(), null) - - // ------------------------------------------------------------------------- - // Row20 type methods - // ------------------------------------------------------------------------- - override fun fieldsRow(): Row20 = super.fieldsRow() as Row20 + override fun rename(name: Table<*>): Users = Users(name.qualifiedName, null) /** - * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + * Create an inline derived table from this table */ - fun mapping(from: (Long?, String?, LocalDateTime?, String?, Long?, Long?, Double?, Double?, Long?, Long?, Long?, Long?, Long?, Long?, Long?, OffsetDateTime?, Boolean?, Long?, Boolean?, OffsetDateTime?) -> U): SelectField = convertFrom(Records.mapping(from)) + override fun where(condition: Condition?): Users = Users(qualifiedName, if (aliased()) this else null, condition) /** - * Convenience mapping calling {@link SelectField#convertFrom(Class, - * Function)}. + * Create an inline derived table from this table */ - fun mapping(toType: Class, from: (Long?, String?, LocalDateTime?, String?, Long?, Long?, Double?, Double?, Long?, Long?, Long?, Long?, Long?, Long?, Long?, OffsetDateTime?, Boolean?, Long?, Boolean?, OffsetDateTime?) -> U): SelectField = convertFrom(toType, Records.mapping(from)) + override fun where(conditions: Collection): Users = where(DSL.and(conditions)) + + /** + * Create an inline derived table from this table + */ + override fun where(vararg conditions: Condition?): Users = where(DSL.and(*conditions)) + + /** + * Create an inline derived table from this table + */ + override fun where(condition: Field?): Users = where(DSL.condition(condition)) + + /** + * Create an inline derived table from this table + */ + @PlainSQL override fun where(condition: SQL): Users = where(DSL.condition(condition)) + + /** + * Create an inline derived table from this table + */ + @PlainSQL override fun where(@Stringly.SQL condition: String): Users = where(DSL.condition(condition)) + + /** + * Create an inline derived table from this table + */ + @PlainSQL override fun where(@Stringly.SQL condition: String, vararg binds: Any?): Users = where(DSL.condition(condition, *binds)) + + /** + * Create an inline derived table from this table + */ + @PlainSQL override fun where(@Stringly.SQL condition: String, vararg parts: QueryPart): Users = where(DSL.condition(condition, *parts)) + + /** + * Create an inline derived table from this table + */ + override fun whereExists(select: Select<*>): Users = where(DSL.exists(select)) + + /** + * Create an inline derived table from this table + */ + override fun whereNotExists(select: Select<*>): Users = where(DSL.notExists(select)) } diff --git a/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/records/BeatmapsRecord.kt b/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/records/BeatmapsRecord.kt index ae9d48c..d5034b9 100644 --- a/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/records/BeatmapsRecord.kt +++ b/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/records/BeatmapsRecord.kt @@ -8,10 +8,7 @@ import com.nisemoe.generated.tables.Beatmaps import java.time.OffsetDateTime -import org.jooq.Field import org.jooq.Record1 -import org.jooq.Record22 -import org.jooq.Row22 import org.jooq.impl.UpdatableRecordImpl @@ -19,7 +16,7 @@ import org.jooq.impl.UpdatableRecordImpl * This class is generated by jOOQ. */ @Suppress("UNCHECKED_CAST") -open class BeatmapsRecord private constructor() : UpdatableRecordImpl(Beatmaps.BEATMAPS), Record22 { +open class BeatmapsRecord private constructor() : UpdatableRecordImpl(Beatmaps.BEATMAPS) { open var beatmapId: Int? set(value): Unit = set(0, value) @@ -115,215 +112,6 @@ open class BeatmapsRecord private constructor() : UpdatableRecordImpl = super.key() as Record1 - // ------------------------------------------------------------------------- - // Record22 type implementation - // ------------------------------------------------------------------------- - - override fun fieldsRow(): Row22 = super.fieldsRow() as Row22 - override fun valuesRow(): Row22 = super.valuesRow() as Row22 - override fun field1(): Field = Beatmaps.BEATMAPS.BEATMAP_ID - override fun field2(): Field = Beatmaps.BEATMAPS.ARTIST - override fun field3(): Field = Beatmaps.BEATMAPS.BEATMAPSET_ID - override fun field4(): Field = Beatmaps.BEATMAPS.CREATOR - override fun field5(): Field = Beatmaps.BEATMAPS.SOURCE - override fun field6(): Field = Beatmaps.BEATMAPS.STAR_RATING - override fun field7(): Field = Beatmaps.BEATMAPS.TITLE - override fun field8(): Field = Beatmaps.BEATMAPS.VERSION - override fun field9(): Field = Beatmaps.BEATMAPS.SYS_LAST_UPDATE - override fun field10(): Field = Beatmaps.BEATMAPS.LAST_REPLAY_CHECK - override fun field11(): Field = Beatmaps.BEATMAPS.BEATMAP_FILE - override fun field12(): Field = Beatmaps.BEATMAPS.BEATMAP_HASH - override fun field13(): Field = Beatmaps.BEATMAPS.TOTAL_LENGTH - override fun field14(): Field = Beatmaps.BEATMAPS.BPM - override fun field15(): Field = Beatmaps.BEATMAPS.ACCURACY - override fun field16(): Field = Beatmaps.BEATMAPS.AR - override fun field17(): Field = Beatmaps.BEATMAPS.CS - override fun field18(): Field = Beatmaps.BEATMAPS.DRAIN - override fun field19(): Field = Beatmaps.BEATMAPS.COUNT_CIRCLES - override fun field20(): Field = Beatmaps.BEATMAPS.COUNT_SLIDERS - override fun field21(): Field = Beatmaps.BEATMAPS.COUNT_SPINNERS - override fun field22(): Field = Beatmaps.BEATMAPS.MAX_COMBO - override fun component1(): Int? = beatmapId - override fun component2(): String? = artist - override fun component3(): Int? = beatmapsetId - override fun component4(): String? = creator - override fun component5(): String? = source - override fun component6(): Double? = starRating - override fun component7(): String? = title - override fun component8(): String? = version - override fun component9(): OffsetDateTime? = sysLastUpdate - override fun component10(): String? = lastReplayCheck - override fun component11(): String? = beatmapFile - override fun component12(): String? = beatmapHash - override fun component13(): Int? = totalLength - override fun component14(): Double? = bpm - override fun component15(): Double? = accuracy - override fun component16(): Double? = ar - override fun component17(): Double? = cs - override fun component18(): Double? = drain - override fun component19(): Int? = countCircles - override fun component20(): Int? = countSliders - override fun component21(): Int? = countSpinners - override fun component22(): Int? = maxCombo - override fun value1(): Int? = beatmapId - override fun value2(): String? = artist - override fun value3(): Int? = beatmapsetId - override fun value4(): String? = creator - override fun value5(): String? = source - override fun value6(): Double? = starRating - override fun value7(): String? = title - override fun value8(): String? = version - override fun value9(): OffsetDateTime? = sysLastUpdate - override fun value10(): String? = lastReplayCheck - override fun value11(): String? = beatmapFile - override fun value12(): String? = beatmapHash - override fun value13(): Int? = totalLength - override fun value14(): Double? = bpm - override fun value15(): Double? = accuracy - override fun value16(): Double? = ar - override fun value17(): Double? = cs - override fun value18(): Double? = drain - override fun value19(): Int? = countCircles - override fun value20(): Int? = countSliders - override fun value21(): Int? = countSpinners - override fun value22(): Int? = maxCombo - - override fun value1(value: Int?): BeatmapsRecord { - set(0, value) - return this - } - - override fun value2(value: String?): BeatmapsRecord { - set(1, value) - return this - } - - override fun value3(value: Int?): BeatmapsRecord { - set(2, value) - return this - } - - override fun value4(value: String?): BeatmapsRecord { - set(3, value) - return this - } - - override fun value5(value: String?): BeatmapsRecord { - set(4, value) - return this - } - - override fun value6(value: Double?): BeatmapsRecord { - set(5, value) - return this - } - - override fun value7(value: String?): BeatmapsRecord { - set(6, value) - return this - } - - override fun value8(value: String?): BeatmapsRecord { - set(7, value) - return this - } - - override fun value9(value: OffsetDateTime?): BeatmapsRecord { - set(8, value) - return this - } - - override fun value10(value: String?): BeatmapsRecord { - set(9, value) - return this - } - - override fun value11(value: String?): BeatmapsRecord { - set(10, value) - return this - } - - override fun value12(value: String?): BeatmapsRecord { - set(11, value) - return this - } - - override fun value13(value: Int?): BeatmapsRecord { - set(12, value) - return this - } - - override fun value14(value: Double?): BeatmapsRecord { - set(13, value) - return this - } - - override fun value15(value: Double?): BeatmapsRecord { - set(14, value) - return this - } - - override fun value16(value: Double?): BeatmapsRecord { - set(15, value) - return this - } - - override fun value17(value: Double?): BeatmapsRecord { - set(16, value) - return this - } - - override fun value18(value: Double?): BeatmapsRecord { - set(17, value) - return this - } - - override fun value19(value: Int?): BeatmapsRecord { - set(18, value) - return this - } - - override fun value20(value: Int?): BeatmapsRecord { - set(19, value) - return this - } - - override fun value21(value: Int?): BeatmapsRecord { - set(20, value) - return this - } - - override fun value22(value: Int?): BeatmapsRecord { - set(21, value) - return this - } - - override fun values(value1: Int?, value2: String?, value3: Int?, value4: String?, value5: String?, value6: Double?, value7: String?, value8: String?, value9: OffsetDateTime?, value10: String?, value11: String?, value12: String?, value13: Int?, value14: Double?, value15: Double?, value16: Double?, value17: Double?, value18: Double?, value19: Int?, value20: Int?, value21: Int?, value22: Int?): BeatmapsRecord { - this.value1(value1) - this.value2(value2) - this.value3(value3) - this.value4(value4) - this.value5(value5) - this.value6(value6) - this.value7(value7) - this.value8(value8) - this.value9(value9) - this.value10(value10) - this.value11(value11) - this.value12(value12) - this.value13(value13) - this.value14(value14) - this.value15(value15) - this.value16(value16) - this.value17(value17) - this.value18(value18) - this.value19(value19) - this.value20(value20) - this.value21(value21) - this.value22(value22) - return this - } - /** * Create a detached, initialised BeatmapsRecord */ diff --git a/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/records/FlywaySchemaHistoryRecord.kt b/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/records/FlywaySchemaHistoryRecord.kt index 42dc4a7..b10ac37 100644 --- a/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/records/FlywaySchemaHistoryRecord.kt +++ b/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/records/FlywaySchemaHistoryRecord.kt @@ -8,10 +8,7 @@ import com.nisemoe.generated.tables.FlywaySchemaHistory import java.time.LocalDateTime -import org.jooq.Field import org.jooq.Record1 -import org.jooq.Record10 -import org.jooq.Row10 import org.jooq.impl.UpdatableRecordImpl @@ -19,7 +16,7 @@ import org.jooq.impl.UpdatableRecordImpl * This class is generated by jOOQ. */ @Suppress("UNCHECKED_CAST") -open class FlywaySchemaHistoryRecord private constructor() : UpdatableRecordImpl(FlywaySchemaHistory.FLYWAY_SCHEMA_HISTORY), Record10 { +open class FlywaySchemaHistoryRecord private constructor() : UpdatableRecordImpl(FlywaySchemaHistory.FLYWAY_SCHEMA_HISTORY) { open var installedRank: Int set(value): Unit = set(0, value) @@ -67,107 +64,6 @@ open class FlywaySchemaHistoryRecord private constructor() : UpdatableRecordImpl override fun key(): Record1 = super.key() as Record1 - // ------------------------------------------------------------------------- - // Record10 type implementation - // ------------------------------------------------------------------------- - - override fun fieldsRow(): Row10 = super.fieldsRow() as Row10 - override fun valuesRow(): Row10 = super.valuesRow() as Row10 - override fun field1(): Field = FlywaySchemaHistory.FLYWAY_SCHEMA_HISTORY.INSTALLED_RANK - override fun field2(): Field = FlywaySchemaHistory.FLYWAY_SCHEMA_HISTORY.VERSION - override fun field3(): Field = FlywaySchemaHistory.FLYWAY_SCHEMA_HISTORY.DESCRIPTION - override fun field4(): Field = FlywaySchemaHistory.FLYWAY_SCHEMA_HISTORY.TYPE - override fun field5(): Field = FlywaySchemaHistory.FLYWAY_SCHEMA_HISTORY.SCRIPT - override fun field6(): Field = FlywaySchemaHistory.FLYWAY_SCHEMA_HISTORY.CHECKSUM - override fun field7(): Field = FlywaySchemaHistory.FLYWAY_SCHEMA_HISTORY.INSTALLED_BY - override fun field8(): Field = FlywaySchemaHistory.FLYWAY_SCHEMA_HISTORY.INSTALLED_ON - override fun field9(): Field = FlywaySchemaHistory.FLYWAY_SCHEMA_HISTORY.EXECUTION_TIME - override fun field10(): Field = FlywaySchemaHistory.FLYWAY_SCHEMA_HISTORY.SUCCESS - override fun component1(): Int = installedRank - override fun component2(): String? = version - override fun component3(): String = description - override fun component4(): String = type - override fun component5(): String = script - override fun component6(): Int? = checksum - override fun component7(): String = installedBy - override fun component8(): LocalDateTime? = installedOn - override fun component9(): Int = executionTime - override fun component10(): Boolean = success - override fun value1(): Int = installedRank - override fun value2(): String? = version - override fun value3(): String = description - override fun value4(): String = type - override fun value5(): String = script - override fun value6(): Int? = checksum - override fun value7(): String = installedBy - override fun value8(): LocalDateTime? = installedOn - override fun value9(): Int = executionTime - override fun value10(): Boolean = success - - override fun value1(value: Int?): FlywaySchemaHistoryRecord { - set(0, value) - return this - } - - override fun value2(value: String?): FlywaySchemaHistoryRecord { - set(1, value) - return this - } - - override fun value3(value: String?): FlywaySchemaHistoryRecord { - set(2, value) - return this - } - - override fun value4(value: String?): FlywaySchemaHistoryRecord { - set(3, value) - return this - } - - override fun value5(value: String?): FlywaySchemaHistoryRecord { - set(4, value) - return this - } - - override fun value6(value: Int?): FlywaySchemaHistoryRecord { - set(5, value) - return this - } - - override fun value7(value: String?): FlywaySchemaHistoryRecord { - set(6, value) - return this - } - - override fun value8(value: LocalDateTime?): FlywaySchemaHistoryRecord { - set(7, value) - return this - } - - override fun value9(value: Int?): FlywaySchemaHistoryRecord { - set(8, value) - return this - } - - override fun value10(value: Boolean?): FlywaySchemaHistoryRecord { - set(9, value) - return this - } - - override fun values(value1: Int?, value2: String?, value3: String?, value4: String?, value5: String?, value6: Int?, value7: String?, value8: LocalDateTime?, value9: Int?, value10: Boolean?): FlywaySchemaHistoryRecord { - this.value1(value1) - this.value2(value2) - this.value3(value3) - this.value4(value4) - this.value5(value5) - this.value6(value6) - this.value7(value7) - this.value8(value8) - this.value9(value9) - this.value10(value10) - return this - } - /** * Create a detached, initialised FlywaySchemaHistoryRecord */ diff --git a/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/records/OsuApiKeysRecord.kt b/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/records/OsuApiKeysRecord.kt index 9b7082d..4e9c2f6 100644 --- a/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/records/OsuApiKeysRecord.kt +++ b/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/records/OsuApiKeysRecord.kt @@ -8,10 +8,7 @@ import com.nisemoe.generated.tables.OsuApiKeys import java.time.OffsetDateTime -import org.jooq.Field import org.jooq.Record1 -import org.jooq.Record5 -import org.jooq.Row5 import org.jooq.impl.UpdatableRecordImpl @@ -19,7 +16,7 @@ import org.jooq.impl.UpdatableRecordImpl * This class is generated by jOOQ. */ @Suppress("UNCHECKED_CAST") -open class OsuApiKeysRecord private constructor() : UpdatableRecordImpl(OsuApiKeys.OSU_API_KEYS), Record5 { +open class OsuApiKeysRecord private constructor() : UpdatableRecordImpl(OsuApiKeys.OSU_API_KEYS) { open var id: Int? set(value): Unit = set(0, value) @@ -51,62 +48,6 @@ open class OsuApiKeysRecord private constructor() : UpdatableRecordImpl = super.key() as Record1 - // ------------------------------------------------------------------------- - // Record5 type implementation - // ------------------------------------------------------------------------- - - override fun fieldsRow(): Row5 = super.fieldsRow() as Row5 - override fun valuesRow(): Row5 = super.valuesRow() as Row5 - override fun field1(): Field = OsuApiKeys.OSU_API_KEYS.ID - override fun field2(): Field = OsuApiKeys.OSU_API_KEYS.API_KEY - override fun field3(): Field = OsuApiKeys.OSU_API_KEYS.CREATED_AT - override fun field4(): Field = OsuApiKeys.OSU_API_KEYS.IS_VALID - override fun field5(): Field = OsuApiKeys.OSU_API_KEYS.IS_ACTIVE - override fun component1(): Int? = id - override fun component2(): String = apiKey - override fun component3(): OffsetDateTime? = createdAt - override fun component4(): Boolean? = isValid - override fun component5(): Boolean? = isActive - override fun value1(): Int? = id - override fun value2(): String = apiKey - override fun value3(): OffsetDateTime? = createdAt - override fun value4(): Boolean? = isValid - override fun value5(): Boolean? = isActive - - override fun value1(value: Int?): OsuApiKeysRecord { - set(0, value) - return this - } - - override fun value2(value: String?): OsuApiKeysRecord { - set(1, value) - return this - } - - override fun value3(value: OffsetDateTime?): OsuApiKeysRecord { - set(2, value) - return this - } - - override fun value4(value: Boolean?): OsuApiKeysRecord { - set(3, value) - return this - } - - override fun value5(value: Boolean?): OsuApiKeysRecord { - set(4, value) - return this - } - - override fun values(value1: Int?, value2: String?, value3: OffsetDateTime?, value4: Boolean?, value5: Boolean?): OsuApiKeysRecord { - this.value1(value1) - this.value2(value2) - this.value3(value3) - this.value4(value4) - this.value5(value5) - return this - } - /** * Create a detached, initialised OsuApiKeysRecord */ diff --git a/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/records/RedditPostRecord.kt b/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/records/RedditPostRecord.kt index f8ca842..48c03c2 100644 --- a/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/records/RedditPostRecord.kt +++ b/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/records/RedditPostRecord.kt @@ -6,10 +6,7 @@ package com.nisemoe.generated.tables.records import com.nisemoe.generated.tables.RedditPost -import org.jooq.Field import org.jooq.Record1 -import org.jooq.Record5 -import org.jooq.Row5 import org.jooq.impl.UpdatableRecordImpl @@ -17,7 +14,7 @@ import org.jooq.impl.UpdatableRecordImpl * This class is generated by jOOQ. */ @Suppress("UNCHECKED_CAST") -open class RedditPostRecord private constructor() : UpdatableRecordImpl(RedditPost.REDDIT_POST), Record5 { +open class RedditPostRecord private constructor() : UpdatableRecordImpl(RedditPost.REDDIT_POST) { open var postId: String set(value): Unit = set(0, value) @@ -47,62 +44,6 @@ open class RedditPostRecord private constructor() : UpdatableRecordImpl = super.key() as Record1 - // ------------------------------------------------------------------------- - // Record5 type implementation - // ------------------------------------------------------------------------- - - override fun fieldsRow(): Row5 = super.fieldsRow() as Row5 - override fun valuesRow(): Row5 = super.valuesRow() as Row5 - override fun field1(): Field = RedditPost.REDDIT_POST.POST_ID - override fun field2(): Field = RedditPost.REDDIT_POST.TITLE - override fun field3(): Field = RedditPost.REDDIT_POST.CREATED_UTC - override fun field4(): Field = RedditPost.REDDIT_POST.URL - override fun field5(): Field = RedditPost.REDDIT_POST.IS_CHECKED - override fun component1(): String = postId - override fun component2(): String? = title - override fun component3(): Double? = createdUtc - override fun component4(): String? = url - override fun component5(): Boolean? = isChecked - override fun value1(): String = postId - override fun value2(): String? = title - override fun value3(): Double? = createdUtc - override fun value4(): String? = url - override fun value5(): Boolean? = isChecked - - override fun value1(value: String?): RedditPostRecord { - set(0, value) - return this - } - - override fun value2(value: String?): RedditPostRecord { - set(1, value) - return this - } - - override fun value3(value: Double?): RedditPostRecord { - set(2, value) - return this - } - - override fun value4(value: String?): RedditPostRecord { - set(3, value) - return this - } - - override fun value5(value: Boolean?): RedditPostRecord { - set(4, value) - return this - } - - override fun values(value1: String?, value2: String?, value3: Double?, value4: String?, value5: Boolean?): RedditPostRecord { - this.value1(value1) - this.value2(value2) - this.value3(value3) - this.value4(value4) - this.value5(value5) - return this - } - /** * Create a detached, initialised RedditPostRecord */ diff --git a/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/records/ScoresJudgementsRecord.kt b/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/records/ScoresJudgementsRecord.kt index 228c951..55f8c7a 100644 --- a/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/records/ScoresJudgementsRecord.kt +++ b/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/records/ScoresJudgementsRecord.kt @@ -7,10 +7,7 @@ package com.nisemoe.generated.tables.records import com.nisemoe.generated.enums.JudgementType import com.nisemoe.generated.tables.ScoresJudgements -import org.jooq.Field import org.jooq.Record1 -import org.jooq.Record9 -import org.jooq.Row9 import org.jooq.impl.UpdatableRecordImpl @@ -18,7 +15,7 @@ import org.jooq.impl.UpdatableRecordImpl * This class is generated by jOOQ. */ @Suppress("UNCHECKED_CAST") -open class ScoresJudgementsRecord private constructor() : UpdatableRecordImpl(ScoresJudgements.SCORES_JUDGEMENTS), Record9 { +open class ScoresJudgementsRecord private constructor() : UpdatableRecordImpl(ScoresJudgements.SCORES_JUDGEMENTS) { open var id: Int? set(value): Unit = set(0, value) @@ -62,98 +59,6 @@ open class ScoresJudgementsRecord private constructor() : UpdatableRecordImpl = super.key() as Record1 - // ------------------------------------------------------------------------- - // Record9 type implementation - // ------------------------------------------------------------------------- - - override fun fieldsRow(): Row9 = super.fieldsRow() as Row9 - override fun valuesRow(): Row9 = super.valuesRow() as Row9 - override fun field1(): Field = ScoresJudgements.SCORES_JUDGEMENTS.ID - override fun field2(): Field = ScoresJudgements.SCORES_JUDGEMENTS.TIME - override fun field3(): Field = ScoresJudgements.SCORES_JUDGEMENTS.X - override fun field4(): Field = ScoresJudgements.SCORES_JUDGEMENTS.Y - override fun field5(): Field = ScoresJudgements.SCORES_JUDGEMENTS.TYPE - override fun field6(): Field = ScoresJudgements.SCORES_JUDGEMENTS.DISTANCE_CENTER - override fun field7(): Field = ScoresJudgements.SCORES_JUDGEMENTS.DISTANCE_EDGE - override fun field8(): Field = ScoresJudgements.SCORES_JUDGEMENTS.ERROR - override fun field9(): Field = ScoresJudgements.SCORES_JUDGEMENTS.SCORE_ID - override fun component1(): Int? = id - override fun component2(): Double? = time - override fun component3(): Double? = x - override fun component4(): Double? = y - override fun component5(): JudgementType? = type - override fun component6(): Double? = distanceCenter - override fun component7(): Double? = distanceEdge - override fun component8(): Double? = error - override fun component9(): Int? = scoreId - override fun value1(): Int? = id - override fun value2(): Double? = time - override fun value3(): Double? = x - override fun value4(): Double? = y - override fun value5(): JudgementType? = type - override fun value6(): Double? = distanceCenter - override fun value7(): Double? = distanceEdge - override fun value8(): Double? = error - override fun value9(): Int? = scoreId - - override fun value1(value: Int?): ScoresJudgementsRecord { - set(0, value) - return this - } - - override fun value2(value: Double?): ScoresJudgementsRecord { - set(1, value) - return this - } - - override fun value3(value: Double?): ScoresJudgementsRecord { - set(2, value) - return this - } - - override fun value4(value: Double?): ScoresJudgementsRecord { - set(3, value) - return this - } - - override fun value5(value: JudgementType?): ScoresJudgementsRecord { - set(4, value) - return this - } - - override fun value6(value: Double?): ScoresJudgementsRecord { - set(5, value) - return this - } - - override fun value7(value: Double?): ScoresJudgementsRecord { - set(6, value) - return this - } - - override fun value8(value: Double?): ScoresJudgementsRecord { - set(7, value) - return this - } - - override fun value9(value: Int?): ScoresJudgementsRecord { - set(8, value) - return this - } - - override fun values(value1: Int?, value2: Double?, value3: Double?, value4: Double?, value5: JudgementType?, value6: Double?, value7: Double?, value8: Double?, value9: Int?): ScoresJudgementsRecord { - this.value1(value1) - this.value2(value2) - this.value3(value3) - this.value4(value4) - this.value5(value5) - this.value6(value6) - this.value7(value7) - this.value8(value8) - this.value9(value9) - return this - } - /** * Create a detached, initialised ScoresJudgementsRecord */ diff --git a/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/records/ScoresSimilarityRecord.kt b/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/records/ScoresSimilarityRecord.kt index e0c7f23..1642910 100644 --- a/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/records/ScoresSimilarityRecord.kt +++ b/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/records/ScoresSimilarityRecord.kt @@ -8,10 +8,7 @@ import com.nisemoe.generated.tables.ScoresSimilarity import java.time.LocalDateTime -import org.jooq.Field import org.jooq.Record1 -import org.jooq.Record10 -import org.jooq.Row10 import org.jooq.impl.UpdatableRecordImpl @@ -19,7 +16,7 @@ import org.jooq.impl.UpdatableRecordImpl * This class is generated by jOOQ. */ @Suppress("UNCHECKED_CAST") -open class ScoresSimilarityRecord private constructor() : UpdatableRecordImpl(ScoresSimilarity.SCORES_SIMILARITY), Record10 { +open class ScoresSimilarityRecord private constructor() : UpdatableRecordImpl(ScoresSimilarity.SCORES_SIMILARITY) { open var id: Int? set(value): Unit = set(0, value) @@ -67,107 +64,6 @@ open class ScoresSimilarityRecord private constructor() : UpdatableRecordImpl = super.key() as Record1 - // ------------------------------------------------------------------------- - // Record10 type implementation - // ------------------------------------------------------------------------- - - override fun fieldsRow(): Row10 = super.fieldsRow() as Row10 - override fun valuesRow(): Row10 = super.valuesRow() as Row10 - override fun field1(): Field = ScoresSimilarity.SCORES_SIMILARITY.ID - override fun field2(): Field = ScoresSimilarity.SCORES_SIMILARITY.BEATMAP_ID - override fun field3(): Field = ScoresSimilarity.SCORES_SIMILARITY.REPLAY_ID_1 - override fun field4(): Field = ScoresSimilarity.SCORES_SIMILARITY.REPLAY_ID_2 - override fun field5(): Field = ScoresSimilarity.SCORES_SIMILARITY.SIMILARITY - override fun field6(): Field = ScoresSimilarity.SCORES_SIMILARITY.CORRELATION - override fun field7(): Field = ScoresSimilarity.SCORES_SIMILARITY.CREATED_AT - override fun field8(): Field = ScoresSimilarity.SCORES_SIMILARITY.SENT_DISCORD_NOTIFICATION - override fun field9(): Field = ScoresSimilarity.SCORES_SIMILARITY.CG_SIMILARITY - override fun field10(): Field = ScoresSimilarity.SCORES_SIMILARITY.CG_CORRELATION - override fun component1(): Int? = id - override fun component2(): Int? = beatmapId - override fun component3(): Long? = replayId_1 - override fun component4(): Long? = replayId_2 - override fun component5(): Double? = similarity - override fun component6(): Double? = correlation - override fun component7(): LocalDateTime? = createdAt - override fun component8(): Boolean? = sentDiscordNotification - override fun component9(): Double? = cgSimilarity - override fun component10(): Double? = cgCorrelation - override fun value1(): Int? = id - override fun value2(): Int? = beatmapId - override fun value3(): Long? = replayId_1 - override fun value4(): Long? = replayId_2 - override fun value5(): Double? = similarity - override fun value6(): Double? = correlation - override fun value7(): LocalDateTime? = createdAt - override fun value8(): Boolean? = sentDiscordNotification - override fun value9(): Double? = cgSimilarity - override fun value10(): Double? = cgCorrelation - - override fun value1(value: Int?): ScoresSimilarityRecord { - set(0, value) - return this - } - - override fun value2(value: Int?): ScoresSimilarityRecord { - set(1, value) - return this - } - - override fun value3(value: Long?): ScoresSimilarityRecord { - set(2, value) - return this - } - - override fun value4(value: Long?): ScoresSimilarityRecord { - set(3, value) - return this - } - - override fun value5(value: Double?): ScoresSimilarityRecord { - set(4, value) - return this - } - - override fun value6(value: Double?): ScoresSimilarityRecord { - set(5, value) - return this - } - - override fun value7(value: LocalDateTime?): ScoresSimilarityRecord { - set(6, value) - return this - } - - override fun value8(value: Boolean?): ScoresSimilarityRecord { - set(7, value) - return this - } - - override fun value9(value: Double?): ScoresSimilarityRecord { - set(8, value) - return this - } - - override fun value10(value: Double?): ScoresSimilarityRecord { - set(9, value) - return this - } - - override fun values(value1: Int?, value2: Int?, value3: Long?, value4: Long?, value5: Double?, value6: Double?, value7: LocalDateTime?, value8: Boolean?, value9: Double?, value10: Double?): ScoresSimilarityRecord { - this.value1(value1) - this.value2(value2) - this.value3(value3) - this.value4(value4) - this.value5(value5) - this.value6(value6) - this.value7(value7) - this.value8(value8) - this.value9(value9) - this.value10(value10) - return this - } - /** * Create a detached, initialised ScoresSimilarityRecord */ diff --git a/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/records/UpdateUserQueueRecord.kt b/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/records/UpdateUserQueueRecord.kt index 28755b8..aa1b866 100644 --- a/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/records/UpdateUserQueueRecord.kt +++ b/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/records/UpdateUserQueueRecord.kt @@ -9,10 +9,7 @@ import com.nisemoe.generated.tables.UpdateUserQueue import java.time.LocalDateTime import java.time.OffsetDateTime -import org.jooq.Field import org.jooq.Record1 -import org.jooq.Record9 -import org.jooq.Row9 import org.jooq.impl.UpdatableRecordImpl @@ -20,7 +17,7 @@ import org.jooq.impl.UpdatableRecordImpl * This class is generated by jOOQ. */ @Suppress("UNCHECKED_CAST") -open class UpdateUserQueueRecord private constructor() : UpdatableRecordImpl(UpdateUserQueue.UPDATE_USER_QUEUE), Record9 { +open class UpdateUserQueueRecord private constructor() : UpdatableRecordImpl(UpdateUserQueue.UPDATE_USER_QUEUE) { open var id: Int? set(value): Unit = set(0, value) @@ -64,98 +61,6 @@ open class UpdateUserQueueRecord private constructor() : UpdatableRecordImpl = super.key() as Record1 - // ------------------------------------------------------------------------- - // Record9 type implementation - // ------------------------------------------------------------------------- - - override fun fieldsRow(): Row9 = super.fieldsRow() as Row9 - override fun valuesRow(): Row9 = super.valuesRow() as Row9 - override fun field1(): Field = UpdateUserQueue.UPDATE_USER_QUEUE.ID - override fun field2(): Field = UpdateUserQueue.UPDATE_USER_QUEUE.USER_ID - override fun field3(): Field = UpdateUserQueue.UPDATE_USER_QUEUE.PROCESSED - override fun field4(): Field = UpdateUserQueue.UPDATE_USER_QUEUE.CREATED_AT - override fun field5(): Field = UpdateUserQueue.UPDATE_USER_QUEUE.PROCESSED_AT - override fun field6(): Field = UpdateUserQueue.UPDATE_USER_QUEUE.PROGRESS_CURRENT - override fun field7(): Field = UpdateUserQueue.UPDATE_USER_QUEUE.PROGRESS_TOTAL - override fun field8(): Field = UpdateUserQueue.UPDATE_USER_QUEUE.ADDED_BY_USER_ID - override fun field9(): Field = UpdateUserQueue.UPDATE_USER_QUEUE.HAS_FAILED - override fun component1(): Int? = id - override fun component2(): Long = userId - override fun component3(): Boolean? = processed - override fun component4(): LocalDateTime? = createdAt - override fun component5(): OffsetDateTime? = processedAt - override fun component6(): Int? = progressCurrent - override fun component7(): Int? = progressTotal - override fun component8(): Long? = addedByUserId - override fun component9(): Boolean? = hasFailed - override fun value1(): Int? = id - override fun value2(): Long = userId - override fun value3(): Boolean? = processed - override fun value4(): LocalDateTime? = createdAt - override fun value5(): OffsetDateTime? = processedAt - override fun value6(): Int? = progressCurrent - override fun value7(): Int? = progressTotal - override fun value8(): Long? = addedByUserId - override fun value9(): Boolean? = hasFailed - - override fun value1(value: Int?): UpdateUserQueueRecord { - set(0, value) - return this - } - - override fun value2(value: Long?): UpdateUserQueueRecord { - set(1, value) - return this - } - - override fun value3(value: Boolean?): UpdateUserQueueRecord { - set(2, value) - return this - } - - override fun value4(value: LocalDateTime?): UpdateUserQueueRecord { - set(3, value) - return this - } - - override fun value5(value: OffsetDateTime?): UpdateUserQueueRecord { - set(4, value) - return this - } - - override fun value6(value: Int?): UpdateUserQueueRecord { - set(5, value) - return this - } - - override fun value7(value: Int?): UpdateUserQueueRecord { - set(6, value) - return this - } - - override fun value8(value: Long?): UpdateUserQueueRecord { - set(7, value) - return this - } - - override fun value9(value: Boolean?): UpdateUserQueueRecord { - set(8, value) - return this - } - - override fun values(value1: Int?, value2: Long?, value3: Boolean?, value4: LocalDateTime?, value5: OffsetDateTime?, value6: Int?, value7: Int?, value8: Long?, value9: Boolean?): UpdateUserQueueRecord { - this.value1(value1) - this.value2(value2) - this.value3(value3) - this.value4(value4) - this.value5(value5) - this.value6(value6) - this.value7(value7) - this.value8(value8) - this.value9(value9) - return this - } - /** * Create a detached, initialised UpdateUserQueueRecord */ diff --git a/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/records/UserFollowsRecord.kt b/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/records/UserFollowsRecord.kt index 0f8d034..33093eb 100644 --- a/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/records/UserFollowsRecord.kt +++ b/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/records/UserFollowsRecord.kt @@ -6,9 +6,7 @@ package com.nisemoe.generated.tables.records import com.nisemoe.generated.tables.UserFollows -import org.jooq.Field import org.jooq.Record2 -import org.jooq.Row2 import org.jooq.impl.UpdatableRecordImpl @@ -16,7 +14,7 @@ import org.jooq.impl.UpdatableRecordImpl * This class is generated by jOOQ. */ @Suppress("UNCHECKED_CAST") -open class UserFollowsRecord private constructor() : UpdatableRecordImpl(UserFollows.USER_FOLLOWS), Record2 { +open class UserFollowsRecord private constructor() : UpdatableRecordImpl(UserFollows.USER_FOLLOWS) { open var userId: Long? set(value): Unit = set(0, value) @@ -32,35 +30,6 @@ open class UserFollowsRecord private constructor() : UpdatableRecordImpl = super.key() as Record2 - // ------------------------------------------------------------------------- - // Record2 type implementation - // ------------------------------------------------------------------------- - - override fun fieldsRow(): Row2 = super.fieldsRow() as Row2 - override fun valuesRow(): Row2 = super.valuesRow() as Row2 - override fun field1(): Field = UserFollows.USER_FOLLOWS.USER_ID - override fun field2(): Field = UserFollows.USER_FOLLOWS.FOLLOWS_USER_ID - override fun component1(): Long? = userId - override fun component2(): Long? = followsUserId - override fun value1(): Long? = userId - override fun value2(): Long? = followsUserId - - override fun value1(value: Long?): UserFollowsRecord { - set(0, value) - return this - } - - override fun value2(value: Long?): UserFollowsRecord { - set(1, value) - return this - } - - override fun values(value1: Long?, value2: Long?): UserFollowsRecord { - this.value1(value1) - this.value2(value2) - return this - } - /** * Create a detached, initialised UserFollowsRecord */ diff --git a/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/records/UserScoresSimilarityRecord.kt b/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/records/UserScoresSimilarityRecord.kt index 5fdc01d..a6b783c 100644 --- a/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/records/UserScoresSimilarityRecord.kt +++ b/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/records/UserScoresSimilarityRecord.kt @@ -9,10 +9,7 @@ import com.nisemoe.generated.tables.UserScoresSimilarity import java.time.OffsetDateTime import java.util.UUID -import org.jooq.Field import org.jooq.Record1 -import org.jooq.Record9 -import org.jooq.Row9 import org.jooq.impl.UpdatableRecordImpl @@ -20,7 +17,7 @@ import org.jooq.impl.UpdatableRecordImpl * This class is generated by jOOQ. */ @Suppress("UNCHECKED_CAST") -open class UserScoresSimilarityRecord private constructor() : UpdatableRecordImpl(UserScoresSimilarity.USER_SCORES_SIMILARITY), Record9 { +open class UserScoresSimilarityRecord private constructor() : UpdatableRecordImpl(UserScoresSimilarity.USER_SCORES_SIMILARITY) { open var id: Int? set(value): Unit = set(0, value) @@ -64,98 +61,6 @@ open class UserScoresSimilarityRecord private constructor() : UpdatableRecordImp override fun key(): Record1 = super.key() as Record1 - // ------------------------------------------------------------------------- - // Record9 type implementation - // ------------------------------------------------------------------------- - - override fun fieldsRow(): Row9 = super.fieldsRow() as Row9 - override fun valuesRow(): Row9 = super.valuesRow() as Row9 - override fun field1(): Field = UserScoresSimilarity.USER_SCORES_SIMILARITY.ID - override fun field2(): Field = UserScoresSimilarity.USER_SCORES_SIMILARITY.BEATMAP_ID - override fun field3(): Field = UserScoresSimilarity.USER_SCORES_SIMILARITY.REPLAY_ID_USER - override fun field4(): Field = UserScoresSimilarity.USER_SCORES_SIMILARITY.REPLAY_ID_OSU - override fun field5(): Field = UserScoresSimilarity.USER_SCORES_SIMILARITY.SIMILARITY - override fun field6(): Field = UserScoresSimilarity.USER_SCORES_SIMILARITY.CORRELATION - override fun field7(): Field = UserScoresSimilarity.USER_SCORES_SIMILARITY.CREATED_AT - override fun field8(): Field = UserScoresSimilarity.USER_SCORES_SIMILARITY.CG_SIMILARITY - override fun field9(): Field = UserScoresSimilarity.USER_SCORES_SIMILARITY.CG_CORRELATION - override fun component1(): Int? = id - override fun component2(): Int? = beatmapId - override fun component3(): UUID? = replayIdUser - override fun component4(): Long? = replayIdOsu - override fun component5(): Double? = similarity - override fun component6(): Double? = correlation - override fun component7(): OffsetDateTime? = createdAt - override fun component8(): Double? = cgSimilarity - override fun component9(): Double? = cgCorrelation - override fun value1(): Int? = id - override fun value2(): Int? = beatmapId - override fun value3(): UUID? = replayIdUser - override fun value4(): Long? = replayIdOsu - override fun value5(): Double? = similarity - override fun value6(): Double? = correlation - override fun value7(): OffsetDateTime? = createdAt - override fun value8(): Double? = cgSimilarity - override fun value9(): Double? = cgCorrelation - - override fun value1(value: Int?): UserScoresSimilarityRecord { - set(0, value) - return this - } - - override fun value2(value: Int?): UserScoresSimilarityRecord { - set(1, value) - return this - } - - override fun value3(value: UUID?): UserScoresSimilarityRecord { - set(2, value) - return this - } - - override fun value4(value: Long?): UserScoresSimilarityRecord { - set(3, value) - return this - } - - override fun value5(value: Double?): UserScoresSimilarityRecord { - set(4, value) - return this - } - - override fun value6(value: Double?): UserScoresSimilarityRecord { - set(5, value) - return this - } - - override fun value7(value: OffsetDateTime?): UserScoresSimilarityRecord { - set(6, value) - return this - } - - override fun value8(value: Double?): UserScoresSimilarityRecord { - set(7, value) - return this - } - - override fun value9(value: Double?): UserScoresSimilarityRecord { - set(8, value) - return this - } - - override fun values(value1: Int?, value2: Int?, value3: UUID?, value4: Long?, value5: Double?, value6: Double?, value7: OffsetDateTime?, value8: Double?, value9: Double?): UserScoresSimilarityRecord { - this.value1(value1) - this.value2(value2) - this.value3(value3) - this.value4(value4) - this.value5(value5) - this.value6(value6) - this.value7(value7) - this.value8(value8) - this.value9(value9) - return this - } - /** * Create a detached, initialised UserScoresSimilarityRecord */ diff --git a/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/records/UsersRecord.kt b/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/records/UsersRecord.kt index adfb36c..cf8cb89 100644 --- a/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/records/UsersRecord.kt +++ b/nise-backend/src/main/kotlin/com/nisemoe/generated/tables/records/UsersRecord.kt @@ -9,10 +9,7 @@ import com.nisemoe.generated.tables.Users import java.time.LocalDateTime import java.time.OffsetDateTime -import org.jooq.Field import org.jooq.Record1 -import org.jooq.Record20 -import org.jooq.Row20 import org.jooq.impl.UpdatableRecordImpl @@ -20,7 +17,7 @@ import org.jooq.impl.UpdatableRecordImpl * This class is generated by jOOQ. */ @Suppress("UNCHECKED_CAST") -open class UsersRecord private constructor() : UpdatableRecordImpl(Users.USERS), Record20 { +open class UsersRecord private constructor() : UpdatableRecordImpl(Users.USERS) { open var userId: Long? set(value): Unit = set(0, value) @@ -112,197 +109,6 @@ open class UsersRecord private constructor() : UpdatableRecordImpl( override fun key(): Record1 = super.key() as Record1 - // ------------------------------------------------------------------------- - // Record20 type implementation - // ------------------------------------------------------------------------- - - override fun fieldsRow(): Row20 = super.fieldsRow() as Row20 - override fun valuesRow(): Row20 = super.valuesRow() as Row20 - override fun field1(): Field = Users.USERS.USER_ID - override fun field2(): Field = Users.USERS.USERNAME - override fun field3(): Field = Users.USERS.JOIN_DATE - override fun field4(): Field = Users.USERS.COUNTRY - override fun field5(): Field = Users.USERS.COUNTRY_RANK - override fun field6(): Field = Users.USERS.RANK - override fun field7(): Field = Users.USERS.PP_RAW - override fun field8(): Field = Users.USERS.ACCURACY - override fun field9(): Field = Users.USERS.PLAYCOUNT - override fun field10(): Field = Users.USERS.TOTAL_SCORE - override fun field11(): Field = Users.USERS.RANKED_SCORE - override fun field12(): Field = Users.USERS.SECONDS_PLAYED - override fun field13(): Field = Users.USERS.COUNT_100 - override fun field14(): Field = Users.USERS.COUNT_300 - override fun field15(): Field = Users.USERS.COUNT_50 - override fun field16(): Field = Users.USERS.SYS_LAST_UPDATE - override fun field17(): Field = Users.USERS.IS_ADMIN - override fun field18(): Field = Users.USERS.COUNT_MISS - override fun field19(): Field = Users.USERS.IS_BANNED - override fun field20(): Field = Users.USERS.APPROX_BAN_DATE - override fun component1(): Long? = userId - override fun component2(): String? = username - override fun component3(): LocalDateTime? = joinDate - override fun component4(): String? = country - override fun component5(): Long? = countryRank - override fun component6(): Long? = rank - override fun component7(): Double? = ppRaw - override fun component8(): Double? = accuracy - override fun component9(): Long? = playcount - override fun component10(): Long? = totalScore - override fun component11(): Long? = rankedScore - override fun component12(): Long? = secondsPlayed - override fun component13(): Long? = count_100 - override fun component14(): Long? = count_300 - override fun component15(): Long? = count_50 - override fun component16(): OffsetDateTime? = sysLastUpdate - override fun component17(): Boolean? = isAdmin - override fun component18(): Long? = countMiss - override fun component19(): Boolean? = isBanned - override fun component20(): OffsetDateTime? = approxBanDate - override fun value1(): Long? = userId - override fun value2(): String? = username - override fun value3(): LocalDateTime? = joinDate - override fun value4(): String? = country - override fun value5(): Long? = countryRank - override fun value6(): Long? = rank - override fun value7(): Double? = ppRaw - override fun value8(): Double? = accuracy - override fun value9(): Long? = playcount - override fun value10(): Long? = totalScore - override fun value11(): Long? = rankedScore - override fun value12(): Long? = secondsPlayed - override fun value13(): Long? = count_100 - override fun value14(): Long? = count_300 - override fun value15(): Long? = count_50 - override fun value16(): OffsetDateTime? = sysLastUpdate - override fun value17(): Boolean? = isAdmin - override fun value18(): Long? = countMiss - override fun value19(): Boolean? = isBanned - override fun value20(): OffsetDateTime? = approxBanDate - - override fun value1(value: Long?): UsersRecord { - set(0, value) - return this - } - - override fun value2(value: String?): UsersRecord { - set(1, value) - return this - } - - override fun value3(value: LocalDateTime?): UsersRecord { - set(2, value) - return this - } - - override fun value4(value: String?): UsersRecord { - set(3, value) - return this - } - - override fun value5(value: Long?): UsersRecord { - set(4, value) - return this - } - - override fun value6(value: Long?): UsersRecord { - set(5, value) - return this - } - - override fun value7(value: Double?): UsersRecord { - set(6, value) - return this - } - - override fun value8(value: Double?): UsersRecord { - set(7, value) - return this - } - - override fun value9(value: Long?): UsersRecord { - set(8, value) - return this - } - - override fun value10(value: Long?): UsersRecord { - set(9, value) - return this - } - - override fun value11(value: Long?): UsersRecord { - set(10, value) - return this - } - - override fun value12(value: Long?): UsersRecord { - set(11, value) - return this - } - - override fun value13(value: Long?): UsersRecord { - set(12, value) - return this - } - - override fun value14(value: Long?): UsersRecord { - set(13, value) - return this - } - - override fun value15(value: Long?): UsersRecord { - set(14, value) - return this - } - - override fun value16(value: OffsetDateTime?): UsersRecord { - set(15, value) - return this - } - - override fun value17(value: Boolean?): UsersRecord { - set(16, value) - return this - } - - override fun value18(value: Long?): UsersRecord { - set(17, value) - return this - } - - override fun value19(value: Boolean?): UsersRecord { - set(18, value) - return this - } - - override fun value20(value: OffsetDateTime?): UsersRecord { - set(19, 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?, value19: Boolean?, value20: OffsetDateTime?): UsersRecord { - this.value1(value1) - this.value2(value2) - this.value3(value3) - this.value4(value4) - this.value5(value5) - this.value6(value6) - this.value7(value7) - this.value8(value8) - this.value9(value9) - this.value10(value10) - this.value11(value11) - this.value12(value12) - this.value13(value13) - this.value14(value14) - this.value15(value15) - this.value16(value16) - this.value17(value17) - this.value18(value18) - this.value19(value19) - this.value20(value20) - return this - } - /** * Create a detached, initialised UsersRecord */ diff --git a/nise-backend/src/main/kotlin/com/nisemoe/nise/controller/BanlistController.kt b/nise-backend/src/main/kotlin/com/nisemoe/nise/controller/BanlistController.kt index 0e9d351..e48671c 100644 --- a/nise-backend/src/main/kotlin/com/nisemoe/nise/controller/BanlistController.kt +++ b/nise-backend/src/main/kotlin/com/nisemoe/nise/controller/BanlistController.kt @@ -38,7 +38,7 @@ class BanlistController( ) { val totalPages: Int - get() = if (totalResults % pageSize == 0) totalResults / pageSize else totalResults / pageSize + 1 + get() = if (totalResults == 0) 1 else (totalResults + pageSize - 1) / pageSize } diff --git a/nise-frontend/Build.sh b/nise-frontend/Build.sh index 25d3264..f287ffa 100755 --- a/nise-frontend/Build.sh +++ b/nise-frontend/Build.sh @@ -2,7 +2,7 @@ # Set variables IMAGE_NAME="nise-frontend" -IMAGE_REGISTRY="git.gengo.tech/nuff" +IMAGE_REGISTRY="git.nise.moe/nuff" IMAGE_VERSION="latest" rm -rf target/