kostafey / ejc-sql

Emacs SQL client uses Clojure JDBC.
284 stars 31 forks source link

can't provide new instantly created tables name #108

Closed stardiviner closed 5 years ago

stardiviner commented 5 years ago

When I start a new connection to PostgreSQL, ejc-sql can provide tables name completion on existing database. But when I instantly create new tables, ejc-sql can't complete them. Can ejc-sql support this feature?

kostafey commented 5 years ago

ejc-sql do not interact with a database any time autocompletion is required, it uses cache. So, the most straightforward solution is to clean the cache manually by M-x ejc-invalidate-cache. Then any new autocompletion request will recreate it.

But probably we should consider cleaning cache any time DDL queries successfully executed.

stardiviner commented 5 years ago

If it does not affect performance much, I think that's a good idea.

stardiviner commented 5 years ago

@kostafey Thanks for quick update, is it solved by the upper commit?

kostafey commented 5 years ago

@stardiviner yes, now it's fixed and described.

BTW: if you use PostgreSQL or MySQL, you can try the newest feature: ElDoc support.

stardiviner commented 5 years ago

@kostafey I checked out this fix, it works fine. And the new feature ElDoc support is great!!! :+1: I tested it works on SQL source code file, but not work on virtual Emacs buffer like dedicated opened Org source block buffer.