<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Khushvi Bamrolia</title>
    <description>The latest articles on DEV Community by Khushvi Bamrolia (@khushvi_bamrolia_6).</description>
    <link>https://dev.to/khushvi_bamrolia_6</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3500231%2F70dc04fe-7fa5-4449-9f6a-b9b3b700799b.jpeg</url>
      <title>DEV Community: Khushvi Bamrolia</title>
      <link>https://dev.to/khushvi_bamrolia_6</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/khushvi_bamrolia_6"/>
    <language>en</language>
    <item>
      <title>I built a query language in Rust that talks to PostgreSQL, MongoDB, MySQL and Redis, here's why</title>
      <dc:creator>Khushvi Bamrolia</dc:creator>
      <pubDate>Mon, 14 Sep 2026 07:15:14 +0000</pubDate>
      <link>https://dev.to/khushvi_bamrolia_6/i-built-a-query-language-in-rust-that-talks-to-postgresql-mongodb-mysql-and-redis-heres-why-3c7o</link>
      <guid>https://dev.to/khushvi_bamrolia_6/i-built-a-query-language-in-rust-that-talks-to-postgresql-mongodb-mysql-and-redis-heres-why-3c7o</guid>
      <description>&lt;p&gt;I got tired of switching between four different query syntaxes every single day.&lt;/p&gt;

&lt;p&gt;PostgreSQL in the morning. MongoDB in the afternoon. Redis for caching. MySQL for the legacy service nobody wants to touch. Four databases. Four mental models. Four times the cognitive load.&lt;/p&gt;

&lt;p&gt;So I built CoffeeQL: a universal query language written in Rust that works across all of them.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem nobody talks about
&lt;/h2&gt;

&lt;p&gt;Every backend engineer I know maintains multiple databases in production. It's not exotic, it's standard. PostgreSQL for relational data, MongoDB for documents, Redis for cache, MySQL for that one old service.&lt;/p&gt;

&lt;p&gt;The problem isn't the databases themselves. The problem is the &lt;strong&gt;constant context switching&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;You write:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt; &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then five minutes later:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;db&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;users&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;findOne&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;_id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;ObjectId&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;...&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;GET user:1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Same intent. Three completely different syntaxes. Three different drivers. Three different error formats. Three different ways to think about the same operation.&lt;/p&gt;

&lt;p&gt;I wanted one syntax. So I built it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What CoffeeQL looks like
&lt;/h2&gt;

&lt;p&gt;CoffeeQL has its own syntax... clean, readable, consistent across every database:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="n"&gt;users&lt;/span&gt;&lt;span class="p"&gt;[].&lt;/span&gt;&lt;span class="k"&gt;where&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="n"&gt;give&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This single query runs against PostgreSQL, MongoDB, MySQL, or Redis — whichever you have connected. The engine figures out the translation.&lt;/p&gt;

&lt;p&gt;Want to limit results?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;users[].cup(10)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Want to filter?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="n"&gt;users&lt;/span&gt;&lt;span class="p"&gt;[].&lt;/span&gt;&lt;span class="k"&gt;where&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;created_at&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nv"&gt;"2024-01-01"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="n"&gt;give&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;created_at&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Same syntax. Every database. Every time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Rust
&lt;/h2&gt;

&lt;p&gt;Two reasons: performance and correctness.&lt;/p&gt;

&lt;p&gt;Rust's type system forces you to handle every edge case at compile time. When you're building a query engine that needs to translate one syntax into four completely different execution models.. that guarantee matters a lot.&lt;/p&gt;

&lt;p&gt;The second reason is portability. CoffeeQL is published on both &lt;strong&gt;npm&lt;/strong&gt; (via WebAssembly) and &lt;strong&gt;PyPI&lt;/strong&gt; (via PyO3/maturin). One Rust codebase. JavaScript and Python both get native bindings. No duplicate logic, no drift between implementations.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where it is today
&lt;/h2&gt;

&lt;p&gt;CoffeeQL v0.3.1 is live right now:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ 265/265 tests passing&lt;/li&gt;
&lt;li&gt;✅ PostgreSQL, MySQL, MongoDB, Redis support&lt;/li&gt;
&lt;li&gt;✅ Published on npm and PyPI&lt;/li&gt;
&lt;li&gt;✅ Query planning and explain() support
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# JavaScript&lt;/span&gt;
npm &lt;span class="nb"&gt;install &lt;/span&gt;coffeeql

&lt;span class="c"&gt;# Python  &lt;/span&gt;
pip &lt;span class="nb"&gt;install &lt;/span&gt;coffeeql
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What's coming in v0.4.0
&lt;/h2&gt;

&lt;p&gt;The current version handles query planning and routing. v0.4.0 brings &lt;strong&gt;actual execution&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Python real CRUD — asyncpg, motor, aiomysql, redis-py&lt;/li&gt;
&lt;li&gt;npm rebuild with full error handling&lt;/li&gt;
&lt;li&gt;Dart package on pub.dev&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;.raw()&lt;/code&gt; escape hatch for when you need it&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;v0.3 learned to speak. v0.4 will actually do things.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;npm: &lt;code&gt;npm install coffeeql&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;PyPI: &lt;code&gt;pip install coffeeql&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Docs &amp;amp; waitlist: &lt;a href="https://coffeeql.dev" rel="noopener noreferrer"&gt;coffeeql.dev&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you've ever felt the pain of maintaining multiple database syntaxes in one codebase — CoffeeQL is for you.&lt;/p&gt;

&lt;p&gt;I'd love to know what databases you're running in production and what your biggest pain point is. Drop a comment below.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Built in Rust. Runs everywhere. One syntax to rule them all.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>rust</category>
      <category>database</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
