|
| 1 | +/* |
| 2 | + * This file is generated by jOOQ. |
| 3 | + */ |
| 4 | +package io.heapy.kotbot.database.tables |
| 5 | + |
| 6 | + |
| 7 | +import io.heapy.kotbot.database.Public |
| 8 | +import io.heapy.kotbot.database.keys.UPDATE_RAW_PK |
| 9 | +import io.heapy.kotbot.database.tables.records.UpdateRawRecord |
| 10 | + |
| 11 | +import java.time.LocalDateTime |
| 12 | +import java.util.function.Function |
| 13 | + |
| 14 | +import org.jooq.Field |
| 15 | +import org.jooq.ForeignKey |
| 16 | +import org.jooq.JSONB |
| 17 | +import org.jooq.Name |
| 18 | +import org.jooq.Record |
| 19 | +import org.jooq.Records |
| 20 | +import org.jooq.Row3 |
| 21 | +import org.jooq.Schema |
| 22 | +import org.jooq.SelectField |
| 23 | +import org.jooq.Table |
| 24 | +import org.jooq.TableField |
| 25 | +import org.jooq.TableOptions |
| 26 | +import org.jooq.UniqueKey |
| 27 | +import org.jooq.impl.DSL |
| 28 | +import org.jooq.impl.Internal |
| 29 | +import org.jooq.impl.SQLDataType |
| 30 | +import org.jooq.impl.TableImpl |
| 31 | + |
| 32 | + |
| 33 | +/** |
| 34 | + * This class is generated by jOOQ. |
| 35 | + */ |
| 36 | +@Suppress("UNCHECKED_CAST") |
| 37 | +open class UpdateRaw( |
| 38 | + alias: Name, |
| 39 | + child: Table<out Record>?, |
| 40 | + path: ForeignKey<out Record, UpdateRawRecord>?, |
| 41 | + aliased: Table<UpdateRawRecord>?, |
| 42 | + parameters: Array<Field<*>?>? |
| 43 | +): TableImpl<UpdateRawRecord>( |
| 44 | + alias, |
| 45 | + Public.PUBLIC, |
| 46 | + child, |
| 47 | + path, |
| 48 | + aliased, |
| 49 | + parameters, |
| 50 | + DSL.comment(""), |
| 51 | + TableOptions.table() |
| 52 | +) { |
| 53 | + companion object { |
| 54 | + |
| 55 | + /** |
| 56 | + * The reference instance of <code>public.update_raw</code> |
| 57 | + */ |
| 58 | + val UPDATE_RAW: UpdateRaw = UpdateRaw() |
| 59 | + } |
| 60 | + |
| 61 | + /** |
| 62 | + * The class holding records for this type |
| 63 | + */ |
| 64 | + override fun getRecordType(): Class<UpdateRawRecord> = UpdateRawRecord::class.java |
| 65 | + |
| 66 | + /** |
| 67 | + * The column <code>public.update_raw.id</code>. |
| 68 | + */ |
| 69 | + val ID: TableField<UpdateRawRecord, Long?> = createField(DSL.name("id"), SQLDataType.BIGINT.nullable(false), this, "") |
| 70 | + |
| 71 | + /** |
| 72 | + * The column <code>public.update_raw.created</code>. |
| 73 | + */ |
| 74 | + val CREATED: TableField<UpdateRawRecord, LocalDateTime?> = createField(DSL.name("created"), SQLDataType.LOCALDATETIME(6).nullable(false), this, "") |
| 75 | + |
| 76 | + /** |
| 77 | + * The column <code>public.update_raw.update</code>. |
| 78 | + */ |
| 79 | + val UPDATE: TableField<UpdateRawRecord, JSONB?> = createField(DSL.name("update"), SQLDataType.JSONB.nullable(false), this, "") |
| 80 | + |
| 81 | + private constructor(alias: Name, aliased: Table<UpdateRawRecord>?): this(alias, null, null, aliased, null) |
| 82 | + private constructor(alias: Name, aliased: Table<UpdateRawRecord>?, parameters: Array<Field<*>?>?): this(alias, null, null, aliased, parameters) |
| 83 | + |
| 84 | + /** |
| 85 | + * Create an aliased <code>public.update_raw</code> table reference |
| 86 | + */ |
| 87 | + constructor(alias: String): this(DSL.name(alias)) |
| 88 | + |
| 89 | + /** |
| 90 | + * Create an aliased <code>public.update_raw</code> table reference |
| 91 | + */ |
| 92 | + constructor(alias: Name): this(alias, null) |
| 93 | + |
| 94 | + /** |
| 95 | + * Create a <code>public.update_raw</code> table reference |
| 96 | + */ |
| 97 | + constructor(): this(DSL.name("update_raw"), null) |
| 98 | + |
| 99 | + constructor(child: Table<out Record>, key: ForeignKey<out Record, UpdateRawRecord>): this(Internal.createPathAlias(child, key), child, key, UPDATE_RAW, null) |
| 100 | + override fun getSchema(): Schema? = if (aliased()) null else Public.PUBLIC |
| 101 | + override fun getPrimaryKey(): UniqueKey<UpdateRawRecord> = UPDATE_RAW_PK |
| 102 | + override fun `as`(alias: String): UpdateRaw = UpdateRaw(DSL.name(alias), this) |
| 103 | + override fun `as`(alias: Name): UpdateRaw = UpdateRaw(alias, this) |
| 104 | + override fun `as`(alias: Table<*>): UpdateRaw = UpdateRaw(alias.getQualifiedName(), this) |
| 105 | + |
| 106 | + /** |
| 107 | + * Rename this table |
| 108 | + */ |
| 109 | + override fun rename(name: String): UpdateRaw = UpdateRaw(DSL.name(name), null) |
| 110 | + |
| 111 | + /** |
| 112 | + * Rename this table |
| 113 | + */ |
| 114 | + override fun rename(name: Name): UpdateRaw = UpdateRaw(name, null) |
| 115 | + |
| 116 | + /** |
| 117 | + * Rename this table |
| 118 | + */ |
| 119 | + override fun rename(name: Table<*>): UpdateRaw = UpdateRaw(name.getQualifiedName(), null) |
| 120 | + |
| 121 | + // ------------------------------------------------------------------------- |
| 122 | + // Row3 type methods |
| 123 | + // ------------------------------------------------------------------------- |
| 124 | + override fun fieldsRow(): Row3<Long?, LocalDateTime?, JSONB?> = super.fieldsRow() as Row3<Long?, LocalDateTime?, JSONB?> |
| 125 | + |
| 126 | + /** |
| 127 | + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. |
| 128 | + */ |
| 129 | + fun <U> mapping(from: (Long?, LocalDateTime?, JSONB?) -> U): SelectField<U> = convertFrom(Records.mapping(from)) |
| 130 | + |
| 131 | + /** |
| 132 | + * Convenience mapping calling {@link SelectField#convertFrom(Class, |
| 133 | + * Function)}. |
| 134 | + */ |
| 135 | + fun <U> mapping(toType: Class<U>, from: (Long?, LocalDateTime?, JSONB?) -> U): SelectField<U> = convertFrom(toType, Records.mapping(from)) |
| 136 | +} |
0 commit comments