aerospike-scala icon indicating copy to clipboard operation
aerospike-scala copied to clipboard

Typesafe DSL for work with Aerospike Database

Results 9 aerospike-scala issues
Sort by recently updated
recently updated
newest added

`class SpikeImpl(spikeClient: IAsyncClient)(implicit val ec: ExecutionContext)` and some of its methods (`getByKey` for example) require ExecutionContext independently.

* This class does not contain credentials.

Instead of working just with `aerospikescala` DSL it's needed to know about `aerospikemacro` and `aerospikedomain` subproject. It brings knowledge complexity and misunderstanding. For example typical import: ``` import ru.tinkoff.aerospike.dsl.{CallKB, SpikeImpl}...

``` println(Await.result( spike.getByKey[String, Seq[ArrayBuffer[Double]]]("1-1111A1", Nil).collect { case (xs, _, _) if xs.head._2.isDefined ⇒ xs.head._2.get }, Duration.Inf ).getClass) ``` returns: `class java.util.ArrayList`

AClient.scala `val hosts = scala.util.Try(List(config.getString("ru-tinkoff-aerospike-dsl.example-host"))).toOption .getOrElse(throw new Exception("Add host for aerospike in application.conf file"))` `toOption` is redundant. `Try` already contains `getOrElse` method.

![image](https://cloud.githubusercontent.com/assets/3683866/20622397/b2e47e18-b313-11e6-8f41-774fa1967b45.png) SpikeImpl inherits directly java client and brings it legacy to scala API. It would be cool to make API concise and intuitive.

It's needed to subscribe on WriteListener to retrieve errors that appeared during writing into Aerospike. It's could be implemented via Promise. At now only exceptions in direct method call could...