-
Notifications
You must be signed in to change notification settings - Fork 186
Counter columns
Flavian Alexandru edited this page May 29, 2015
·
5 revisions
phantom supports using Counter columns out of the box. To learn about counters, first read this.
The companion test table is here.
The available operations and the tests are here.
import com.websudos.phantom.dsl._
class CounterTableTest extends CassandraTable[CounterTableTest, CounterRecord] {
object id extends UUIDColumn(this) with PartitionKey[UUID]
object count_entries extends CounterColumn(this)
def fromRow(row: Row): CounterRecord = {
CounterRecord(id(row), count_entries(row))
}
}
object CounterTableTest extends CounterTableTest {
override val tableName = "counter_column_test"
}
To stay up-to-date with our latest releases and news, follow us on Twitter: @outworkers.
- Issues and questions
- Adopters
- Roadmap
- Changelog
- Tutorials
- Commercial support
- Using phantom in your project
- Primitive columns
- Optional primitive columns
- Collection columns
- Collection operators
- Automated schema generation
- Indexing columns
- Data modeling with phantom
- Querying with phantom
- Asynchronous iterators
- Batch statements
- Apache Thrift integration
- Apache ZooKeeper integration
- The phantom testkit