Closed j4nr6n closed 6 months ago
Same thing seems to be happening with BETWEEN
/NOT BETWEEN
.
-- Current filters:
SELECT * FROM `test`.`table` WHERE `id` BETWEEN '"test" and "test"' LIMIT 300 OFFSET 0;
-- All checked filters:
SELECT * FROM `test`.`table` WHERE `id` BETWEEN '"test" and "test"' LIMIT 300 OFFSET 0;
Same here:
Database version (Ex: PostgreSQL 10.0): MySQL 5.6
TablePlus version (the number on the welcome or about screen, Ex: build 81): 0.1 (206)
Linux distro (Ex: Ubuntu 18.04): Ubuntu 20.04
Can't use IN, NOT IN, BETWEEN, NOT BETWEEN !
Congrats on a stable Linux release! :tada:
This is the only issue that have been bothering me for some time. Never got the IN
/ NOT IN
and BETWEEN
/ NOT BETWEEN
queries generated from the filters to work. It may be because I'm inputing something else that TablePlus are expecting though.
Examples:
resulting in query SELECT * FROM "public"."<table>" WHERE "id" IN '1000, 1005' ORDER BY "id" LIMIT 300 OFFSET 0;
resulting in query SELECT * FROM "public"."<table>" WHERE "id" IN '(1000, 1005)' ORDER BY "id" LIMIT 300 OFFSET 0;
The id field is an integer and my input are also comma-separated integers (this is how I would expect to input it...) so I would expect the query to be created without the single quotation marks, e.g. SELECT * FROM "public"."<table>" WHERE "id" IN (1000, 1005) ORDER BY "id" LIMIT 300 OFFSET 0;
Database version (Ex: PostgreSQL 10.0): PostgreSQL 15.1
TablePlus version (the number on the welcome or about screen, Ex: build 81): 1.0.2 (236)
Linux distro (Ex: Ubuntu 18.04): Ubuntu 22.04
This seems to have been fixed. :man_shrugging: If you type x and y
in the BETWEEN
/NOT BETWEEN
, or (x, y)
in the IN
/NOT IN
case, I now get valid SQL. No idea when it was fixed, but I'll take it.
These are the queries that were generated in my case.
If I try to apply the filter, I get
Database version (Ex: PostgreSQL 10.0): MySQL 8.0
TablePlus version (the number on the welcome or about screen, Ex: build 81): 0.1 (192)
Linux distro (Ex: Ubuntu 18.04): Ubuntu 22.04
The steps to reproduce this issue: Connect to database and select a table. Click "Filters" and add an
IN
orNOT IN
filter.