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

alisinabh
Hey everyone i’ve developed a library for Jalaali calendar for elixir which supports converting Gregorian dates to Jalaali and vice vers...
New
handnot2
Samly can be used to enable SAML 2.0 Single Sign On in a Plug/Phoenix application. This library uses Erlang esaml to provide plug enabl...
New
josevalim
Yes, yet another parser combinator library! Most of the parser combinators in the ecosystem are either compile-time, often using AST tra...
159 19951 141
New
mspanc
I am pleased to announce an initial release of the Membrane Framework - an Elixir-based framework with special focus on processing multim...
New
sasajuric
I’d like to announce a small library called boundaries. This is an experimental project which explores the idea of enforcing boundaries ...
New
mindok
What is ContEx? A pure Elixir server-side data plotting/charting library outputting SVG. It has nice barcharts in particular and works g...
New
benlime
LiveMotion enables high performance animations declared on the server and run on the client. As a follow up to my previous thread A libr...
New

Other popular topics Top

rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list. ...
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set? Thanks.
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" =&gt; #BSON.ObjectId&lt;58eb1a7a9ad169198c3dXXXX&gt;, "email" =&gt; ...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New

We're in Beta

About us Mission Statement