Menu

#3 tab completion

closed-fixed
None
5
2014-03-22
2004-09-09
No

Use readline's facility for tab-completion of sql
commands and database objects.

Discussion

  • Danny Sadinoff

    Danny Sadinoff - 2005-05-24

    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.

     
  • Michael Peppler

    Michael Peppler - 2006-04-01

    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

     
  • Nobody/Anonymous

    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

     
  • Danny Sadinoff

    Danny Sadinoff - 2006-08-02

    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.

     
  • Michael Peppler

    Michael Peppler - 2006-08-06

    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

     
  • Martin Wesdorp

    Martin Wesdorp - 2013-04-23
    • status: open --> closed
     
  • Martin Wesdorp

    Martin Wesdorp - 2013-04-23

    This feature is implemented in sqsh-2.1.8

     
  • Martin Wesdorp

    Martin Wesdorp - 2014-03-22
    • status: closed --> closed-fixed
    • assigned_to: Martin Wesdorp
    • Group: --> Next Release (example)
     

Log in to post a comment.

MongoDB Logo MongoDB