Giter Site home page Giter Site logo

Comments (17)

mtxr avatar mtxr commented on May 18, 2024 2

@jpincas, sorry you had to uninstall.
But I sure you will be happy if you give it another chance once this PR is got packaged, next version will support multiple schemas and databases, the same way DataGrip, Dbeaver and some other tools handle it.

@ransagy I'ld love too. I started to work hard on intellisense and I felt I should complete this task first.
It's a first step, but I'll roll it out this first, then intellisense.

@mickeypearce actually I just completed this hierarchical feature, I assigned you as a reviewer for the PR, also I wrote some comments we need you to complete to fix this for Oracle.

If everything goes well, I'm releasing it today/tomorrow.

Thanks guys!

from vscode-sqltools.

mtxr avatar mtxr commented on May 18, 2024 1

https://raw.githubusercontent.com/mtxr/vscode-sqltools/master/static/sidebar-explorer.png

from vscode-sqltools.

mtxr avatar mtxr commented on May 18, 2024

#75 seems to be the same.

I've created a milestone to fix this problem.

from vscode-sqltools.

jpincas avatar jpincas commented on May 18, 2024

Related to this. All our tables are inside schemas. We see the tables in the sidebar, but when clicking to view a table, we get an error of the kind

ERROR: Error:  { [Error: Request connection/RunCommandRequest failed with message: relation "customer" does not exist```

Indeed, `customer` does not exist, it should be `core.customer` - so the extension is ignoring the schema when running the query.

from vscode-sqltools.

mtxr avatar mtxr commented on May 18, 2024

@jpincas which version were you using?

from vscode-sqltools.

jpincas avatar jpincas commented on May 18, 2024

Hey - I ended up uninstalling it, so I'm afraid I can't answer your question. Is there a version that supports schemas?

from vscode-sqltools.

mickeypearce avatar mickeypearce commented on May 18, 2024

For Oracle dialect I "abused" the "tableName" property so that it includes schema name:

tableName: `${obj.TABLESCHEMA}.${obj.TABLENAME}`,

public describeTable(table: string) {
const tableSplit = table.split('.');
return this.query(Utils.replacer(this.queries.describeTable, { schema: tableSplit[0], table: tableSplit[1] }));
}
}

@mtxr , maybe it could be an option as a quick fix for other dialects also, before providing proper schema support.

from vscode-sqltools.

ransagy avatar ransagy commented on May 18, 2024

I'd love for this to happen in general, Intellisense, etc. If the dialect supports schemas, prepend it to the table name whenever its inserted somewhere. Not sure if that's still in the realms of a "quick fix"/phase 1 of this.

from vscode-sqltools.

mickeypearce avatar mickeypearce commented on May 18, 2024

It is. Schema is then part of the tableName, so instead of "customer", you get "schema.customer" everywhere.

The only thing is missing is a proper hierarchy in tree explorer as it support only two nodes for now:

  • Tables
    • schema.customer

IF you have a schema node you can easely collapse schemas:

  • Tables
    • schema
      • customer

But other then that, I think schema should be part of table name :)

from vscode-sqltools.

mickeypearce avatar mickeypearce commented on May 18, 2024

The only thing is missing is a proper hierarchy in tree explorer as it support only two nodes for now:

I think @mtxr is working on this right now: https://github.com/mtxr/vscode-sqltools/commits/feature/sidebar-tree-enhanced , 👍

from vscode-sqltools.

jpincas avatar jpincas commented on May 18, 2024

@mtxr Definitely will reinstall and test it out. Still looking for a way to improve my plpgsql workflow from within vscode rather than switching constantly between vscode and postico.

from vscode-sqltools.

mtxr avatar mtxr commented on May 18, 2024

But the release version will flatten tree elements with only one child

from vscode-sqltools.

ransagy avatar ransagy commented on May 18, 2024

@mtxr Just to be sure - the current change is only relevant for the tree display, right? Not Intellisense/"Generate Insert Query"/"Show Table Records" etc?

I know you're planning/working in those, Just making sure I'm not missing something.

from vscode-sqltools.

mtxr avatar mtxr commented on May 18, 2024

Which RDBMS dialect are you using?

from vscode-sqltools.

mtxr avatar mtxr commented on May 18, 2024

Take a look here. We had some improvements on Generate Insert queries and show records, but mostly for PostgreSQL, MySQL and SQLite.

If you feel there's some feature missing, please open an issue for me. Besides the insellisense, everything should be easier and quicker to develop now

from vscode-sqltools.

ransagy avatar ransagy commented on May 18, 2024

I use (Azure) MSSQL almost exclusively. I was just wondering since this issue was seemingly about schema support everywhere, Hence why i wondered if its still a WIP for Intellisense and other places that don't directly insert the schema name with the table one.

If that's out of scope for this issue, I'll open new one(s).

from vscode-sqltools.

mtxr avatar mtxr commented on May 18, 2024

Hey guys try the latest version. Most of the issues were fixed. Let me know how is it going for you.

If you like the project, please consider a donation or reviewing it on VSCode marketplace. That you help it to keep evolving.

Thanks!

from vscode-sqltools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.