feat: add codegen files
This commit is contained in:
parent
5eb6fc4f78
commit
df1870121f
14 changed files with 505 additions and 0 deletions
|
|
@ -0,0 +1,43 @@
|
|||
/*
|
||||
* This file is generated by jOOQ.
|
||||
*/
|
||||
package at.dokkae.homepage.generated.jooq
|
||||
|
||||
|
||||
import kotlin.collections.List
|
||||
|
||||
import org.jooq.Constants
|
||||
import org.jooq.Schema
|
||||
import org.jooq.impl.CatalogImpl
|
||||
|
||||
|
||||
/**
|
||||
* This class is generated by jOOQ.
|
||||
*/
|
||||
@Suppress("warnings")
|
||||
open class DefaultCatalog : CatalogImpl("") {
|
||||
companion object {
|
||||
|
||||
/**
|
||||
* The reference instance of <code>DEFAULT_CATALOG</code>
|
||||
*/
|
||||
val DEFAULT_CATALOG: DefaultCatalog = DefaultCatalog()
|
||||
}
|
||||
|
||||
/**
|
||||
* standard public schema
|
||||
*/
|
||||
val PUBLIC: Public get(): Public = Public.PUBLIC
|
||||
|
||||
override fun getSchemas(): List<Schema> = listOf(
|
||||
Public.PUBLIC
|
||||
)
|
||||
|
||||
/**
|
||||
* A reference to the 3.20 minor release of the code generator. If this
|
||||
* doesn't compile, it's because the runtime library uses an older minor
|
||||
* release, namely: 3.20. You can turn off the generation of this reference
|
||||
* by specifying /configuration/generator/generate/jooqVersionReference
|
||||
*/
|
||||
private val REQUIRE_RUNTIME_JOOQ_VERSION = Constants.VERSION_3_20
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
* This file is generated by jOOQ.
|
||||
*/
|
||||
package at.dokkae.homepage.generated.jooq
|
||||
|
||||
|
||||
import at.dokkae.homepage.generated.jooq.tables.Message
|
||||
|
||||
import kotlin.collections.List
|
||||
|
||||
import org.jooq.Catalog
|
||||
import org.jooq.Table
|
||||
import org.jooq.impl.DSL
|
||||
import org.jooq.impl.SchemaImpl
|
||||
|
||||
|
||||
/**
|
||||
* standard public schema
|
||||
*/
|
||||
@Suppress("warnings")
|
||||
open class Public : SchemaImpl(DSL.name("public"), DefaultCatalog.DEFAULT_CATALOG, DSL.comment("standard public schema")) {
|
||||
companion object {
|
||||
|
||||
/**
|
||||
* The reference instance of <code>public</code>
|
||||
*/
|
||||
val PUBLIC: Public = Public()
|
||||
}
|
||||
|
||||
/**
|
||||
* The table <code>public.message</code>.
|
||||
*/
|
||||
val MESSAGE: Message get() = Message.MESSAGE
|
||||
|
||||
override fun getCatalog(): Catalog = DefaultCatalog.DEFAULT_CATALOG
|
||||
|
||||
override fun getTables(): List<Table<*>> = listOf(
|
||||
Message.MESSAGE
|
||||
)
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
@file:Suppress("warnings")
|
||||
/*
|
||||
* This file is generated by jOOQ.
|
||||
*/
|
||||
package at.dokkae.homepage.generated.jooq.keys
|
||||
|
||||
|
||||
import at.dokkae.homepage.generated.jooq.tables.Message
|
||||
import at.dokkae.homepage.generated.jooq.tables.records.MessageRecord
|
||||
|
||||
import org.jooq.UniqueKey
|
||||
import org.jooq.impl.DSL
|
||||
import org.jooq.impl.Internal
|
||||
|
||||
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// UNIQUE and PRIMARY KEY definitions
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
val MESSAGE_PKEY: UniqueKey<MessageRecord> = Internal.createUniqueKey(Message.MESSAGE, DSL.name("message_pkey"), arrayOf(Message.MESSAGE.ID), true)
|
||||
|
|
@ -0,0 +1,187 @@
|
|||
/*
|
||||
* This file is generated by jOOQ.
|
||||
*/
|
||||
package at.dokkae.homepage.generated.jooq.tables
|
||||
|
||||
|
||||
import at.dokkae.homepage.generated.jooq.Public
|
||||
import at.dokkae.homepage.generated.jooq.keys.MESSAGE_PKEY
|
||||
import at.dokkae.homepage.generated.jooq.tables.records.MessageRecord
|
||||
|
||||
import java.time.OffsetDateTime
|
||||
import java.util.UUID
|
||||
|
||||
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.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.UniqueKey
|
||||
import org.jooq.impl.DSL
|
||||
import org.jooq.impl.SQLDataType
|
||||
import org.jooq.impl.TableImpl
|
||||
|
||||
|
||||
/**
|
||||
* This class is generated by jOOQ.
|
||||
*/
|
||||
@Suppress("warnings")
|
||||
open class Message(
|
||||
alias: Name,
|
||||
path: Table<out Record>?,
|
||||
childPath: ForeignKey<out Record, MessageRecord>?,
|
||||
parentPath: InverseForeignKey<out Record, MessageRecord>?,
|
||||
aliased: Table<MessageRecord>?,
|
||||
parameters: Array<Field<*>?>?,
|
||||
where: Condition?
|
||||
): TableImpl<MessageRecord>(
|
||||
alias,
|
||||
Public.PUBLIC,
|
||||
path,
|
||||
childPath,
|
||||
parentPath,
|
||||
aliased,
|
||||
parameters,
|
||||
DSL.comment(""),
|
||||
TableOptions.table(),
|
||||
where,
|
||||
) {
|
||||
companion object {
|
||||
|
||||
/**
|
||||
* The reference instance of <code>public.message</code>
|
||||
*/
|
||||
val MESSAGE: Message = Message()
|
||||
}
|
||||
|
||||
/**
|
||||
* The class holding records for this type
|
||||
*/
|
||||
override fun getRecordType(): Class<MessageRecord> = MessageRecord::class.java
|
||||
|
||||
/**
|
||||
* The column <code>public.message.id</code>.
|
||||
*/
|
||||
val ID: TableField<MessageRecord, UUID?> = createField(DSL.name("id"), SQLDataType.UUID.nullable(false), this, "")
|
||||
|
||||
/**
|
||||
* The column <code>public.message.author</code>.
|
||||
*/
|
||||
val AUTHOR: TableField<MessageRecord, String?> = createField(DSL.name("author"), SQLDataType.VARCHAR(31).nullable(false), this, "")
|
||||
|
||||
/**
|
||||
* The column <code>public.message.content</code>.
|
||||
*/
|
||||
val CONTENT: TableField<MessageRecord, String?> = createField(DSL.name("content"), SQLDataType.VARCHAR(255).nullable(false), this, "")
|
||||
|
||||
/**
|
||||
* The column <code>public.message.created_at</code>.
|
||||
*/
|
||||
val CREATED_AT: TableField<MessageRecord, OffsetDateTime?> = createField(DSL.name("created_at"), SQLDataType.TIMESTAMPWITHTIMEZONE(6).nullable(false).defaultValue(DSL.field(DSL.raw("CURRENT_TIMESTAMP"), SQLDataType.TIMESTAMPWITHTIMEZONE)), this, "")
|
||||
|
||||
/**
|
||||
* The column <code>public.message.updated_at</code>.
|
||||
*/
|
||||
val UPDATED_AT: TableField<MessageRecord, OffsetDateTime?> = createField(DSL.name("updated_at"), SQLDataType.TIMESTAMPWITHTIMEZONE(6), this, "")
|
||||
|
||||
private constructor(alias: Name, aliased: Table<MessageRecord>?): this(alias, null, null, null, aliased, null, null)
|
||||
private constructor(alias: Name, aliased: Table<MessageRecord>?, parameters: Array<Field<*>?>?): this(alias, null, null, null, aliased, parameters, null)
|
||||
private constructor(alias: Name, aliased: Table<MessageRecord>?, where: Condition?): this(alias, null, null, null, aliased, null, where)
|
||||
|
||||
/**
|
||||
* Create an aliased <code>public.message</code> table reference
|
||||
*/
|
||||
constructor(alias: String): this(DSL.name(alias))
|
||||
|
||||
/**
|
||||
* Create an aliased <code>public.message</code> table reference
|
||||
*/
|
||||
constructor(alias: Name): this(alias, null)
|
||||
|
||||
/**
|
||||
* Create a <code>public.message</code> table reference
|
||||
*/
|
||||
constructor(): this(DSL.name("message"), null)
|
||||
override fun getSchema(): Schema? = if (aliased()) null else Public.PUBLIC
|
||||
override fun getPrimaryKey(): UniqueKey<MessageRecord> = MESSAGE_PKEY
|
||||
override fun `as`(alias: String): Message = Message(DSL.name(alias), this)
|
||||
override fun `as`(alias: Name): Message = Message(alias, this)
|
||||
override fun `as`(alias: Table<*>): Message = Message(alias.qualifiedName, this)
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
override fun rename(name: String): Message = Message(DSL.name(name), null)
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
override fun rename(name: Name): Message = Message(name, null)
|
||||
|
||||
/**
|
||||
* Rename this table
|
||||
*/
|
||||
override fun rename(name: Table<*>): Message = Message(name.qualifiedName, null)
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
override fun where(condition: Condition?): Message = Message(qualifiedName, if (aliased()) this else null, condition)
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
override fun where(conditions: Collection<Condition>): Message = where(DSL.and(conditions))
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
override fun where(vararg conditions: Condition?): Message = where(DSL.and(*conditions))
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
override fun where(condition: Field<Boolean?>?): Message = where(DSL.condition(condition))
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@PlainSQL override fun where(condition: SQL): Message = where(DSL.condition(condition))
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@PlainSQL override fun where(@Stringly.SQL condition: String): Message = where(DSL.condition(condition))
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@PlainSQL override fun where(@Stringly.SQL condition: String, vararg binds: Any?): Message = where(DSL.condition(condition, *binds))
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
@PlainSQL override fun where(@Stringly.SQL condition: String, vararg parts: QueryPart): Message = where(DSL.condition(condition, *parts))
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
override fun whereExists(select: Select<*>): Message = where(DSL.exists(select))
|
||||
|
||||
/**
|
||||
* Create an inline derived table from this table
|
||||
*/
|
||||
override fun whereNotExists(select: Select<*>): Message = where(DSL.notExists(select))
|
||||
}
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
/*
|
||||
* This file is generated by jOOQ.
|
||||
*/
|
||||
package at.dokkae.homepage.generated.jooq.tables.pojos
|
||||
|
||||
|
||||
import java.io.Serializable
|
||||
import java.time.OffsetDateTime
|
||||
import java.util.UUID
|
||||
|
||||
|
||||
/**
|
||||
* This class is generated by jOOQ.
|
||||
*/
|
||||
@Suppress("warnings")
|
||||
data class Message(
|
||||
val id: UUID,
|
||||
val author: String,
|
||||
val content: String,
|
||||
val createdAt: OffsetDateTime? = null,
|
||||
val updatedAt: OffsetDateTime? = null
|
||||
): Serializable {
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
if (this === other)
|
||||
return true
|
||||
if (other == null)
|
||||
return false
|
||||
if (this::class != other::class)
|
||||
return false
|
||||
val o: Message = other as Message
|
||||
if (this.id != o.id)
|
||||
return false
|
||||
if (this.author != o.author)
|
||||
return false
|
||||
if (this.content != o.content)
|
||||
return false
|
||||
if (this.createdAt == null) {
|
||||
if (o.createdAt != null)
|
||||
return false
|
||||
}
|
||||
else if (this.createdAt != o.createdAt)
|
||||
return false
|
||||
if (this.updatedAt == null) {
|
||||
if (o.updatedAt != null)
|
||||
return false
|
||||
}
|
||||
else if (this.updatedAt != o.updatedAt)
|
||||
return false
|
||||
return true
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
val prime = 31
|
||||
var result = 1
|
||||
result = prime * result + this.id.hashCode()
|
||||
result = prime * result + this.author.hashCode()
|
||||
result = prime * result + this.content.hashCode()
|
||||
result = prime * result + (if (this.createdAt == null) 0 else this.createdAt.hashCode())
|
||||
result = prime * result + (if (this.updatedAt == null) 0 else this.updatedAt.hashCode())
|
||||
return result
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
val sb = StringBuilder("Message (")
|
||||
|
||||
sb.append(id)
|
||||
sb.append(", ").append(author)
|
||||
sb.append(", ").append(content)
|
||||
sb.append(", ").append(createdAt)
|
||||
sb.append(", ").append(updatedAt)
|
||||
|
||||
sb.append(")")
|
||||
return sb.toString()
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
/*
|
||||
* This file is generated by jOOQ.
|
||||
*/
|
||||
package at.dokkae.homepage.generated.jooq.tables.records
|
||||
|
||||
|
||||
import at.dokkae.homepage.generated.jooq.tables.Message
|
||||
|
||||
import java.time.OffsetDateTime
|
||||
import java.util.UUID
|
||||
|
||||
import org.jooq.Record1
|
||||
import org.jooq.impl.UpdatableRecordImpl
|
||||
|
||||
|
||||
/**
|
||||
* This class is generated by jOOQ.
|
||||
*/
|
||||
@Suppress("warnings")
|
||||
open class MessageRecord private constructor() : UpdatableRecordImpl<MessageRecord>(Message.MESSAGE) {
|
||||
|
||||
open var id: UUID
|
||||
set(value): Unit = set(0, value)
|
||||
get(): UUID = get(0) as UUID
|
||||
|
||||
open var author: String
|
||||
set(value): Unit = set(1, value)
|
||||
get(): String = get(1) as String
|
||||
|
||||
open var content: String
|
||||
set(value): Unit = set(2, value)
|
||||
get(): String = get(2) as String
|
||||
|
||||
open var createdAt: OffsetDateTime?
|
||||
set(value): Unit = set(3, value)
|
||||
get(): OffsetDateTime? = get(3) as OffsetDateTime?
|
||||
|
||||
open var updatedAt: OffsetDateTime?
|
||||
set(value): Unit = set(4, value)
|
||||
get(): OffsetDateTime? = get(4) as OffsetDateTime?
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Primary key information
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
override fun key(): Record1<UUID?> = super.key() as Record1<UUID?>
|
||||
|
||||
/**
|
||||
* Create a detached, initialised MessageRecord
|
||||
*/
|
||||
constructor(id: UUID, author: String, content: String, createdAt: OffsetDateTime? = null, updatedAt: OffsetDateTime? = null): this() {
|
||||
this.id = id
|
||||
this.author = author
|
||||
this.content = content
|
||||
this.createdAt = createdAt
|
||||
this.updatedAt = updatedAt
|
||||
resetTouchedOnNotNull()
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a detached, initialised MessageRecord
|
||||
*/
|
||||
constructor(value: at.dokkae.homepage.generated.jooq.tables.pojos.Message?): this() {
|
||||
if (value != null) {
|
||||
this.id = value.id
|
||||
this.author = value.author
|
||||
this.content = value.content
|
||||
this.createdAt = value.createdAt
|
||||
this.updatedAt = value.updatedAt
|
||||
resetTouchedOnNotNull()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
@file:Suppress("warnings")
|
||||
/*
|
||||
* This file is generated by jOOQ.
|
||||
*/
|
||||
package at.dokkae.homepage.generated.jooq.tables.references
|
||||
|
||||
|
||||
import at.dokkae.homepage.generated.jooq.tables.Message
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* The table <code>public.message</code>.
|
||||
*/
|
||||
val MESSAGE: Message = Message.MESSAGE
|
||||
Loading…
Add table
Add a link
Reference in a new issue