<?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: yamasan</title>
    <description>The latest articles on DEV Community by yamasan (@yamasan_7f66ea2bfb5d94fdf).</description>
    <link>https://dev.to/yamasan_7f66ea2bfb5d94fdf</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%2F4284101%2F208a130f-5540-4b7a-a018-5ac8c3543846.png</url>
      <title>DEV Community: yamasan</title>
      <link>https://dev.to/yamasan_7f66ea2bfb5d94fdf</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yamasan_7f66ea2bfb5d94fdf"/>
    <language>en</language>
    <item>
      <title>Why I made my SQL client show "how many rows" before every UPDATE</title>
      <dc:creator>yamasan</dc:creator>
      <pubDate>Sat, 05 Dec 2026 07:00:43 +0000</pubDate>
      <link>https://dev.to/yamasan_7f66ea2bfb5d94fdf/why-i-made-my-sql-client-show-how-many-rows-before-every-update-24l7</link>
      <guid>https://dev.to/yamasan_7f66ea2bfb5d94fdf/why-i-made-my-sql-client-show-how-many-rows-before-every-update-24l7</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Heads-up first&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;This article was &lt;strong&gt;written by AI (Claude)&lt;/strong&gt;; I reviewed it and published it.&lt;/li&gt;
&lt;li&gt;The app, &lt;strong&gt;VeqSQL&lt;/strong&gt;, is an &lt;strong&gt;experiment toward AI-driven development&lt;/strong&gt;. I decide the specs and the design; AI does most of the implementation and testing.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;I'm building a SQL client called &lt;strong&gt;VeqSQL&lt;/strong&gt;. The idea is simple: &lt;strong&gt;it stops you before you run something you can't undo.&lt;/strong&gt; This post explains what "stopping" means in practice.&lt;/p&gt;

&lt;h2&gt;
  
  
  The mistake I want to prevent
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;UPDATE&lt;/span&gt; &lt;span class="n"&gt;orders&lt;/span&gt; &lt;span class="k"&gt;SET&lt;/span&gt; &lt;span class="n"&gt;status&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'Shipped'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's an &lt;code&gt;UPDATE&lt;/code&gt; with the &lt;code&gt;WHERE&lt;/code&gt; forgotten. Even if you notice the instant you press Run, every row has already been rewritten.&lt;/p&gt;

&lt;p&gt;A condition that is slightly too broad. Being connected to the wrong environment. Same story. &lt;strong&gt;Noticing after you run it is too late.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Before running, it shows three things
&lt;/h2&gt;

&lt;p&gt;Before an &lt;code&gt;UPDATE&lt;/code&gt; or &lt;code&gt;DELETE&lt;/code&gt; runs, VeqSQL pauses and shows:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Which rows are affected&lt;/strong&gt; (the values before the change)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What they will look like after&lt;/strong&gt; (the expected result)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;How many rows&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fn4jc90hrmynik1i5c2o8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fn4jc90hrmynik1i5c2o8.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  You have to type the row count
&lt;/h2&gt;

&lt;p&gt;A plain "OK" button isn't enough. &lt;strong&gt;You can't run the statement until you type the number of affected rows yourself.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A "Confirm" button can be clicked without reading. To type the number, you have to look at it. If you expected 1 row and the dialog says 5,000, you notice right there.&lt;/p&gt;

&lt;p&gt;An &lt;code&gt;UPDATE&lt;/code&gt; or &lt;code&gt;DELETE&lt;/code&gt; &lt;strong&gt;without a &lt;code&gt;WHERE&lt;/code&gt; clause can't be run at all.&lt;/strong&gt; For &lt;code&gt;DROP&lt;/code&gt; and &lt;code&gt;TRUNCATE&lt;/code&gt;, you type the object's name instead of a count.&lt;/p&gt;

&lt;h2&gt;
  
  
  Running it doesn't commit it
&lt;/h2&gt;

&lt;p&gt;After it runs, the change stays &lt;strong&gt;uncommitted&lt;/strong&gt;. You look at the result, then choose commit or rollback yourself.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzhvhwiodvj6vp0gvbv7w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzhvhwiodvj6vp0gvbv7w.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If the target rows changed between the confirmation and the execution, or the affected count differs from the count you approved, the whole thing is rolled back.&lt;/p&gt;

&lt;h2&gt;
  
  
  If it can't be verified, it says so
&lt;/h2&gt;

&lt;p&gt;Some writes can't be counted beforehand, such as stored procedures. In that case VeqSQL doesn't pretend. It shows &lt;strong&gt;"impact can't be verified"&lt;/strong&gt; and asks for your explicit approval.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it can't do yet
&lt;/h2&gt;

&lt;p&gt;I'd rather be upfront:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;INSERT&lt;/code&gt; is not covered by the pre-run confirmation yet.&lt;/li&gt;
&lt;li&gt;The side-by-side "compare run" (before/after) only runs when you tick it. It isn't enforced.&lt;/li&gt;
&lt;li&gt;The UI is still being polished. Some parts are still confusing.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are on my list.&lt;/p&gt;

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

&lt;p&gt;VeqSQL is a &lt;strong&gt;preview release&lt;/strong&gt; (the Windows installer is unsigned, so your OS may warn you). It's built with Rust and Tauri.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Website / downloads: &lt;a href="https://veqsql.net/" rel="noopener noreferrer"&gt;https://veqsql.net/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Mac (Apple Silicon), via Homebrew:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;brew tap to-yamauchi/tap
brew trust --cask to-yamauchi/tap/veqsql-free
brew install --cask to-yamauchi/tap/veqsql-free
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There's also a test database with fake data, so you can try the confirmation without touching real data: &lt;a href="https://veqsql.net/testenv.html" rel="noopener noreferrer"&gt;https://veqsql.net/testenv.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If something is unclear, or there's a moment where you'd want it to stop you, I'd love to hear it in the comments.&lt;/p&gt;

</description>
      <category>sql</category>
      <category>rust</category>
      <category>database</category>
      <category>free</category>
    </item>
  </channel>
</rss>
