weixiyen

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

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

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!

sahilpaudel

sahilpaudel

The documentation blog url is not working @weixiyen

Can you please check?

Where Next?

Popular in Announcing Top

KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 36820 110
New
Qqwy
Hello everyone, I wrote a small library today called MapDiff. It returns a map listing the (smallest amount of) changes to get from map...
New
versilov
Could not wait for the missing Elixir ML libraries to appear, so, I wrote one myself, taking https://github.com/sdwolfz/exlearn as a foun...
New
mbuhot
Leverage Open Api 3.0 (Swagger) to document, test, validate and explore your Plug and Phoenix APIs. Generate and serve a JSON Open API ...
New
josevalim
EDIT: since Ecto 3.0 final version is out, this post was amended to use the final versions in the instructions below. Hi everyone, We a...
New
mathieuprog
Hello :waving_hand: Allow me to introduce you to Tz, an alternative time zone database support to Tzdata. Why another library? First a...
New
zachdaniel
Ash Framework What is Ash? Ash Framework is a declarative, resource-oriented application development framework for Elixir. A resource can...
New

Other popular topics Top

KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 36820 110
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID&lt;0.412.0&gt; terminating ** (Postgrex.Error) FATAL...
New

We're in Beta

About us Mission Statement