openrecord icon indicating copy to clipboard operation
openrecord copied to clipboard

VScode Intellisense for auto generated models

Open Snowsoul opened this issue 5 years ago • 2 comments

I was wondering if it's possible to return the auto loaded models from a mysql database as a class with the db structure and use that to offer auto completion in VSCode.

Use Cases:

  1. I would like to get the User table column name suggestions like: user_id, first_name, last_name inside where's object parameter.
screenshot 2019-03-07 at 14 20 11
  1. I would like to get the same column name suggestions inside get's string parameter. screenshot 2019-03-07 at 14 20 59

Snowsoul avatar Mar 07 '19 14:03 Snowsoul

Hi @Snowsoul

that's one thing I want to achieve with the next version. But it's a big rewrite.

Currently the fields per model will be loaded while you are waiting for store.ready() to finish. In order to get intellisense autocompletion, we need to load all model information in advance and store them as typescript definitions.

PhilWaldmann avatar Mar 07 '19 15:03 PhilWaldmann

Awesome, looking forward to that 😄

Snowsoul avatar Mar 07 '19 16:03 Snowsoul