Of course, there's already tab-completion of sql commands
with the keyboard_completion option.
The real trick is: how hard to work to make database object
completion a reality?
Plan A: In a 21st century IDE, one would reasonably expect
that the buffer be parsed to determine whether syntax at the
insertion point calls for a table, fieldname (for a
particular table!), database name, constraint or what have
you, and to do the appropriate completion.
My attitude would be to go to plan B: with the appropriate
option, suck *all* of the names out of sybojbects, and maybe
syscolumns as well, and make that the completion set.
I bet that Plan B is simple enough to implement that it
would be worth implementing as a stopgap until something
like a more baroque, plan-A-ish approach solidifies.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Plan B sounds fairly reasonable, altough we have the issue
of getting completion right for something like:
select * from foo..bar<tab>
which means grabbing information from sysobjects from all
the databases on the server. This is something that might
take a bit of time at startup on a large server.
Michael
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
We DID (and still do) have object's name completion and it
worked perfectly for a database containing very many
tables and procedures. This CAN be implemented and it IS a
reality. What about Michael's note, it is true, to do
this, one should be restricted to only one database.
Instead of fetching all object on startup, an auto-updated
profile file for each database can be used.
MasterZIV
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, sqsh has keyword completion already, but it requires a
.sqsh_words file to work - i.e. there are no built-in
completion words (i.e. SELECT, etc.) and it definitely does
not know anything about the objects in the database (tables,
columns, etc.)
Michael
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=269
Of course, there's already tab-completion of sql commands
with the keyboard_completion option.
The real trick is: how hard to work to make database object
completion a reality?
Plan A: In a 21st century IDE, one would reasonably expect
that the buffer be parsed to determine whether syntax at the
insertion point calls for a table, fieldname (for a
particular table!), database name, constraint or what have
you, and to do the appropriate completion.
My attitude would be to go to plan B: with the appropriate
option, suck *all* of the names out of sybojbects, and maybe
syscolumns as well, and make that the completion set.
I bet that Plan B is simple enough to implement that it
would be worth implementing as a stopgap until something
like a more baroque, plan-A-ish approach solidifies.
Logged In: YES
user_id=1014343
Plan B sounds fairly reasonable, altough we have the issue
of getting completion right for something like:
select * from foo..bar<tab>
which means grabbing information from sysobjects from all
the databases on the server. This is something that might
take a bit of time at startup on a large server.
Michael
Logged In: NO
We DID (and still do) have object's name completion and it
worked perfectly for a database containing very many
tables and procedures. This CAN be implemented and it IS a
reality. What about Michael's note, it is true, to do
this, one should be restricted to only one database.
Instead of fetching all object on startup, an auto-updated
profile file for each database can be used.
MasterZIV
Logged In: YES
user_id=269
MasterZIV, can you clarify? Do you mean that *sqsh* did
have and currently has name completion, or some other
implementation of an isql-replacement?
I'm confused, because neither I nor Michael seem to remember
seeing it.
Logged In: YES
user_id=1014343
Yes, sqsh has keyword completion already, but it requires a
.sqsh_words file to work - i.e. there are no built-in
completion words (i.e. SELECT, etc.) and it definitely does
not know anything about the objects in the database (tables,
columns, etc.)
Michael
This feature is implemented in sqsh-2.1.8