hello everyone! I have a problem with pagination. I can't figure out the proper setup for reading the result in pages.
after reading the first page:
select .where(_.email eqs email) .orderBy(_.timestamp.descending) .paginateRecord(_.setFetchSize(numItems))
when I want to use the returned
pagingState to retrieve the next page
select .where(_.email eqs email) .orderBy(_.timestamp.descending) .paginateRecord(pagingState)
I get all the remaining records instead of the next page (of size
numItems from the first call).
Trying to add
orderBy and before
paginateRecord in the second call results in
PagingStateException: Paging state mismatch, this means that either the paging state contents were altered, or you're trying to apply it to a different statement.
Any ideas what I am doing wrong?
Thanks in advance!
pagingStateon the filtering statement:
select .where(_.email eqs email) .orderBy(_.timestamp.descending) .paginateRecord(_.setPagingState(pagingState).setFetchSize(numItems))
If I try and add a
def save(record: JsonClass): Future[ResultSet] = store(record).future() method to
It won't compile and i get the error
no implicit parameters thl
cql(“SELECT * from ….).future()
I have a question !!
I can run the following cql in cassandra
select * from activation_events where customerid = 18 and (campaignid, entityid) in ((91, 'X'),(94, 'Y'));
How can I write the same in phantom dsl as
select .where(_.customerId in ?) .and(_.campaignId in ?) // Here I need to have it as tuple for campaignId and entityid .consistencyLevel_=(ConsistencyLevel.ONE) .prepare()
Please note that campaignid and entityid are seperate columns and not a tuple. As I said I am able to run the query using cql
Hello everyone! I'm currently moving from phantom-dsl 2.13.4 to 2.59.0. Back in 2.13.4 I used to have a Seq of insertQueries of different tables like this
val inserts = Seq[InsertQuery[_ >: TableA with TableB with TableC <: Table[_ >: TableA with TableB with TableC, _ >: TableARecord with TableBRecord with TableCRecord], _ >: TableARecord with TableBRecord with TableCRecord <: Product, Unspecified, HNil]]
And with that I was able to map them and execute each with the
future() like this: (which looks like is part of the
inserts.map(insert => insert.consistencyLevel_=(LOCAL_QUORUM).future())
But now that I'm working on 2.59.0 I'm not able to do the same. Is there a workaround provided by phantom? or should I split the list into single table statements?
~. I searched Phantom docs as well as github and couldn't find an example. Could you be so kind to show an example of how to translate
(campaignid, entityid) in ((91, 'X'),(94, 'Y'))in CQL into Phantom's DSL? Thanks a lot.
Auto-application to ( ) is deprecated. Supply the empty argument list ( ) explicitly to invoke method seton a line like this
object Foo extends SetColumn[String]where I'm merely declaring a column in C*. The compiler seems to think I need to do
SetColumn[String] ( )but I'm only extending from
.where(_.id.in( aList ) ). The 2.13.3 compiler complains the same error for the
.inmethod take a list and a curried param as an implicit. I couldn't figure out why the compiler complains about
Auto-application to ( ) is deprecated, unless it wants me to pass in the implicit explicitly.
a -> bsyntax to construct tuples as well