From ed4b84d2ca7e5b13d010effefb8ae676d084124a Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Wed, 3 Jun 2026 23:57:21 +0530 Subject: Refactor image.sh to handle png + cleanup sql --- src/mandelbrot.sql | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/mandelbrot.sql') diff --git a/src/mandelbrot.sql b/src/mandelbrot.sql index 1c25461..b83b751 100644 --- a/src/mandelbrot.sql +++ b/src/mandelbrot.sql @@ -1,5 +1,4 @@ -DELETE FROM images WHERE id = 'mandelbrot'; -INSERT INTO images (id, width, height) VALUES ('mandelbrot', 400, 400) RETURNING id; +INSERT OR REPLACE INTO images (id, width, height) VALUES ('mandelbrot', 400, 400) RETURNING id; WITH RECURSIVE image AS (SELECT *, 0.008 AS scale, (width * 5)/7 AS ox, (height / 2) AS oy FROM images WHERE id = 'mandelbrot'), -- cgit v1.3.1