Skip to main content
Version: Previous

Quick start - add business logic

So far, you have a table; now we want to be able to see its content and create new entries.

Data Server

A Data Server provides real-time data to the front end. You must define the Data Server in the file alpha-dataserver.kts.

dataServer {
query("ALL_TRADES", TRADE)
}

Event Handler

Next, we want to be able to insert rows into our table. For this, you need to define an Event Handler in the file alpha-eventhandler.kts.

eventHandler {

eventHandler<Trade>(name = "TRADE_INSERT") {
onCommit { event ->
entityDb.insert(event.details)
ack()
}
}

}