-
Notifications
You must be signed in to change notification settings - Fork 69
Conversation
I'll add support for Microsoft SQL Server tomorrow. I forgot to put if statements in db.spec.js for SQL Server in those two tests. |
@@ -107,6 +109,15 @@ async function listTables(server, database) { | |||
return database.connection.listTables(); | |||
} | |||
|
|||
async function listViews(server, database) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as does not have usage of await inside block it does not need to have async
Support for SQL Server is now up and tests are passing. Sorry for few extra builds, I had some troubles debugging as I don't use SQL Server 2008 regularly. Please check client.js, I saw Next, I think it's best to enable viewing routines and views in GUI, and later add triggers and columns lists under each table separately. Cheers, |
ORDER BY routine_name | ||
`; | ||
const params = []; | ||
client.query(sql, params, (err, data) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as params is not used anywhere else, perhaps you can pass directly one []...
client.query(sql, [], (err, data) => {
@BornaP thanks for the pull request. I guess is everything right. I agree breaking the load of triggers and column names in a different pull request. Will be easier for you to implement and for us to review. @krolow I will accept the pull request with those params variables because I think is more readable. |
Just what I wanted to say for *params * variables. Glad to see pull request accepted! |
Pull request related to issue #98 on sqlectron-gui repository. As a part of solving that issue, I've implemented functions for listing views and routines which can now be used in sqelctron-gui. Since PostgreSQL only has functions as routines type, while MySQL and Microsoft SQL Server have both procedures and functions as a routines, listRoutines is returning
{ routineName, routineType }
objects, so that procedures and functions can be distributed in separate collections in GUI, if needed.Furthermore, I added one view and routine in schema.sql for both DBs and wrote and ran specs in db.spec.js .
All tests are passing expect two regarding Microsoft SQL Server, because I don't have it installed on same machine. I'll probably make same changes for SQL Server when I'll be able to test it.
This is it for a start, maybe latter we could fetch triggers related to specific table?
Cheers,
Borna