Skip to content

[BUG] - Query result from scratchpad displays wrong columns #316

@UrbanMarco

Description

@UrbanMarco

Describe the bug
I have the following query in the scratchpad

select s.id, s.state, p.id
from subscription.subscriptions s, product.plans p
where s.plan_id = p.id
and is_plan_available(p.activated_at, p.retired_at) = true
order by p.id;

when I run it, I am expecting to see a table with 3 columns: on the left the subscription IDs, in the middle the state of the subscription and on the right the plan ID.

However, WhoDB displays both on the left and on the right the plan ID.

To Reproduce
As explained above

Expected behavior
Same query but directly with PSQL

  id  | state |  id
------+-------+-------
 3102 |    16 |  5896
 2982 |    12 |  5896
 2910 |    16 |  5896
 2916 |    16 |  5896
 2920 |    16 |  5896

Screenshots
image

Additional context
Self-hosted version 0.45 with the following docker-compose file

version: "3.8"
services:
  whodb:
    image: clidey/whodb
    volumes:
      - ./sample.db:/db/sample.db
    # environment:
    #   WHODB_OLLAMA_HOST:YOUR_OLLAMA_HOST
    #   WHODB_OLLAMA_PORT:YOUR_OLLAMA_PORT
    ports:
      - "8081:8080"

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions