libraryDependencies += "io.github.vlmiroshnikov" %% "aero-core" % "<version>"
import cats.*
import cats.effect.*
import cats.syntax.all.*
import com.aerospike.client.cdt.{ ListOperation, ListReturnType, MapOperation, MapPolicy }
import com.aerospike.client.query.Statement
import io.github.vlmiroshnikov.aero.codecs.*
import io.github.vlmiroshnikov.aero.*
object SimpleApp extends IOApp.Simple {
case class Rec(list: List[String], double: Double) derives RecordEncoder, RecordDecoder
def run: IO[Unit] = {
AeroClient[IO](List("localhost"), 3000).use { ac=>
given AeroClient[IO] = ac
given Schema = Schema(namespace = "test", set= "sample")
val record = Rec(List("a", "b", "c"), 100.0)
for
_ <- put("key", record)
r <- get("key", as[Rec])
_ <- IO.println(r.toString)
yield r == record
}
}
}