How to achieve sql column name auto completion?
example: select na from tb1 a left join tb2 b a.code=b.code。 Enter na, how to get the table name: tb1 and tb2, more complex sql, may contain nesting, how to get the corresponding table name, query field information through the table name.
@mtriff The project does not fully implement the modelDBA sqleditor code complete feature.
That's right, there's a lot of database structure information that modelDBA uses to better provide suggestions. That is outside of the scope of this package. The best you can do with this package is provide the table names and column names during instantiation like so:
const sqlAutocomplete = new SQLAutocomplete(SQLDialect.MYSQL,
['myDatabaseTableName'], // Optional
['aColumnName']); // Optional
However, this package can't narrow down suggestions based on which columns belong to which table.
However, this package can't narrow down suggestions based on which columns belong to which table.
modeldba editor supports table alias filter column name,are there plans to enhance this feature?