-
Notifications
You must be signed in to change notification settings - Fork 2
/
CassandraAsyncRepository.scala
24 lines (16 loc) · 1.11 KB
/
CassandraAsyncRepository.scala
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package pl.jozwik.quillgeneric.quillmacro.cassandra.async
import io.getquill.{ CassandraAsyncContext, NamingStrategy }
import pl.jozwik.quillgeneric.quillmacro.async.AsyncCrudWithContext.AsyncCrudWithContextDateQuotesUnit
import pl.jozwik.quillgeneric.quillmacro.async.AsyncRepository
import pl.jozwik.quillgeneric.quillmacro.cassandra.async.CassandraAsyncRepository.CassandraAsyncContextDateQuotes
import pl.jozwik.quillgeneric.quillmacro.{ CompositeKey, WithId, WithUpdate }
object CassandraAsyncRepository {
type CassandraAsyncContextDateQuotes[N <: NamingStrategy] = CassandraAsyncContext[N] with AsyncCrudWithContextDateQuotesUnit
}
trait CassandraAsyncRepository[K, T <: WithId[K], N <: NamingStrategy] extends AsyncRepository[K, T] with WithUpdate[Unit] with WithCassandraAsyncContext[N] {
protected def dynamicSchema: context.DynamicEntityQuery[T]
}
trait CassandraAsyncRepositoryCompositeKey[K <: CompositeKey[_, _], T <: WithId[K], N <: NamingStrategy] extends CassandraAsyncRepository[K, T, N]
trait WithCassandraAsyncContext[N <: NamingStrategy] {
protected val context: CassandraAsyncContextDateQuotes[N]
}