weixiyen
Triton - a Cassandra ORM for Elixir
Triton uses the Xandra driver underneath.
Hex:
Github:
https://github.com/blitzstudios/triton
Blog:
https://blog.sleeperbot.com/triton-a-cassandra-orm-for-elixir-882dd8f11383
First Post!
ali
Thanks for sharing Triton. I am working on a project where I need to store IOT data in Cassandra and do range based queries on clustering columns. e.g. I have temperature sensors data table, where sensor-id is partitioning key, and timestamp is clustering column. I have queries like
select val from temp_sensors where sensor_id = ‘xyz’ and timestamp =< 1521829277556 and timestamp >= 1521827277556
I have read the docs but couldn’t figure out how I can model above query using DSL provided by this lib. Please help.
Most Liked
weixiyen
I’ve added more documentation to the github page.
You can do comparison / range queries with like this:
MessagesByDate
|> select([:message_id, :text])
|> where(channel_id: 1, created: [">=": timestamp_a], created: [<: timestamp_b])
|> MessagesByDate.all
Last Post!
Popular in Announcing
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex









