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

Hal9000
Here is my first stab at this. README pasted below. https://github.com/Hal9000/elixir_random Comments and critiques are welcome. Thank...
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
aesmail
Hello guys, I have finally made it. I created an admin interface for a framework. It’s been on my todo list for years and with the curre...
New
dominicletz
Hi, I thought I had posted my library before but seems I hadn’t. The project is still in early stages but it’s growing and so I think it...
New
fuelen
Hey folks! Want to present a toolkit for writing command-line user interfaces. It provides a convenient interface for colorizing text...
New
nikokozak
Hello all, I’ve been working on Svonix - a library for quickly integrating Svelte components into Phoenix views. It’s a much-needed succ...
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

baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
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
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
gausby
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
1207 40165 209
New
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 44265 214
New

We're in Beta

About us Mission Statement