/* * This file is generated by jOOQ. */ package golf.handicap.generated.tables import golf.handicap.generated.DefaultSchema import golf.handicap.generated.keys.MEMBER__MEMBER_GROUP_ID_FOREIGN import golf.handicap.generated.tables.Groups.GroupsPath import golf.handicap.generated.tables.records.MemberRecord import kotlin.collections.Collection import kotlin.collections.List import org.jooq.Condition import org.jooq.Field import org.jooq.ForeignKey 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 import org.jooq.impl.DSL import org.jooq.impl.Internal import org.jooq.impl.SQLDataType import org.jooq.impl.TableImpl /** * This class is generated by jOOQ. */ @Suppress("UNCHECKED_CAST") open class Member( alias: Name, path: Table?, childPath: ForeignKey?, parentPath: InverseForeignKey?, aliased: Table?, parameters: Array?>?, where: Condition? ): TableImpl( alias, DefaultSchema.DEFAULT_SCHEMA, path, childPath, parentPath, aliased, parameters, DSL.comment(""), TableOptions.table(), where, ) { companion object { /** * The reference instance of member */ val MEMBER: Member = Member() } /** * The class holding records for this type */ override fun getRecordType(): Class = MemberRecord::class.java /** * The column member.group_id. */ val GROUP_ID: TableField = createField(DSL.name("group_id"), SQLDataType.INTEGER.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.INTEGER)), this, "") /** * The column member.user_id. */ val USER_ID: TableField = createField(DSL.name("user_id"), SQLDataType.INTEGER.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.INTEGER)), this, "") 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 member table reference */ constructor(alias: String): this(DSL.name(alias)) /** * Create an aliased member table reference */ constructor(alias: Name): this(alias, null) /** * Create a member table reference */ constructor(): this(DSL.name("member"), null) constructor(path: Table, childPath: ForeignKey?, parentPath: InverseForeignKey?): this(Internal.createPathAlias(path, childPath, parentPath), path, childPath, parentPath, MEMBER, null, null) /** * A subtype implementing {@link Path} for simplified path-based joins. */ open class MemberPath : Member, 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): MemberPath = MemberPath(DSL.name(alias), this) override fun `as`(alias: Name): MemberPath = MemberPath(alias, this) override fun `as`(alias: Table<*>): MemberPath = MemberPath(alias.qualifiedName, this) } override fun getSchema(): Schema? = if (aliased()) null else DefaultSchema.DEFAULT_SCHEMA override fun getReferences(): List> = listOf(MEMBER__MEMBER_GROUP_ID_FOREIGN) private lateinit var _groups: GroupsPath /** * Get the implicit join path to the public.groups table. */ fun groups(): GroupsPath { if (!this::_groups.isInitialized) _groups = GroupsPath(this, MEMBER__MEMBER_GROUP_ID_FOREIGN, null) return _groups; } val groups: GroupsPath get(): GroupsPath = groups() override fun `as`(alias: String): Member = Member(DSL.name(alias), this) override fun `as`(alias: Name): Member = Member(alias, this) override fun `as`(alias: Table<*>): Member = Member(alias.qualifiedName, this) /** * Rename this table */ override fun rename(name: String): Member = Member(DSL.name(name), null) /** * Rename this table */ override fun rename(name: Name): Member = Member(name, null) /** * Rename this table */ override fun rename(name: Table<*>): Member = Member(name.qualifiedName, null) /** * Create an inline derived table from this table */ override fun where(condition: Condition?): Member = Member(qualifiedName, if (aliased()) this else null, condition) /** * Create an inline derived table from this table */ override fun where(conditions: Collection): Member = where(DSL.and(conditions)) /** * Create an inline derived table from this table */ override fun where(vararg conditions: Condition?): Member = where(DSL.and(*conditions)) /** * Create an inline derived table from this table */ override fun where(condition: Field?): Member = where(DSL.condition(condition)) /** * Create an inline derived table from this table */ @PlainSQL override fun where(condition: SQL): Member = where(DSL.condition(condition)) /** * Create an inline derived table from this table */ @PlainSQL override fun where(@Stringly.SQL condition: String): Member = where(DSL.condition(condition)) /** * Create an inline derived table from this table */ @PlainSQL override fun where(@Stringly.SQL condition: String, vararg binds: Any?): Member = where(DSL.condition(condition, *binds)) /** * Create an inline derived table from this table */ @PlainSQL override fun where(@Stringly.SQL condition: String, vararg parts: QueryPart): Member = where(DSL.condition(condition, *parts)) /** * Create an inline derived table from this table */ override fun whereExists(select: Select<*>): Member = where(DSL.exists(select)) /** * Create an inline derived table from this table */ override fun whereNotExists(select: Select<*>): Member = where(DSL.notExists(select)) }