Skip to content

Commit

Permalink
Nothing to see here
Browse files Browse the repository at this point in the history
  • Loading branch information
IRus committed May 16, 2024
1 parent 998ac62 commit bfc9716
Show file tree
Hide file tree
Showing 37 changed files with 1,145 additions and 641 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM bellsoft/liberica-openjre-alpine:21.0.1
FROM bellsoft/liberica-openjre-alpine:21.0.3
COPY /build/install/backend /opt/backend
COPY /frontend/dist /opt/frontend
ENTRYPOINT /opt/backend/bin/backend
15 changes: 6 additions & 9 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_21
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion

plugins {
Expand All @@ -12,15 +13,11 @@ repositories {
}

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_21.toString()

languageVersion = KotlinVersion.KOTLIN_2_0.version
apiVersion = KotlinVersion.KOTLIN_2_0.version

freeCompilerArgs = freeCompilerArgs + listOf(
"-Xcontext-receivers",
)
compilerOptions {
jvmTarget.set(JVM_21)
languageVersion.set(KotlinVersion.KOTLIN_2_0)
apiVersion.set(KotlinVersion.KOTLIN_2_0)
freeCompilerArgs.add("-Xcontext-receivers")
}
}

Expand Down
21 changes: 17 additions & 4 deletions database/src/main/kotlin/io/heapy/komok/database/Public.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@
package io.heapy.komok.database


import io.heapy.komok.database.tables.Person
import io.heapy.komok.database.sequences.ENTITY_ID_SEQ
import io.heapy.komok.database.tables.Entity
import io.heapy.komok.database.tables.Iface

import kotlin.collections.List

import org.jooq.Catalog
import org.jooq.Sequence
import org.jooq.Table
import org.jooq.impl.SchemaImpl

Expand All @@ -27,13 +30,23 @@ open class Public : SchemaImpl("public", DefaultCatalog.DEFAULT_CATALOG) {
}

/**
* The table <code>public.person</code>.
* The table <code>public.entity</code>.
*/
val PERSON: Person get() = Person.PERSON
val ENTITY: Entity get() = Entity.ENTITY

/**
* The table <code>public.iface</code>.
*/
val IFACE: Iface get() = Iface.IFACE

override fun getCatalog(): Catalog = DefaultCatalog.DEFAULT_CATALOG

override fun getSequences(): List<Sequence<*>> = listOf(
ENTITY_ID_SEQ
)

override fun getTables(): List<Table<*>> = listOf(
Person.PERSON
Entity.ENTITY,
Iface.IFACE
)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* This file is generated by jOOQ.
*/
package io.heapy.komok.database.indexes


import io.heapy.komok.database.tables.Entity
import io.heapy.komok.database.tables.Iface

import org.jooq.Index
import org.jooq.impl.DSL
import org.jooq.impl.Internal



// -------------------------------------------------------------------------
// INDEX definitions
// -------------------------------------------------------------------------

val IDX_ENTITY_ATTRIBUTE: Index = Internal.createIndex(DSL.name("idx_entity_attribute"), Entity.ENTITY, arrayOf(Entity.ENTITY.ATTRIBUTE), false)
val IDX_ENTITY_ID: Index = Internal.createIndex(DSL.name("idx_entity_id"), Entity.ENTITY, arrayOf(Entity.ENTITY.ENTITY_ID), false)
val IDX_ENTITY_ID_TX_OP: Index = Internal.createIndex(DSL.name("idx_entity_id_tx_op"), Entity.ENTITY, arrayOf(Entity.ENTITY.ENTITY_ID, Entity.ENTITY.TX, Entity.ENTITY.OP), false)
val IDX_ENTITY_TX: Index = Internal.createIndex(DSL.name("idx_entity_tx"), Entity.ENTITY, arrayOf(Entity.ENTITY.TX), false)
val IDX_INTERFACE_ID: Index = Internal.createIndex(DSL.name("idx_interface_id"), Iface.IFACE, arrayOf(Iface.IFACE.ID), false)
6 changes: 3 additions & 3 deletions database/src/main/kotlin/io/heapy/komok/database/keys/Keys.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
package io.heapy.komok.database.keys


import io.heapy.komok.database.tables.Person
import io.heapy.komok.database.tables.records.PersonRecord
import io.heapy.komok.database.tables.Iface
import io.heapy.komok.database.tables.records.IfaceRecord

import org.jooq.UniqueKey
import org.jooq.impl.DSL
Expand All @@ -17,4 +17,4 @@ import org.jooq.impl.Internal
// UNIQUE and PRIMARY KEY definitions
// -------------------------------------------------------------------------

val PERSON_PKEY: UniqueKey<PersonRecord> = Internal.createUniqueKey(Person.PERSON, DSL.name("person_pkey"), arrayOf(Person.PERSON.ID), true)
val IFACE_PKEY: UniqueKey<IfaceRecord> = Internal.createUniqueKey(Iface.IFACE, DSL.name("iface_pkey"), arrayOf(Iface.IFACE.ID), true)
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* This file is generated by jOOQ.
*/
package io.heapy.komok.database.sequences


import io.heapy.komok.database.Public

import org.jooq.Sequence
import org.jooq.impl.Internal
import org.jooq.impl.SQLDataType



/**
* The sequence <code>public.entity_id_seq</code>
*/
val ENTITY_ID_SEQ: Sequence<Long> = Internal.createSequence("entity_id_seq", Public.PUBLIC, SQLDataType.BIGINT.nullable(false), null, null, null, null, false, null)
191 changes: 191 additions & 0 deletions database/src/main/kotlin/io/heapy/komok/database/tables/Entity.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
/*
* This file is generated by jOOQ.
*/
package io.heapy.komok.database.tables


import io.heapy.komok.database.Public
import io.heapy.komok.database.indexes.IDX_ENTITY_ATTRIBUTE
import io.heapy.komok.database.indexes.IDX_ENTITY_ID
import io.heapy.komok.database.indexes.IDX_ENTITY_ID_TX_OP
import io.heapy.komok.database.indexes.IDX_ENTITY_TX
import io.heapy.komok.database.tables.records.EntityRecord

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.Index
import org.jooq.InverseForeignKey
import org.jooq.JSONB
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.impl.DSL
import org.jooq.impl.SQLDataType
import org.jooq.impl.TableImpl


/**
* This class is generated by jOOQ.
*/
@Suppress("UNCHECKED_CAST")
open class Entity(
alias: Name,
path: Table<out Record>?,
childPath: ForeignKey<out Record, EntityRecord>?,
parentPath: InverseForeignKey<out Record, EntityRecord>?,
aliased: Table<EntityRecord>?,
parameters: Array<Field<*>?>?,
where: Condition?
): TableImpl<EntityRecord>(
alias,
Public.PUBLIC,
path,
childPath,
parentPath,
aliased,
parameters,
DSL.comment(""),
TableOptions.table(),
where,
) {
companion object {

/**
* The reference instance of <code>public.entity</code>
*/
val ENTITY: Entity = Entity()
}

/**
* The class holding records for this type
*/
override fun getRecordType(): Class<EntityRecord> = EntityRecord::class.java

/**
* The column <code>public.entity.entity_id</code>.
*/
val ENTITY_ID: TableField<EntityRecord, Long?> = createField(DSL.name("entity_id"), SQLDataType.BIGINT.nullable(false).identity(true), this, "")

/**
* The column <code>public.entity.attribute</code>.
*/
val ATTRIBUTE: TableField<EntityRecord, String?> = createField(DSL.name("attribute"), SQLDataType.VARCHAR(255).nullable(false), this, "")

/**
* The column <code>public.entity.value</code>.
*/
val VALUE: TableField<EntityRecord, JSONB?> = createField(DSL.name("value"), SQLDataType.JSONB, this, "")

/**
* The column <code>public.entity.tx</code>.
*/
val TX: TableField<EntityRecord, Long?> = createField(DSL.name("tx"), SQLDataType.BIGINT.nullable(false), this, "")

/**
* The column <code>public.entity.op</code>.
*/
val OP: TableField<EntityRecord, Boolean?> = createField(DSL.name("op"), SQLDataType.BOOLEAN.nullable(false), this, "")

private constructor(alias: Name, aliased: Table<EntityRecord>?): this(alias, null, null, null, aliased, null, null)
private constructor(alias: Name, aliased: Table<EntityRecord>?, parameters: Array<Field<*>?>?): this(alias, null, null, null, aliased, parameters, null)
private constructor(alias: Name, aliased: Table<EntityRecord>?, where: Condition?): this(alias, null, null, null, aliased, null, where)

/**
* Create an aliased <code>public.entity</code> table reference
*/
constructor(alias: String): this(DSL.name(alias))

/**
* Create an aliased <code>public.entity</code> table reference
*/
constructor(alias: Name): this(alias, null)

/**
* Create a <code>public.entity</code> table reference
*/
constructor(): this(DSL.name("entity"), null)
override fun getSchema(): Schema? = if (aliased()) null else Public.PUBLIC
override fun getIndexes(): List<Index> = listOf(IDX_ENTITY_ATTRIBUTE, IDX_ENTITY_ID, IDX_ENTITY_ID_TX_OP, IDX_ENTITY_TX)
override fun getIdentity(): Identity<EntityRecord, Long?> = super.getIdentity() as Identity<EntityRecord, Long?>
override fun `as`(alias: String): Entity = Entity(DSL.name(alias), this)
override fun `as`(alias: Name): Entity = Entity(alias, this)
override fun `as`(alias: Table<*>): Entity = Entity(alias.qualifiedName, this)

/**
* Rename this table
*/
override fun rename(name: String): Entity = Entity(DSL.name(name), null)

/**
* Rename this table
*/
override fun rename(name: Name): Entity = Entity(name, null)

/**
* Rename this table
*/
override fun rename(name: Table<*>): Entity = Entity(name.qualifiedName, null)

/**
* Create an inline derived table from this table
*/
override fun where(condition: Condition?): Entity = Entity(qualifiedName, if (aliased()) this else null, condition)

/**
* Create an inline derived table from this table
*/
override fun where(conditions: Collection<Condition>): Entity = where(DSL.and(conditions))

/**
* Create an inline derived table from this table
*/
override fun where(vararg conditions: Condition?): Entity = where(DSL.and(*conditions))

/**
* Create an inline derived table from this table
*/
override fun where(condition: Field<Boolean?>?): Entity = where(DSL.condition(condition))

/**
* Create an inline derived table from this table
*/
@PlainSQL override fun where(condition: SQL): Entity = where(DSL.condition(condition))

/**
* Create an inline derived table from this table
*/
@PlainSQL override fun where(@Stringly.SQL condition: String): Entity = where(DSL.condition(condition))

/**
* Create an inline derived table from this table
*/
@PlainSQL override fun where(@Stringly.SQL condition: String, vararg binds: Any?): Entity = where(DSL.condition(condition, *binds))

/**
* Create an inline derived table from this table
*/
@PlainSQL override fun where(@Stringly.SQL condition: String, vararg parts: QueryPart): Entity = where(DSL.condition(condition, *parts))

/**
* Create an inline derived table from this table
*/
override fun whereExists(select: Select<*>): Entity = where(DSL.exists(select))

/**
* Create an inline derived table from this table
*/
override fun whereNotExists(select: Select<*>): Entity = where(DSL.notExists(select))
}
Loading

0 comments on commit bfc9716

Please sign in to comment.