Skip to content

[BUG] autocomplete for tables with schema behaves unexpectedly #705

Description

@nktnet1

Description

When typing in the query, if we use autocomplete for tables with a schema, the schema gets duplicated (appears twice).

Steps to Reproduce

  1. Set up the database:

    CREATE SCHEMA IF NOT EXISTS sample;
    
    CREATE TABLE IF NOT EXISTS sample.demo (
        id INT PRIMARY KEY,
        name TEXT
    );
    
    INSERT INTO sample.demo VALUES
        (1, 'Test');
    
    SELECT *
    FROM sample.demo;
  2. Now type in the query

    SELECT * FROM sample.dem
    before-autocomplete
  3. Perform the autocomplete by clicking the suggestion or hitting TAB/ENTER on your keyboard

  4. The query becomes

    SELECT * FROM sample.sample.demo
    after-autocomplete

    i.e. the schema name is duplicated

Expected Behavior

It should autocomplete to sample.demo

Actual Behavior

It autocompleted to sample.sample.demo

Environment

  • LibreDB Studio Version: (e.g., 0.15.0)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcore-capabilitiesloop:needs-moderator-actionFlagged by the maintainer loop: suspicious content or a decision only a human can make

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions