profile
viewpoint
Matheus Teixeira mtxr mteixeira São Paulo/Brazil https://mteixeira.dev Software Engineer @vendoo

mtxr/docker-php-nginx 4

PHP + Nginx docker image

mtxr/dotfiles 4

Basic workstation setup

mtxr/sqltools-formatter 4

This package is part of vscode-sqltools extension.

mtxr/CudaText-SQLTools 3

SQLTools for CudaText

mtxr/laravel-flash-message 2

Flash messages made easy. Based on laracasts/flash

mtxr/parcel 1

📦🚀 Blazing fast, zero configuration web application bundler

mtxr/psensor 1

Mirror to https://gitlab.com/mtxr/psensor. Forked from https://gitlab.com/jeanfi/psensor

mtxr/simple-videochat-webrtc 1

Video chat between 2 people using simple-peer

mtxr/awesome-zsh-plugins 0

A collection of ZSH frameworks, plugins & themes inspired by the various awesome list collections out there.

mtxr/baseConverter 0

MIPS Assembly Base Converter

startedmtxr/vscode-sqltools

started time in a day

issue commentmtxr/vscode-sqltools

Unable to install sqlite3 npm package

Further info, I setup a new Ubuntu 20.04 Virtual machine, and installed npm and node via the APT package manager (as opposed to following the info on https://nvm.sh), and after restarting my vscode session, I was able to get sqlite to work properly.

My guess is the script is looking in a certain place for the sqlite node modules but cant find them there and then it fails. This would explain why it can successfully install them correctly (npm handles the installation, not this package). I have not figured out where the sqlite library is looking for the sqlite node module however.

jamesmyatt

comment created time in a day

startedapple/swift-http-structured-headers

started time in 2 days

issue commentmtxr/vscode-sqltools

Can not find npm

I had the same problem and fixing the path didn't do the job for me. I got it working (on the Mac) using the following steps. If you are not on a Mac it may still be the right steps, you just have to figure out the paths yourself.

First step is to go to the directory where vscode-sqltools stores its dependencies:

cd
cd 'Library/Application Support/vscode-sqltools'

Next make certain that the dependency is in the file package.json. My file looks like this:

{
  "dependencies": {
    "sqlite3": "^4.2.0"
  }
}

If that is the case (you may have more dependencies, just make certain that the sqlite dependency is present) take the following steps:

rm package-lock.json
rm -rf node_modules
npm i

You should be all set now.

Note that I first tried it without removing package-lock.json. That showed the underlying problem. I got an error from a tool called gyp. This is the most informative line:

gyp: Undefined variable module_name in binding.gyp while trying to load binding.gyp

So by removing package-lock.json and fully rebuildingnode_modules I fixed the problem.

louis-bec

comment created time in 2 days

issue commentmtxr/vscode-sqltools

Unable to view schema for Redshift

Because the maintainer seems busy currently, I published the quick fix version of redshift driver for this issue. If anyone want the quick fix for this issue (like me), please use this extention.

Dear @mtxr, As soon as this issue is solved for current PostgreSQL driver, I will unpublish this driver.

rjshanahan

comment created time in 3 days

fork tkopets/PostgresTimeseriesAnalysis

Experiments for Timeseries Analysis with Postgres

fork in 4 days

issue commentmtxr/vscode-sqltools

Unable to install sqlite3 npm package

I am experiencing the same issue. Below is my log of trying to connect to the sqlite database, running the install prompt, and then trying to connect again. Basically, it is stuck in a loop where it cant seem to find the installed dependency, but there isn't much in the way of errors coming back, except for a failed connection.

[1611124698600]` INFO  (ext): EXECUTING COMMAND => sqltools.selectConnection
[1611124698600] INFO  (ext): EXECUTING COMMAND => sqltools.getConnections
[1611124698601] INFO  (ls): REQUEST RECEIVED => connection/GetConnectionsRequest
[1611124698602] INFO  (ext): EXECUTING COMMAND => sqltools.getConnections
[1611124698602] INFO  (ls): REQUEST RECEIVED => connection/GetConnectionsRequest
[1611124698602] INFO  (ls): REQUEST RECEIVED => connection/ConnectRequest
[1611124698603] INFO  (ls): Connection instance created for Football Sim Position Map.
    ns: "conn-manager"
[1611124698604] ERROR (ls): Connecting error: {"code":1000,"data":{"notification":"Core/missingModule","dontNotify":true,"args":{"conn":{"previewLimit":100,"database":"${workspaceFolder:football-sim}/backend/database/position_map.db","driver":"SQLite","name":"Football Sim Position Map","isActive":false,"isConnected":false,"id":"Football Sim Position Map|SQLite||${workspaceFolder:football-sim}\\backend\\database\\position_map:db"},"action":"install","deps":[{"type":"package","name":"sqlite3","version":"4.2.0"}]}}}
    ns: "conn-manager"
[1611124698607] INFO  (ext): Connection explorer changed. Will be updated.
    ns: "conn-man:explorer"
[1611124698611] INFO  (ext): EXECUTING COMMAND => sqltools.getConnections
[1611124698611] INFO  (ls): REQUEST RECEIVED => connection/GetConnectionsRequest
[1611124700551] INFO  (ls): REQUEST RECEIVED => DependencyInstaller/install
[1611124700551] INFO  (ls): Will install sqlite3 package
    ns: "dep-man"

up to date, audited 69 packages in 476ms

1 package is looking for funding
  run `npm fund` for details

found 0 vulnerabilities
[1611124701097] INFO  (ls): Finished sqlite3 script
    ns: "dep-man"
[1611124701097] INFO  (ls): Finished installing deps
    ns: "dep-man"
[1611124703092] INFO  (ext): EXECUTING COMMAND => sqltools.selectConnection
[1611124703093] INFO  (ext): EXECUTING COMMAND => sqltools.getConnections
[1611124703093] INFO  (ls): REQUEST RECEIVED => connection/GetConnectionsRequest
[1611124703094] INFO  (ext): EXECUTING COMMAND => sqltools.getConnections
[1611124703094] INFO  (ls): REQUEST RECEIVED => connection/GetConnectionsRequest
[1611124703095] INFO  (ls): REQUEST RECEIVED => connection/ConnectRequest
[1611124703095] INFO  (ls): Connection instance created for Football Sim Position Map.
    ns: "conn-manager"
[1611124703097] ERROR (ls): Connecting error: {"code":1000,"data":{"notification":"Core/missingModule","dontNotify":true,"args":{"conn":{"previewLimit":100,"database":"${workspaceFolder:football-sim}/backend/database/position_map.db","driver":"SQLite","name":"Football Sim Position Map","isActive":false,"isConnected":false,"id":"Football Sim Position Map|SQLite||${workspaceFolder:football-sim}\\backend\\database\\position_map:db"},"action":"install","deps":[{"type":"package","name":"sqlite3","version":"4.2.0"}]}}}
    ns: "conn-manager"
[1611124703098] INFO  (ext): Connection explorer changed. Will be updated.
    ns: "conn-man:explorer"
[1611124703101] INFO  (ext): EXECUTING COMMAND => sqltools.getConnections
[1611124703102] INFO  (ls): REQUEST RECEIVED => connection/GetConnectionsRequest
jamesmyatt

comment created time in 5 days

issue commentmtxr/vscode-sqltools

Can't see tables in Connection Explorer - get "Nothing here"

@KerimG Thanks a lot, I really solve this issue

BrendanSimon

comment created time in 6 days

issue commentmtxr/vscode-sqltools

Unable to view schema for Redshift

@rjshanahan can you try to manually run this query:

https://github.com/mtxr/vscode-sqltools/blob/134e38769adf6f7ffe79b5dd84cdf12a9bfcc058/packages/driver.pg/src/ls/queries.ts#L207

Of course, changing to valid values, let me know if you get any errors

I checked information_schema.schemata and it only returns schemas that my user owns. It seems AWS changed the behavior at some point of time.

I also tired to replace that query and I look trough some options. I'm happy if this summary helps:

  1. Use pg_* tables which seems more supported by AWS
  2. Use redshift-specific system views as mentioned [here].(https://docs.aws.amazon.com/redshift/latest/dg/c_join_PG_examples.html).
  3. Use information_schema.tables instead and make result rows distinct.

I think option1 is the most simple way, but unfortunately I could not find way to relate database names and schema names only using pg_* tables so far.

option2 may be the more reliable than option3, because there is an official documentation in AWS webpage. The downside is that it will break compatibility with postgres, requires an additional logic (I'm not sure because I'm new to SQLtools).

option3 is easy fix, I found it works in my redshift cluster and compatible with postgres test env. So I can send the pull request. It introduces distinct operation, but will not significantly effect performance I think.

Now, need some discussion around these options?

ps. just my personal view, I feel redshift starts to deviate a bit from postgres. e.g. redshift now has external tables which postgres does not have, and these external tables are not shown in SQL tools(I will create issue for that). So they becaming different things, we might need separete logics for redshift and postgres in the future?

rjshanahan

comment created time in 7 days

startedmtxr/SublimeText-SQLTools

started time in 7 days

startedmtxr/vscode-sqltools

started time in 8 days

startedmtxr/vscode-sqltools

started time in 8 days

startedkettanaito/naming-cheatsheet

started time in 9 days

startedmtxr/vscode-sqltools

started time in 9 days

issue commentmtxr/vscode-sqltools

Unable to view schema for Redshift

Same issue here

rjshanahan

comment created time in 10 days

startedmtxr/vscode-sqltools

started time in 10 days

startedmtxr/vscode-sqltools

started time in 10 days

startedmtxr/vscode-sqltools

started time in 10 days

startedmtxr/vscode-sqltools

started time in 10 days

fork sagarsinha7777/dotfiles-1

Basic workstation setup

fork in 11 days

issue openedmtxr/vscode-sqltools

Error Message on Database Connect: "Cannot read property 'localeCompare' of undefined"

Trying to connect to a Microsoft SQL Server that uses integrated AD security. My connection string looks like this: "server=MYSERVERHERE;database=MYDATABASEHERE;Integrated Security=true;User ID=MYDOMAIN\MYUSERNAME;Password=MYPASSWORD"

Clicking "Test Connection" works, and gives the message that the connection was successful.

However, clicking "Save Connection" presents the error message "Request connection/GetConnectionsRequest failed with message: Cannot read property 'localeCompare' of undefined"

I am a bit of a database and VS Code novice. Anyone have any ideas on how to fix? Is this a non-issue?

created time in 11 days

startedmtxr/vscode-sqltools

started time in 11 days

startedmtxr/vscode-sqltools

started time in 12 days

issue openedmtxr/vscode-sqltools

Unable to install sqlite3 npm package

Describe the bug

I am unable to install the sqlite3 npm package, because there is a loop of the extension asking to install it.

I am able to install the sqlite3 npm package outside of vscode in an arbitrary directory using npm install sqlite3@4.2.0.

<details>

[1610487207492] INFO  (ext): EXECUTING COMMAND => sqltools.selectConnection
[1610487207492] INFO  (ext): EXECUTING COMMAND => sqltools.getConnections
[1610487207492] INFO  (ls): REQUEST RECEIVED => connection/GetConnectionsRequest
[1610487207494] INFO  (ext): EXECUTING COMMAND => sqltools.getConnections
[1610487207495] INFO  (ls): REQUEST RECEIVED => connection/GetConnectionsRequest
[1610487207496] INFO  (ls): REQUEST RECEIVED => connection/ConnectRequest
[1610487207496] INFO  (ls): Connection instance created for database.
    ns: "conn-manager"
[1610487207502] ERROR (ls): Connecting error: {"code":1000,"data":{"notification":"Core/missingModule","dontNotify":true,"args":{"conn":{"previewLimit":50,"driver":"SQLite","database":"${workspaceFolder:project}/data/database.sqlite","name":"database","isActive":false,"isConnected":false,"id":"database|SQLite||${workspaceFolder:project}\\data\\database:sqlite"},"action":"install","deps":[{"type":"package","name":"sqlite3","version":"4.2.0"}]}}}
    ns: "conn-manager"
[1610487207505] INFO  (ext): Connection explorer changed. Will be updated.
    ns: "conn-man:explorer"
[1610487207507] INFO  (ext): EXECUTING COMMAND => sqltools.getConnections
[1610487207507] INFO  (ls): REQUEST RECEIVED => connection/GetConnectionsRequest
[1610487209186] INFO  (ls): REQUEST RECEIVED => DependencyInstaller/install
[1610487209186] INFO  (ls): Will install sqlite3 package
    ns: "dep-man"

up to date, audited 69 packages in 2s

1 package is looking for funding
  run `npm fund` for details

found 0 vulnerabilities
[1610487211461] INFO  (ls): Finished sqlite3 script
    ns: "dep-man"
[1610487211461] INFO  (ls): Finished installing deps
    ns: "dep-man"
[1610487212553] INFO  (ext): EXECUTING COMMAND => sqltools.selectConnection
[1610487212553] INFO  (ext): EXECUTING COMMAND => sqltools.getConnections
[1610487212553] INFO  (ls): REQUEST RECEIVED => connection/GetConnectionsRequest
[1610487212554] INFO  (ext): EXECUTING COMMAND => sqltools.getConnections
[1610487212554] INFO  (ls): REQUEST RECEIVED => connection/GetConnectionsRequest
[1610487212555] INFO  (ls): REQUEST RECEIVED => connection/ConnectRequest
[1610487212555] INFO  (ls): Connection instance created for database.
    ns: "conn-manager"
[1610487212560] ERROR (ls): Connecting error: {"code":1000,"data":{"notification":"Core/missingModule","dontNotify":true,"args":{"conn":{"previewLimit":50,"driver":"SQLite","database":"${workspaceFolder:project}/data/database.sqlite","name":"database","isActive":false,"isConnected":false,"id":"database|SQLite||${workspaceFolder:project}\\data\\database:sqlite"},"action":"install","deps":[{"type":"package","name":"sqlite3","version":"4.2.0"}]}}}
    ns: "conn-manager"
[1610487212561] INFO  (ext): Connection explorer changed. Will be updated.
    ns: "conn-man:explorer"
[1610487212575] INFO  (ext): EXECUTING COMMAND => sqltools.getConnections
[1610487212575] INFO  (ls): REQUEST RECEIVED => connection/GetConnectionsRequest

</details>

To Reproduce Steps to reproduce the behavior:

  1. Install sqltools and sqlite3 driver extensions
  2. Connect to sqlite database
  3. Message: "You need to install "sqlite3@4.2.0" to connect to <database>.". Click "Install Now"
  4. Message: ""sqlite3@4.2.0" installed! Go ahead and connect!". Click "Connect to <database>".
  5. goto 3

Expected behavior

Installs sqlite3 package and opens database

Screenshots N/A

Desktop (please complete the following information):

  • SQLTools Version 0.23.0
  • VSCode Version: 1.52.1
  • OS: Windows
  • Driver:
    • [ ] PostgreSQL/Redshift
    • [ ] MySQL/MariaDB
    • [ ] MSSQL/Azure
    • [x] SQLite 0.2.0
    • [ ] Other? Which...
  • Database version: sqlite

Additional context N/A

created time in 13 days

more