Closed dmytro-lytvyn closed 2 months ago
Hi @archiewood could you please have a look at this PR?
This looks sensible enough, will try to test and release later in the week.
Feel free to bug me about this.
Hi @archiewood did you have a chance to test this? 🙏 We have around 60 datasets in one project (bad design, to be changed soon I hope) and they are very hard to navigate from VSCode with SQLTools because of random order 😅
Thanks for the reminder, this works great!
I'm confused, when I'm debugging this change locally in VSCode it works, and yet when I update or fully reinstall the extension v0.0.7 from the marketplace, it still doesn't sort the schemas 😞 Could it be that this change was not included in the build somehow @archiewood ? 🤔
Yup, confirmed - it's included in the source code, but not inside the unzipped sqltools-bigquery-driver-0.0.7.vsix file (/extension/out/ls/queries.js):
const fetchSchemas = (0, factory_1.default) `
SELECT
schema_name as label,
schema_name as schema,
'${types_1.ContextValue.SCHEMA}' as type,
'schema' as detail,
'group-by-ref-type' as iconId
FROM INFORMATION_SCHEMA.SCHEMATA
`;
const fetchDatabases = (0, factory_1.default) `
SELECT
catalog_name as label,
catalog_name as database,
'${types_1.ContextValue.DATABASE}' as type,
'database' as detail
FROM INFORMATION_SCHEMA.SCHEMATA
GROUP BY catalog_name
`;
Maybe you uploaded the wrong artifact by mistake?
Thanks for flagging
I'll take a look at this next week
Hi @archiewood sorry for bothering you, just a reminder to re-upload the artifact for v0.0.7 😊
I've just reuploaded: version is 0.0.8 as you can't reuse version tags!
Confirm sorted tables on my end:
Confirmed, fixed it on my side too, thanks a lot! ❤️
This PR adds sorting to the list of databases and schemas (datasets), as described in the issue https://github.com/evidence-dev/sqltools-bigquery-driver/issues/21