tursodatabase / tursodatabase/libsql-client-ts

Different ResultSet Output between Querying in Terminal and in Web Environment

Open
#148 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
576
Forks
69
PR merge metrics
No merged PRs in 30d

Description

For example, I have this code and email mas.bagus@gmail.com already in the database:

const email = "mas.bagus@gmail.com"
const inDBCheck = await db.execute(`select email from customer where email = "${email}";`)

When I run in a web environment (Deno in my case), that statement will return zero-length row of a ResultSet. But when I run in terminal, it returned a result.

Currently I have no problems with that, I change the double quote around ${email} into single quote. It works on the web!

But I wonder why does it give different results given different environment?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the db.execute call shown in the issue and reproduce it in both Deno and the terminal against the same database. Compare how the client or runtime handles the double-quoted and single-quoted values; done means identifying the source of the differing ResultSet output and determining whether a code fix or documentation is needed.

Written by the indexing model from the issue text.

Assessment

Tech stack
deno, sql, sqlite, typescript
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.