r4fek / django-cassandra-engine

Django Cassandra Engine - the Cassandra backend for Django
BSD 2-Clause "Simplified" License
365 stars 85 forks source link

Query Help #32

Closed xXPhenomXx closed 9 years ago

xXPhenomXx commented 9 years ago

Are there any query examples you could point me to, I am assuming that Django ORM like statements will not work with Django Cassandra Engine. For instance I am trying a simple mydatabase.objects.all() but since Cassandra is a secondary I am trying the following: mydatabase.objects.using('cassandra').all() with no luck?

When you use this package are you forced to write raw SQL queries? Are there any query examples or sample projects using more of an ORM like structure?

Thanks

r4fek commented 9 years ago

Hi, I would start from reading this: https://datastax.github.io/python-driver/object_mapper.html and this https://datastax.github.io/python-driver/cqlengine/queryset.html

Cqlengine is a little bit different from Django ORM, but it is pretty similar.