Initial Commit of Gjallarhorn: A Heimdall Analytics Tool

This commit is contained in:
Kenneth Endfinger
2021-12-26 03:33:23 -05:00
parent cbbefc94a2
commit ff665c27f5
13 changed files with 257 additions and 6 deletions

View File

@ -1,7 +1,7 @@
dependencies {
implementation("org.postgresql:postgresql:42.3.1")
implementation("org.jetbrains.exposed:exposed-jdbc:0.36.2")
implementation("org.jetbrains.exposed:exposed-java-time:0.36.2")
implementation("com.zaxxer:HikariCP:5.0.0")
api("org.postgresql:postgresql:42.3.1")
api("org.jetbrains.exposed:exposed-jdbc:0.36.2")
api("org.jetbrains.exposed:exposed-java-time:0.36.2")
api("com.zaxxer:HikariCP:5.0.0")
compileOnly(project(":foundation-core"))
}

View File

@ -0,0 +1,17 @@
package cloud.kubelet.foundation.heimdall.view
import org.jetbrains.exposed.sql.Table
import org.jetbrains.exposed.sql.javatime.timestamp
object BlockChangeView : Table("block_changes") {
val isBreak = bool("break")
val time = timestamp("time")
val player = uuid("player")
val world = uuid("world")
val x = double("x")
val y = double("y")
val z = double("z")
val pitch = double("pitch")
val yaw = double("yaw")
val block = text("block")
}

View File

@ -118,3 +118,5 @@ create table if not exists heimdall.entity_kills (
);
--
select create_hypertable('heimdall.entity_kills', 'time', 'player', 4, if_not_exists => TRUE);
--
create or replace view heimdall.block_changes as select true as break, * from heimdall.block_breaks union all select false as break, * from heimdall.block_places;