GithubHelp home page GithubHelp logo

mtxr / vscode-sqltools Goto Github PK

View Code? Open in Web Editor NEW
1.4K 33.0 286.0 14.21 MB

Database management for VSCode

Home Page: https://vscode-sqltools.mteixeira.dev?utm_source=github&utm_medium=homepage-link

License: MIT License

TypeScript 92.98% JavaScript 4.02% Shell 0.22% PLpgSQL 0.09% TSQL 0.02% SCSS 2.67%
sqltools sql vscode vscode-extension vscode-plugin sql-query database-management sqlite sqlite3 oracle-database

vscode-sqltools's Introduction


GitHub

Welcome to Database Management done right. SQLTools provides connections to many of the most commonly used databases, making it easier to work with your data. With this tool, developers will save (a lot of) time, increase productivity and feel like a database hero ✌️

SQLTools is an open-source project maintained by Matheus Teixeira and George James Software, alongside contributions from our brilliant community of users.

If you like using this tool please leave us a review.

Features

Connects to MySQL, PostgreSQL, Microsoft SQL Server and many more...

  • Beautifier and formatter for SQL code
  • Query runner, history and bookmarks
  • Connection explorer
  • Generator for INSERT queries
  • Pluggable driver architecture

Find out more in the documentation here.

Getting Started

SQLTools is a set of VS Code extensions that connect to, query, and display results from a SQL database manager. (Supported databases are listed below.)

The installation process is straightforward:

  • Open VS Code
  • Click the Extensions view (in the left bar), then search for @tag:sqltools-driver. This lists all the drivers available for SQLTools.
  • Install the driver for your database. This also installs the core SQLTools extension.
  • Click the SQLTools icon (in the left bar)
  • Create a connection to your database. To do this, hover over CONNECTIONS in the SQLTools pane. Click the "Add New Connection" icon and choose the driver and enter the connection parameters.

You can then open and query it from within VS Code.

Supported Databases

To use SQLTools you will also need to install the appropriate driver extension for your database.

If the driver you want is not available, you can use our handy new drivers guide to write it yourself (and help our community in the process) or submit feedback via GitHub.

If you need a driver sooner, get in touch with the maintainers directly – we might be able to help you out.

Psst… we’re always on the lookout for maintainers for the official drivers, so let us know if this is something you’re interested in!

Official Drivers

Driver Marketplace Package
CockroachDB CockroachDB Link packages/driver.pg
MariaDB MariaDB Link packages/driver.mysql
MSSQL Microsoft SQL Server/Azure Link packages/driver.mssql
MySQL MySQL Link packages/driver.mysql
TiDB TiDB Link packages/driver.mysql
PostgreSQL PostgreSQL Link packages/driver.pg
SQLite SQLite Link packages/driver.sqlite

Community Drivers:

Driver Marketplace Maintainer and Repository
AWS Redshift AWS Redshift Link @kj-9
kj-9/sqltools-redshift-driver
ClickHouse logo ClickHouse Link @ultram4rine
ultram4rine/sqltools-clickhouse-driver
Databricks Databricks Link @Databricks
databricks/sqltools-databricks-driver
DuckDB Sql Tools DuckDB Link @RandomFractals
RandomFractals/duckdb-sql-tools
DuckDB Pro Tools DuckDB Pro Sign up @RandomFractals
RandomFractals/pro-data-tools#duckdb-pro-tools
DuckDB (Latest Version Support) DuckDB (Latest Version Support) Link @Evidence
evidence-dev/sqltools-duckdb-driver
Google BigQuery Google BigQuery Link @Evidence
evidence-dev/sqltools-bigquery-driver
Google Cloud Spanner Google Cloud Spanner Link @cloudspannerecosystem
cloudspannerecosystem/sqltools-cloud-spanner-driver
Google Cloud SQL (PostgreSQL) Google Cloud SQL (PostgreSQL) Link @curioswitch
curioswitch/sqltools-cloudsql-pg
Hive Hive Link @datafe
datafe/sqltools-hive-driver
Hologres Hologres Link @datafe
datafe/sqltools-hologres-driver
InterSystems IRIS logo InterSystems IRIS Link @daimor
intersystems-community/sqltools-intersystems-driver
MaxCompute MaxCompute Link @datafe
datafe/sqltools-maxcompute-driver
Oracle Oracle Link @hashhashu
hashhashu/sqltools-Oracle-driver
SAP HANA SAP HANA Link @SAP
SAP/sap-hana-driver-for-sqltools
SingleStore SingleStore Link @singlestore-labs
singlestore-labs/sqltools-singlestore-driver
Snowflake Snowflake Link @koszti
koszti/sqltools-snowflake-driver
SQLite Pro Tools SQLite Pro Sign up @RandomFractals
RandomFractals/pro-data-tools/sqlite-tools
Teradata Teradata Link @ScriptPup
ScriptPup/sqltools-teradata-driver
Trino Trino Link @regadas
regadas/sqltools-trino-driver
Vertica Vertica Link @vertica
vertica/sqltools-vertica-driver

Related Tools

Name Download Repository
Markdown SQL Pro Tools Markdown SQL Pro Tools Sign up RandomFractals/pro-data-tools#markdown-sql-pro-tools
PRQL Pro Tools PRQL Pro Tools Sign up RandomFractals/pro-data-tools#prql-pro-tools

Contributing

We are grateful to our contributors for helping with this project ❤️ If you would like to join them you’ll find everything you need to know about contributing here.

Changelog

See the changelog here.

Feedback

Our aim is to build a tool that is genuinely helpful for developers. Therefore we welcome any feedback or additional feature requests – please submit them through the GitHub Issue system.

If you need help sooner, get in touch with the maintainers directly – we might be able to help you out.

About George James Software

George James Software has been providing innovative software solutions for over 35 years. We pride ourselves on the quality and maintainability of our code and we have built a number of tools to help developers achieve the same with their work. These are available as VS Code extensions here.

We also help other developers to build their own extensions. If there is a tool you need building please get in touch with us at [email protected].

vscode-sqltools's People

Contributors

adalbertmemsql avatar akashagarwal7 avatar archiewood avatar ariel-bentu avatar bombillazo avatar daimor avatar dependabot[bot] avatar dgarc359 avatar dyegoaurelio avatar edwardchapman avatar epiceric avatar fmstrat avatar gjsjohnmurray avatar glha avatar greenkeeper[bot] avatar imgbot[bot] avatar imgbotapp avatar mickeypearce avatar mojoaxel avatar mtxr avatar mubaidr avatar rajrsingh avatar randomfractals avatar richb-hanover avatar samuelhsin avatar scriptpup avatar sdissegna-maystreet avatar shimonbenyair avatar smaspe avatar ultram4rine avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vscode-sqltools's Issues

Use contents of focused file with "Run selected query" if no selection made

Issue Type

  • Feature Request
  • Bugfix/Errors
  • Questions
  • Other

Description

During my workflow, I often want to quickly run a query that I have saved in a file. As it is, this adds an extra keypress of CTRL+A to my workflow. Bookmarks can only partially solve this issue, as the bookmark must be recreated every time the query is changed. I would suggest either using the full contents of the focused file if no selection is made, or adding a new command to do the same, in order to streamline workflow in these cases.

Drag & Drop from connection panel

  • Feature Request

Would love to be able to drag and drop a table or a column from SQL Connections panel on the left, to the editor window. It would makes Writing a query much easier.

Support for schema (full qualified object name)

Issue Type

  • Feature Request
  • Bugfix/Errors

Prerequisites (For bugfixes)

  • Are you running the latest version?
  • Did you check the logs?
  • Did you check the Setup?

Description

I didn't check with other dialects. But for MS SQL sqltools completely ignores the Schema or a database object. Let's say we have a table Sales.Offers. sqltools would in all commands just refer to it as Offers. So if Sales was not the default schema of the current user you will get the error Invalid object name 'Offers'.

Steps to Reproduce (For bugfixes)

  1. Connect
  2. Use the command "Show Table Records"

Expected behavior: [What you expected to happen]
Results are shown.

Actual behavior: [What actually happened]
Error: Invalid object name 'Offers'

Multiple Connections

This is a guideline to help us to understand SQLTools Issues.

You don't need to stick to this, but please try to guide us to reproduce the errors or understand your feature requests.

Issue Type

  • Feature Request
  • Bugfix/Errors
  • Questions
  • Other

Prerequisites (For bugfixes)

  • Are you running the latest version?
  • Did you check the logs?
  • Did you check the Setup?

Description

I've connected to more than 1 DB but see just first DB at sidebar

Steps to Reproduce (For bugfixes)

  1. Connect to first DB
  2. Connect to second DB
  3. [and so on...]

Expected behavior: [What you expected to happen]
Added 2 connections to sidebar

Actual behavior: [What actually happened]
Just first connection

Versions

  • Version: v0.12.1
  • OS: osx
  • SGDB: MSSQL

You can get this information from executing SQLTools: Version from VSCode Quick Open.

How to connect to LocalDB (Sql Server)?

This is a guideline to help us to understand SQLTools Issues.

You don't need to stick to this, but please try to guide us to reproduce the errors or understand your feature requests.

Issue Type

  • Feature Request
  • Bugfix/Errors
  • Questions
  • Other

Prerequisites (For bugfixes)

  • Are you running the latest version?
  • Did you check the logs?
  • Did you check the Setup?

Description

(Running v0.11.4)

Hello, how can I connect to a LocalDB SQL server instance? Using the following config gives me a connection error:

"sqltools.connections": [
        {
            "name": "MSSQL",
            "server": "127.0.0.1",
            "dialect": "MSSQL",
            "port": 1433,
            "database": "EFGetStarted.AspNetCore.NewDb",
            "username": "sa",
            "askForPassword": false,
            "password": null,
            "connectionTimeout": 30
        }
    ]

This database was created using Entity Framework Core, so, AFAIK there's no password or username, at least explicitly. The following connection string works for me if I want to connect using Visual Studio 2017 data tools:

Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\User\Gus\EFGetStarted.AspNetCore.NewDb.mdf;Integrated Security=True;Connect Timeout=30

And this is the actual connection string used by EF Core: @"Server=(localdb)\mssqllocaldb;Database=EFGetStarted.AspNetCore.NewDb;Trusted_Connection=True;ConnectRetryCount=0";

Thank you for your time.

.tt files being reformatted by this plugin

Issue Type

  • Bugfix/Errors

Prerequisites (For bugfixes)

  • Are you running the latest version?
  • Did you check the logs?
  • Did you check the Setup?

Description

I haven't dug into why yet but an update to this extension has started reformatting all my .tt files. I disected my plugins and this alone being enabled caused the reformatting.

Steps to Reproduce (For bugfixes)

Save a file with .tt extension, it gets reformatted onto one line

Versions

  • Version: v0.11.3
  • OS: OSX
  • SGDB: PostgresSQL

Startup Activation Taking 3s

Issue Type

  • Feature Request
  • Bugfix/Errors
  • Questions
  • Other

Prerequisites (For bugfixes)

  • Are you running the latest version?
  • Did you check the logs?
  • Did you check the Setup?

Description

Extension is taking 3 seconds to start

BUG: Any change in settings causes the command plate to come up with “null password (Press 'Enter' to confirm or 'Escape' to cancel)”

Issue Type

  • Bugfix/Errors

Prerequisites (For bugfixes)

  • Are you running the latest version? Yes

Description

Every time I change any of the settings in VSCode, the command plate to come up with "null password (Press 'Enter' to confirm or 'Escape' to cancel)". Hitting enter is enough to make things work fine, however, it is still annoying. I am not sure of the reason behind this and was wondering if anybody came across something similar.

Steps to Reproduce (For bugfixes)

I asked about this on StackOverflow, and a member of the community who faced the same issue tracked it down to this line of code: https://github.com/mtxr/vscode-sqltools/blob/0865cf0/src/sqltools.ts#L419-L424.

His solution was:

Putting this in my settings.json made the extension stop prompting me:
"sqltools.autoConnectTo": "blah",
(The default value is null. Putting a string somehow causes it to generate an error in the console but whatever, it solves the problem.)

Link to StackOverflow Question

No pg_hba.conf for host

Issue Type

  • Feature Request
  • Bugfix/Errors
  • Questions
  • Other

Prerequisites (For bugfixes)

  • Are you running the latest version?
  • Did you check the logs?
  • Did you check the Setup?

Description

Received error message: "no pg_hba.conf entry for host..." when trying to connect to postgresql database using SQLTools. I can connect on same computer from command line using psql and via python using psycopg2. Do you know what the problem might be?

Steps to Reproduce (For bugfixes)

  1. Entered sqltools.connections settings

sqltoolsconnections

  1. Connect to database and receive message "currently connected"

  2. Used SQLToolsConnection: Run Query

Expected behavior: [What you expected to happen]
Expected to retrieve data from database

Actual behavior: [What actually happened]
Received error message: "no pg_hba.conf entry for host..."

image

Versions

  • Version: SQLTools v0.12.1
  • OS: Windows 10
  • SGDB: PostgresSQL

You can get this information from executing SQLTools: Version from VSCode Quick Open.

BUG: Keyboard Shortcut for Bookmark Query on MacOS closes VS Code

Issue Type

  • Bugfix/Errors

Prerequisites (For bugfixes)

  • Are you running the latest version?
  • [N/A] Did you check the logs?
  • [N/A] Did you check the Setup?

Description

⌘Q on the Mac is the global command to close the current application. Using the configured Bookmark create keyboard shortcut results in VS Code closing.

Steps to Reproduce (For bugfixes)

  1. Press [command]E [command]Q

Expected behavior: Perform the Bookmark Query function

Actual behavior: Exits the application

Workaround: [shift][command]P → Type: "book" → Click "SQLTools Bookmarks: Create from selection"

Requested fix: Exclude [command] on the second keypress ([command]E Q)

Formatting issues "--"

Issue Type

  • Bug
  • Enhancement
  • Feature Request
  • Question
  • Other

Prerequisites (For bugfixes)

  • [Y] Are you running the latest version?
  • Did you check the logs?
  • Did you check the Setup?

Description

I feel as though I generally write pretty consistent SQL code, however using the reformat option the following code has major issues.

-- Testing SQL Formatting 
SELECT
-- This is a nice comment label
1 Value1,
-- Start of Tables
FROM DUAL

will become the following by using "ctrl+e ctrl+b", which is unusable. Note the " ' " character was included so that the format didn't do anything strange.

-- Testing SQL Formatting
SELECT
  -- This is a nice comment label 
  1 Value1,
  -- Start of Tables
FROM
  DUAL

Please provide config options to control the status bar appearance

I mainly use sqltools to format sql and do not connect to a database. Could you please provide config options to disable the appearance of SQLTools and Connect to database in the status bar.

image

I don't know whether my request is common, but it is definitely helpful to me. Thanks very much!

HANA database support

This is a guideline to help us to understand SQLTools Issues.

You don't need to stick to this, but please try to guide us to reproduce the errors or understand your feature requests.

Issue Type

  • [ x] Feature Request
  • Bugfix/Errors
  • Questions
  • Other

Prerequisites (For bugfixes)

  • Are you running the latest version?
  • Did you check the logs?
  • Did you check the Setup?

Description

[Description of the bug or feature]
I would like to see a HANA database support

Steps to Reproduce (For bugfixes)

  1. [First Step]
  2. [Second Step]
  3. [and so on...]

Expected behavior: [What you expected to happen]

Actual behavior: [What actually happened]

Versions

  • Version: vX.Y.Z
  • OS: ...
  • SGDB: MySQL, PostgresSQL...

You can get this information from executing SQLTools: Version from VSCode Quick Open.

ODBC/JDBC support

This is a guideline to help us to understand SQLTools Issues.

You don't need to stick to this, but please try to guide us to reproduce the errors or understand your feature requests.

Issue Type

  • Feature Request
  • Bugfix/Errors
  • Questions
  • Other

Prerequisites (For bugfixes)

  • Are you running the latest version?
  • Did you check the logs?
  • Did you check the Setup?

Description

I would like to connect not only to MSSQL or MySQL but also to DB2, CSV, Access, etc. using ODBC or JDBC.

Steps to Reproduce (For bugfixes)

  1. [First Step]
  2. [Second Step]
  3. [and so on...]

Expected behavior: [What you expected to happen]
Connection config that allows for JDBC connection and URL
No need to define supported drivers, as this would come along with PATH or CLASSPATH

Actual behavior: [What actually happened]

Versions

  • Version: vX.Y.Z
  • OS: ...
  • SGDB: MySQL, PostgresSQL...

You can get this information from executing SQLTools: Version from VSCode Quick Open.

Copy result row or cell content, messages and query

Issue Type

  • Feature Request
  • Bugfix/Errors
  • Questions
  • Other

Description

As an user, I would like to copy the entire result row, cell, messages or queries from the results screen.

Row could be copied as CSV, SQL Statement or JSON.

format the sql with inline values

Issue Type

  • Bug
  • Enhancement
  • Feature Request
  • Question
  • Other

Prerequisites (For bugfixes)

  • Are you running the latest version?
  • Did you check the logs?
  • Did you check the Setup?

Description

I've get the sql command like insert a(k,k,k) values (a,a,a),(b,b,b),(c,c,c);

Once I formatted the sql commands, it ran out

insert into
  a (
    k,
    k,
    k
  )
values
  (
    a,
    a,
    a
  ),
  (
    b,
    b,
    b
  );

is there anyways to format the commands to

insert into a(k,k,k) values
(a,a,a),
(b,b,b);

Steps to Reproduce (For bugfixes)

  1. [First Step]
  2. [Second Step]
  3. [and so on...]

Expected behavior: [What you expected to happen]

Actual behavior: [What actually happened]

Versions

  • Version:v0.13.0
  • OS: MacOS
  • SGDB: MySQL

You can get this information from executing SQLTools: Version from VSCode Quick Open.

Support for JSON-Fields

Issue Type

  • Feature Request
  • Bugfix/Errors
  • Questions
  • Other

Description

As of version 9.4 (I think) postgresql supports the JSON-Type.
Currently if I query a row with this type the output only displays [object Object].

Since showing the whole JSON within a table gets unreadable very fast, I suggest the JSON content should at least be available through copy&paste (just like one can copy longer texts from the output even though it's truncated). Also showing a truncated version of the content (just like long texts) could be beneficial.

Open results window in same grouping as focused window

Issue Type

  • Feature Request
  • Bugfix/Errors
  • Questions
  • Other

(Not really sure which to classify this as, I'd assume feature request but it may be a bug)

Description

Currently, when you execute a SQL query, the results window automatically opens in the first tab group (top/left). I believe it would make more sense (if possible) to have it open in the same tab group as the focused window, in order to avoid having to constantly move the results window around.

Example: given a setup like this (code on the left, utility queries on the right), I execute the query in the right-hand window.

I would prefer to be able to have the results window open on the right, like this (actual data blurred out for privacy reasons):

image

However, what actually happens is that the results window opens on the left, like this:

I believe it would make for a more streamlined and intuitive experience for the results tab to automatically open in the same tab group as the query that was executed, rather than having to move it every time to produce the desired layout. This could theoretically be made into a config option as well, to allow for either behavior depending on user preference.

Receiving Error "Error selecting connection Error: Connection got disposed." when connecting to MSSQL Server using integrated security

This is a guideline to help us to understand SQLTools Issues.

You don't need to stick to this, but please try to guide us to reproduce the errors or understand your feature requests.

Issue Type

  • Feature Request
  • Bugfix/Errors
  • Questions
  • Other

Prerequisites (For bugfixes)

  • Are you running the latest version?
  • Did you check the logs?
  • Did you check the Setup?

Description

When attempting to connect to a MS SQL Server I get the error message in the title and the following logs are produced

[2018-03-09T14:40:54.][v0.12.1] ERROR: Error selecting connection: 
[2018-03-09T14:40:54.][v0.12.1] Error: Connection got disposed.
	at Object.dispose (C:\Users\ejbrer\.vscode\extensions\mtxr.sqltools-0.12.1\node_modules\vscode-jsonrpc\lib\main.js:825:25)
	at Object.dispose (C:\Users\ejbrer\.vscode\extensions\mtxr.sqltools-0.12.1\node_modules\vscode-languageclient\lib\client.js:57:35)
	at LanguageClient.handleConnectionClosed (C:\Users\ejbrer\.vscode\extensions\mtxr.sqltools-0.12.1\node_modules\vscode-languageclient\lib\client.js:1864:38)
	at LanguageClient.handleConnectionClosed (C:\Users\ejbrer\.vscode\extensions\mtxr.sqltools-0.12.1\node_modules\vscode-languageclient\lib\main.js:106:15)
	at closeHandler (C:\Users\ejbrer\.vscode\extensions\mtxr.sqltools-0.12.1\node_modules\vscode-languageclient\lib\client.js:1852:18)
	at CallbackList.invoke (C:\Users\ejbrer\.vscode\extensions\mtxr.sqltools-0.12.1\node_modules\vscode-jsonrpc\lib\events.js:71:39)
	at Emitter.fire (C:\Users\ejbrer\.vscode\extensions\mtxr.sqltools-0.12.1\node_modules\vscode-jsonrpc\lib\events.js:135:36)
	at closeHandler (C:\Users\ejbrer\.vscode\extensions\mtxr.sqltools-0.12.1\node_modules\vscode-jsonrpc\lib\main.js:221:26)
	at CallbackList.invoke (C:\Users\ejbrer\.vscode\extensions\mtxr.sqltools-0.12.1\node_modules\vscode-jsonrpc\lib\events.js:71:39)
	at Emitter.fire (C:\Users\ejbrer\.vscode\extensions\mtxr.sqltools-0.12.1\node_modules\vscode-jsonrpc\lib\events.js:135:36)

Steps to Reproduce (For bugfixes)

  1. Configure a connection for an MSSQL Server with a config similar to below (sanitized)
  2. Try and connect
"sqltools.connections": [
			{
				"name": "db",
				"server": "db",
				"dialect": "MSSQL",
				"port": 1433,
				"database": "someDb",
				"username": "ejbrer",
				"askForPassword": false,
				"password": null,
				"domain": "domain",
				"connectionTimeout": 15
			}

Expected behavior: [What you expected to happen]

The software to connect to the database

Actual behavior: [What actually happened]

An error is displayed and the software is not connected to the database

Versions

  • Version: v0.12.1
  • OS: Windows 10
  • SGDB: MS SQL Server 2012

You can get this information from executing SQLTools: Version from VSCode Quick Open.

autoConnectTo not working

Thanks again for the awesome work!
I am trying to use the option autoConnectTo but it doesn't seem to be working.

The following is my workplace settings file:

"sqltools.connections": [{ "name": "sh-dev", "server": "xx.xx.xx.xx", "port": 3306, "database": "******", "username": "******", "password": "******", "dialect": "MySQL" }], "sqltools.autoConnectTo": "sh-dev"

Is there anything wrong with my settings?
(sorry I couldn't manage to show multiple lines)

Could not connect (sequence)

Issue Type

  • Feature Request
  • Bugfix/Errors
  • Questions
  • Other

Prerequisites (For bugfixes)

  • Are you running the latest version?
  • Did you check the logs?
  • Did you check the Setup?

Description

I'm installing and trying to connect for the first time and I'm getting the error below.

Steps to Reproduce (For bugfixes)

  1. Installed Extension
  2. Added a connection to MSSQL Server
  3. Try to connect

Expected behavior:

Connected to DB

Actual behavior:

Failed to connect to dev-sql003:3306 - Could not connect (sequence)

[2018-01-19T20:38:00.][v0.11.4] INFO: Telemetry enabled!
[2018-01-19T20:38:00.][v0.11.4] INFO: Configuration set to auto connect to: null
[2018-01-19T20:38:00.][v0.11.4] INFO: Language server started in 330.387669ms
[2018-01-19T20:38:07.][v0.11.4] ERROR: Error while preparing columns completions
[2018-01-19T20:38:07.][v0.11.4] {"code":"ESOCKET","originalError":{"message":"Failed to connect to dev-sql003:3306 - Could not connect (sequence)","code":"ESOCKET"},"name":"ConnectionError"}
[2018-01-19T20:38:07.][v0.11.4] ERROR: Failed to prepare sidebar itens
[2018-01-19T20:38:07.][v0.11.4] {"code":"ESOCKET","originalError":{"message":"Failed to connect to dev-sql003:3306 - Could not connect (sequence)","code":"ESOCKET"},"name":"ConnectionError"}
[2018-01-19T20:38:07.][v0.11.4] ERROR: Error selecting connection: 
[2018-01-19T20:38:07.][v0.11.4] Error: Failed to connect to dev-sql003:3306 - Could not connect (sequence)
	at Connection.base.ConnectionPool._poolCreate.base.Promise.tedious.once.err (/Users/richard/.vscode-insiders/extensions/mtxr.sqltools-0.11.4/node_modules/mssql/lib/tedious.js:216:17)
	at Object.onceWrapper (events.js:293:19)
	at emitOne (events.js:96:13)
	at Connection.emit (events.js:191:7)
	at Connection.socketError (/Users/richard/.vscode-insiders/extensions/mtxr.sqltools-0.11.4/node_modules/tedious/lib/connection.js:699:14)
	at /Users/richard/.vscode-insiders/extensions/mtxr.sqltools-0.11.4/node_modules/tedious/lib/connection.js:590:25
	at SequentialConnectionStrategy.connect (/Users/richard/.vscode-insiders/extensions/mtxr.sqltools-0.11.4/node_modules/tedious/lib/connector.js:153:9)
	at Socket.onError (/Users/richard/.vscode-insiders/extensions/mtxr.sqltools-0.11.4/node_modules/tedious/lib/connector.js:169:16)
	at emitOne (events.js:96:13)
	at Socket.emit (events.js:191:7)

Versions

  • Version: v0.11.4
  • OS: macOS 10.13.2
  • SGDB: MSSQL

After bump to 0.15 on marketplace, release notes are a 404 when plug-in updates

Issue Type

  • Bug
  • Enhancement
  • Feature Request
  • Question
  • Other

Prerequisites (For bugfixes)

  • Are you running the latest version?
  • Did you check the logs?
  • Did you check the Setup?

Description

After the latest update is run, clicking on Release Notes button, you are directed to https://github.com/mtxr/vscode-sqltools/blob/master/static/release-notes/v0.15.x.md which currently doesn't exist. You probably just haven't gotten to it yet, but I figured I'd open it for others that might hit this.

Oracle DB support

This is a guideline to help us to understand SQLTools Issues.

You don't need to stick to this, but please try to guide us to reproduce the errors or understand your feature requests.

Issue Type

  • Feature Request
  • Bugfix/Errors
  • Questions
  • Other

Prerequisites (For bugfixes)

  • Are you running the latest version?
  • Did you check the logs?
  • Did you check the Setup?

Description

Hi, it's possible to use it with Oracle DB?

Windows has sqltools.log_level, unix has sqltools.logLevel ?

Issue Type

  • Question

Prerequisites (For bugfixes)

Windows: VSCode 1.17.2, SQLTools v0.7.4
Linux: VSCode 1.19.2, SQLTools v0.11.3

I can not update either of the SQLTools extensions in VSCode.

Description

Opening the settings,
I get a Warning about the Loglevel setting:

file: 'file:///c%3A/Users/wagner/AppData/Roaming/Code/User/settings.json'
severity: 'Warnung'
message: 'Unknown configuration setting'
at: '37,5'
source: ''

In windows, suggestions for sqltools.log* contain only "logging", but I get no warning for "log_level". But I do get a warning for "logLevel". In Linux, suggestions contain "logging" and "logLevel", and I get no warning for "logLevel", but get one for "log_level"...

I would prefer both settings to be called identically (and to have a corresponding suggestion in windows).
Maybe it is only a matter of getting a newer version of the extension installed in windows, tho. Then this is a request to put the new version into the extension "store". Or how would I go about updating it manually?

Thanks and cheers,

Andreas

Tracking users without their permission

Why is the telemetry enabled by default?

According to GDPR in order to collect the data of European users, the user has to opt-in. Tracking European users without their permission is illegal.

ConnectionError: Login Failed for user <username>

This is a guideline to help us to understand SQLTools Issues.

You don't need to stick to this, but please try to guide us to reproduce the errors or understand your feature requests.

Issue Type

  • Feature Request
  • Bugfix/Errors
  • Questions
  • Other

Prerequisites (For bugfixes)

  • Are you running the latest version?
  • Did you check the logs?
  • Did you check the Setup?

Description

As stated in issue nr 65. I'm still not able to connect to sql server. Resolving Issue #60 didn't bring a solution to my problem. I'm using the following information to connect:

"sqltools.connections": [
{
"name": "Test",
"server": "svr-t-evasql01.otapp.local",
"dialect": "MSSQL",
"port": 1433,
"database": "EvaSfh",
"username": "domainname\Jeordiep",
"askForPassword": false,
"connectionTimeout": 60
}
]
I use integrated security = true to connect to sql server

The following error occurs in the log:

Query error: { ConnectionError: Login failed for user 'domainname\Jeordiep'.
at ConnectionError (C:\Users\jeordiep.vscode\extensions\mtxr.sqltools-0.12.0\node_modules\tedious\lib\errors.js:12:12)
at Parser. (C:\Users\jeordiep.vscode\extensions\mtxr.sqltools-0.12.0\node_modules\tedious\lib\connection.js:507:33)
at emitOne (events.js:96:13)
at Parser.emit (events.js:191:7)
at Parser. (C:\Users\jeordiep.vscode\extensions\mtxr.sqltools-0.12.0\node_modules\tedious\lib\token\token-stream-parser.js:54:15)
at emitOne (events.js:96:13)
at Parser.emit (events.js:191:7)
at addChunk (C:\Users\jeordiep.vscode\extensions\mtxr.sqltools-0.12.0\node_modules\readable-stream\lib_stream_readable.js:284:12)
at readableAddChunk (C:\Users\jeordiep.vscode\extensions\mtxr.sqltools-0.12.0\node_modules\readable-stream\lib_stream_readable.js:271:11)
at Parser.Readable.push (C:\Users\jeordiep.vscode\extensions\mtxr.sqltools-0.12.0\node_modules\readable-stream\lib_stream_readable.js:238:10)
message: 'Login failed for user 'domainname\Jeordiep'.',
code: 'ELOGIN' }
Error while preparing columns completions { ConnectionError: Login failed for user '\Jeordiep'.
at ConnectionError (C:\Users\jeordiep.vscode\extensions\mtxr.sqltools-0.12.0\node_modules\tedious\lib\errors.js:12:12)
at Parser. (C:\Users\jeordiep.vscode\extensions\mtxr.sqltools-0.12.0\node_modules\tedious\lib\connection.js:507:33)
at emitOne (events.js:96:13)
at Parser.emit (events.js:191:7)
at Parser. (C:\Users\jeordiep.vscode\extensions\mtxr.sqltools-0.12.0\node_modules\tedious\lib\token\token-stream-parser.js:54:15)
at emitOne (events.js:96:13)
at Parser.emit (events.js:191:7)
at addChunk (C:\Users\jeordiep.vscode\extensions\mtxr.sqltools-0.12.0\node_modules\readable-stream\lib_stream_readable.js:284:12)
at readableAddChunk (C:\Users\jeordiep.vscode\extensions\mtxr.sqltools-0.12.0\node_modules\readable-stream\lib_stream_readable.js:271:11)
at Parser.Readable.push (C:\Users\jeordiep.vscode\extensions\mtxr.sqltools-0.12.0\node_modules\readable-stream\lib_stream_readable.js:238:10)
message: 'Login failed for user 'domainname\Jeordiep'.',
code: 'ELOGIN' }

Concern toward rendering HTML content in cells

This is a guideline to help us to understand SQLTools Issues.

You don't need to stick to this, but please try to guide us to reproduce the errors or understand your feature requests.

Issue Type

  • Feature Request
  • Bugfix/Errors
  • Questions
  • Other

Prerequisites (For bugfixes)

  • Are you running the latest version?
  • Did you check the logs?
  • Did you check the Setup?

Description

Currently the SQLTools results page is rendering HTML contents(including images and videos) which was store in the row.
This should be avoided because these HTML could have malicious user generated contents among them.
I am suggesting to have the text output(similar in sublime) to be enabled by default and have HTML rendering to be enable as a user option.
Currently I am querying thousands of rows and each rows may have multiple images, autoplay videos... to be rendered. This not only affect performance of my machine but also security.

Steps to Reproduce (For bugfixes)

  1. Create a table in which have a column type text
  2. Insert a row with said column containing HTML contents(images, videos autoplay etc...)
  3. Query that row with SQL Tools

Expected behavior: Should generate text content similar to mysql CLI or sqltools in sublime text

Actual behavior: HTML contents being rendered in VS Code window, videos being autoplayed.

Versions

  • Version: Using SQLTools v0.5.1
  • OS: Ubuntu 16 LTS
  • SGDB: MySQL

You can get this information from executing SQLTools: Version from VSCode Quick Open.

Not able to connect

This is a guideline to help us to understand SQLTools Issues.

You don't need to stick to this, but please try to guide us to reproduce the errors or understand your feature requests.

Issue Type

  • Feature Request
  • Bugfix/Errors
  • Questions
  • Other

Prerequisites (For bugfixes)

  • Are you running the latest version?
  • Did you check the logs?
  • Did you check the Setup?

Description

I'm not able to connect to an MSSQL database. I think the problem is that I have to use a domainname before my username. These are the settings I'm using right now

"sqltools.connections": [ { "name": "Test2", "server": "svr-t-evasql01.otapp.local", "dialect": "MSSQL", "port": 1433, "database": "<dbname>", "username": "<domain>\<username>", "askForPassword": false, "password": null, "connectionTimeout": 60 } ]

I'm getting the following error in the log:
[2018-02-20T08:01:19.][v0.11.4] {"code":"ELOGIN","originalError":{"message":"Login failed for user '<username>'.","code":"ELOGIN"},"name":"ConnectionError"}
[2018-02-20T08:01:19.][v0.11.4] ERROR: Error while preparing columns completions
[2018-02-20T08:01:19.][v0.11.4] {"code":"ELOGIN","originalError":{"message":"Login failed for user '<username>'.","code":"ELOGIN"},"name":"ConnectionError"}

I'm also using the mssql extension with the following connection settings:

"mssql.connections": [ { "server": "svr-t-evasql01.otapp.local", "database": "<dbname>", "authenticationType": "Integrated", "profileName": "Test1", "password": "" }

Formatting keybindings aren't triggering formatting

Issue Type

  • Bug
  • Enhancement
  • Feature Request
  • Question
  • Other

Prerequisites (For bugfixes)

  • Are you running the latest version?
  • Did you check the logs?
  • Did you check the Setup?

Description

With the default configuration for VS Code and SQLTools, Linux, following the instructions in the readme for formatting SQL with the keybindings (ctrl+e, ctrl+b) results in attempting to run the query (ctrl + e) or the explorer sidebar has visibility toggled.

Note: using the command palette to select "SQLTools: Format SQL (for any doc)" results in the intended behavior, but the entry in the command palette also shows the incorrect keybindings.

Steps to Reproduce (For bugfixes)

  1. Select a section of a document with SQL code or focus a tab on a document.
  2. Press ctrl+e or ctrl+b to beautify code.

Expected behavior: SQL code is formatted.

Actual behavior:

  • Ctrl+e: Extension attempts to run the query, which fails.
  • Ctrl+b: Explorer bar's visibility is toggled.

Versions

  • Version: v0.12.1
  • OS: Linux (Debian testing, 64 bit)
  • SGDB: Postgres

SQLite Support

Issue Type

  • Feature Request
  • Bugfix/Errors
  • Questions
  • Other

Prerequisites (For bugfixes)

  • Are you running the latest version?
  • Did you check the logs?
  • Did you check the Setup?

Description

Add SQLite support

Schemas are not supported (postgresql)

This is a guideline to help us to understand SQLTools Issues.

You don't need to stick to this, but please try to guide us to reproduce the errors or understand your feature requests.

Issue Type

  • Feature Request
  • [x ] Bugfix/Errors
  • Questions
  • Other

Prerequisites (For bugfixes)

  • [x ] Are you running the latest version?
  • Did you check the logs?
  • Did you check the Setup?

Description

[Description of the bug or feature]
I have a database where all tables belons to different schemas. This extension lists all tables as if they are in database (root schema)

Steps to Reproduce (For bugfixes)

  1. [First Step]
  2. [Second Step]
  3. [and so on...]

Expected behavior: [What you expected to happen]

Actual behavior: [What actually happened]

Versions

  • Version: vX.Y.Z
  • OS: ...
  • SGDB: MySQL, PostgresSQL...

You can get this information from executing SQLTools: Version from VSCode Quick Open.

Server Requires Encryption error

This is a guideline to help us to understand SQLTools Issues.

You don't need to stick to this, but please try to guide us to reproduce the errors or understand your feature requests.

Issue Type

  • Feature Request
  • [x ] Bugfix/Errors
  • Questions
  • Other

Prerequisites (For bugfixes)

  • [x ] Are you running the latest version?
  • [x ] Did you check the logs?
  • [x ] Did you check the Setup?

Description

[Description of the bug or feature]

Followed through with the setup procedure and experimented with different types of set ups, always terminating in this error: "Error Selecting connection" and "Server Requires encryption, set 'encrypt' to true."

Of course, added encrypt option and set to true with no success.

Steps to Reproduce (For bugfixes)

  1. [First Step]
    Follow Connection Setup for MSSQL
  2. [Second Step]
    Connect to DB (ask for password or dont)
  3. [Third Step]
    Encryption Error

Expected behavior: [What you expected to happen]

Should be able to connect at this point and fill out side bar.

Actual behavior: [What actually happened]

Server does show its connected on bottom status bar but log errors show it is not and side bar is not filled out.

Versions

  • Version: v0.11.4
  • OS: macOS Sierra
  • SGDB: MSSQL

You can get this information from executing SQLTools: Version from VSCode Quick Open.

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.