mycli
mycli copied to clipboard
Missing AutoComplete with create table ... like
When copying a MYSQL table i use the following syntax
create TABLE tabledest LIKE tablesource
this command creates a new table called tabledest based on the tablesource structure It would be good if mycli offers AutoComplete suggestions searching the tables after the LIKE keyword right now the suggestions are only : ACCESS, ADD, ALL, ALTER TABLE, AND, ANY and AS
Reported using mycli 0.1.0 on ubuntu 14.04.2 LTS
What do you think?
Yup. That's a fair request. I'll see if I can add that in.
If you're going to work on LIKE
autocompletion, consider
CREATE TABLE foo LIKE <autocomplete>
Here I would expect to see a list of tables.
SELECT * FROM foo WHERE bar LIKE <autocomplete>
Here I would expect to see a list of functions (for string manipulation), or even fields.
I suppose you might be able to create a condition based off the first command that determines what is shown. However, that wouldn't work in a CREATE TABLE ... SELECT
scenario
CREATE TABLE foo (bar INT) SELECT biz FROM baz WHERE biz LIKE <autocomplete>
I would expect functions/fields, not tables.
Yeah, it's not going to be easy, but I believe it is possible. I'll give it a shot. :)