I'm using sql-lint through(?) Inline SQL VS Code extension. I added the configuration to make it establish a connection to my postgres database like so:
{
"inlineSQL.dbDriver": "postgres",
"inlineSQL.dbHost": "localhost",
"inlineSQL.dbPort": 5432,
"inlineSQL.dbUser": "docker",
"inlineSQL.dbPassword": "docker",
"inlineSQL.enableDBIntegration": true,
"inlineSQL.lintSQLFiles": false
}
I wrote a test query in my javascript file like so:
const x = `--sql
SELECT * FROM accounts;
`;
But it's giving me this error:
[error] relation "accounts" does not exist
Whereas I know for a fact and confirmed that that relation did exist.
--
One thing that I suspect that is causing this issue is that in my postgres connection port, I host 4 different databases. Since I wasn't able to specify the exact database that I want the linter to connect to, I think the linter is not able to find the correct database by itself.
So, if this is valid, could you please add the feature to be able to specify the name of the database in the linter config file so that it can also be adopted by the extension specified above?
Thanks in advance
I'm using
sql-lintthrough(?) Inline SQL VS Code extension. I added the configuration to make it establish a connection to my postgres database like so:{ "inlineSQL.dbDriver": "postgres", "inlineSQL.dbHost": "localhost", "inlineSQL.dbPort": 5432, "inlineSQL.dbUser": "docker", "inlineSQL.dbPassword": "docker", "inlineSQL.enableDBIntegration": true, "inlineSQL.lintSQLFiles": false }I wrote a test query in my javascript file like so:
But it's giving me this error:
Whereas I know for a fact and confirmed that that relation did exist.
--
One thing that I suspect that is causing this issue is that in my postgres connection port, I host 4 different databases. Since I wasn't able to specify the exact database that I want the linter to connect to, I think the linter is not able to find the correct database by itself.
So, if this is valid, could you please add the feature to be able to specify the name of the database in the linter config file so that it can also be adopted by the extension specified above?
Thanks in advance