import com.spotright.polidoro.model._
// In some later scopeimport CompositeFactory.CF
val composite = CF("TX", 77043, "Houston")
The CF application uses the CV{N} case class constructors and end up returning a
com.netflix.astyanax.model.Composite which has a trait applied which allows
the gte and lte methods on the CV{N} case classes to be called. This is very
helpful in range queries such as
val start = CF("Houston")
val needsWork = (scfCities \ city).list(start = start, end = start.gte)
Please note that these helper methods do not modify the Composite components. There are String helpers in
the model package to increment and decrement the last character of a string. In particular for lte to do
what you expect you need to decr the final string component.
Builder for Composites
The simplest way to use this object is
The CF application uses the CV{N} case class constructors and end up returning a com.netflix.astyanax.model.Composite which has a trait applied which allows the
gte
andlte
methods on the CV{N} case classes to be called. This is very helpful in range queries such asPlease note that these helper methods do not modify the Composite components. There are String helpers in the model package to increment and decrement the last character of a string. In particular for
lte
to do what you expect you need todecr
the final string component.com.spotright.polidoro.model.PrefixPredicateCF