Closed
Description
What a waste of time this was to debug just to find out that this library cannot handle simple select queries. The current workaround is to select another column that cannot contain an empty string before the column that could contain an empty string. This is a big problem when you select large amounts of data from a table and nobody would notice that the data is incomplete! I actually wonder now where the issue is...
Minimal reproducible example:
const rows = await db.query(`select '' as a`);
console.log(rows);
Actual output:
INFO connecting 127.0.0.1:3307
INFO connected to 127.0.0.1:3307
[]
INFO close connection
Here is a working example with npm:mysql2/promise
:
const [rows] = await db.query(`select '' as a`);
console.log(rows);
Expected output:
[ { a: "" } ]
Used Deno version:
deno 1.36.4 (release, x86_64-unknown-linux-gnu)
v8 11.6.189.12
typescript 5.1.6
Used database images from Docker Hub:
- mariadb:11.1
- mariadb:11
- mariadb:10
- mysql:8
- mysql:5
Metadata
Metadata
Assignees
Labels
No labels