Closed victorbadila closed 9 years ago
sort()
is not supported by sails-cassandra as indicated here and it is likely will never be supported. Cassandra is NOT RELATIONAL DATABASE and records can only be sorted in CLUSTERING ORDER which is defined by underlying data model (also see here). So having sorts like in relational database is not possible.
I have a model with the following attribute:
The
string
id translates intotimeuuid
on cassandra side. However when trying to query the table sorting by id:the entities do not arrive in the normal order, and this can be seen by checking the
createdAt
column, which I have not disabled from the model.I know that in cql in order to make comparisons between
timeuuid
fields one could use 'dateof' function, which extracts thetimestamp
from atimeuuid
. Any idea if I am doing something wrong in my query or if the functionality I am trying to achieve is / will be supported in sails-cassandra?