0

What would be query result of the below query.

select * from Comment where photo_id = "xxx";

Will my order be comment_id ordered from most recent time?

OR

Will my order be score ordered in Desc highest to lowest score?

class Comment(Model):
        photo_id = UUID(primary_key=True)
        comment_id = TimeUUID(primary_key=True, default=uuid1) # second primary key component is a clustering key
        score = Integer(rpimary_key=True , clustering_order = "DESC")
        comment = Text()
Srikan
  • 2,161
  • 5
  • 21
  • 36

1 Answers1

0

Since you didn't specify a clustering_order for the comment_id column, it will order by ASCENDING by default. Your query will order by comment_id first, and then order by score in descending order.

gsteiner
  • 776
  • 5
  • 20