This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Create a Class | |
CreateClass({ name: "orders" }) | |
#Create an Index | |
CreateIndex( | |
{ | |
name: "orders_index", | |
source: Class("orders"), | |
values: [{ field: ["data", "orderId"], reverse:true }, { field: ["ref"] }], | |
serialized: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#create class | |
CreateClass({ name: "ledger" }) | |
#create index | |
CreateIndex( | |
{ | |
name: "UNIQUE_ENTRY_CONSTRAINT", | |
source: Class("ledger"), | |
terms: [{ field: ["data", "clientId"] }], | |
values: [{ field: ["data", "counter"] }], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import zhttp.service.{ChannelFactory, Client, EventLoopGroup} | |
import zio.{Tag, ZEnvironment, ZIO, ZLayer} | |
trait NumService: | |
val get: ZIO[Any, Throwable, Int] | |
final case class NumServiceLive(c: ChannelFactory, e: EventLoopGroup) extends NumService: | |
val url = "https://random-num-x5ht4amjia-uc.a.run.app/" | |
val get: ZIO[Any, Throwable, Int] = | |
val request = |
OlderNewer