Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

codelens/query problem #270

Closed
skotlex opened this issue Jun 12, 2019 · 5 comments

Comments

4 participants
@skotlex
Copy link

commented Jun 12, 2019

Describe the bug

  1. -- @conn function does not work as expected
  2. desc(describe) [table_name] not work

To Reproduce
Steps to reproduce the behavior:
*db: oracleDB

  1. Add connections. ex. PGSQL1 and PGSQL2
  2. Create sql file
  3. Screen shown after coding
    Run query block on active connection
    -- @block select
    -- @conn PGSQL1
    select * from [table_name]

Run query block on active connection
-- @block select
-- @conn PGSQL2
select * from [table_name]

Expected behavior
Q1. Unlike the guide (https://vscode-sqltools.mteixeira.dev/codelens), each block looks at only the currently connected db, not the connection I want.
ex.
guide screenshot text: Run query block on PGSQL
current my sql text: Run query block on active connection

Am I doing something wrong?

Q2. "desc [table_name]" query on oracle does not work.

Desktop (please complete the following information):

  • SQLTools Version: 0.19.5
  • VSCode Version: 1.35.0-exploration
  • Dialect Used: Oracle
  • OS: Windows

@skotlex skotlex added the bug label Jun 12, 2019

@project-bot project-bot bot added this to To do in Kanban Jun 12, 2019

@mickeypearce

This comment has been minimized.

Copy link
Collaborator

commented Jun 12, 2019

@skotlex, Q2: no, oracledb-node driver unfortunatelly does not support script execution (SQL*Plus commands).

@zyxifrash

This comment has been minimized.

Copy link

commented Jun 13, 2019

I'm not sure I follow, how is this a SQLPlus/oracledb-node issue?

According to /packages/plugins/codelens/provider.ts, it's specifically looking for a @conn statement at the top of the block, then at the top of the file - only using the active connection if neither were found. It's not specific to oracle in any way.

https://vscode-sqltools.mteixeira.dev/executing-queries also states that you're supposed to be able to use @conn at the top of a file, which will define the connection used for any queries executed in that file. This is not working as described either.

There's something wrong with the code that finds those @conn statements.

@mickeypearce

This comment has been minimized.

Copy link
Collaborator

commented Jun 13, 2019

Q2. "desc [table_name]" query on oracle does not work

I was referring to Q2. Describe is a sql*plus cmd, isn't it?

@skotlex skotlex closed this Jun 15, 2019

Kanban automation moved this from To do to To be released Jun 15, 2019

@skotlex skotlex reopened this Jun 15, 2019

Kanban automation moved this from To be released to In progress Jun 15, 2019

@project-bot project-bot bot moved this from In progress to To do in Kanban Jun 15, 2019

@skotlex

This comment has been minimized.

Copy link
Author

commented Jun 15, 2019

I understand if it's not for support. Can I hear the answer to Q1?

@mtxr

This comment has been minimized.

Copy link
Owner

commented Jun 19, 2019

Hi,

sorry for the late reply, I had to deal with some stuff here in the past week, I'll take a look at this within this week.

Thanks!

@mtxr mtxr self-assigned this Jun 26, 2019

@mtxr mtxr closed this in 4e50b73 Jun 26, 2019

Kanban automation moved this from To do to To be released Jun 26, 2019

mtxr added a commit that referenced this issue Jun 26, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.