DB data view, map column values

已完成

Hello! I have few columns in database table that corresponding to constants in the go code like

const (
StatusNotStarted = 1
StatusStarted = 2
StatusFinished = 3
StatusCanceled = 4
)

I don't want to go to the constants definition to match column value with it's meaning every time I open data from the table. So my question is can I map related column values from database to string values in data view?

评论操作 固定链接

Please, @..., correct me if I'm wrong, but there is no way to change the re-presentation of integer values to strings and vice versa.

You can enable View | Appearance | Details in Tree View and add comments to your columns using DB queries and map values from strings or via UI by clicking on the column in Database View and select Modify Column option.

 

1
评论操作 固定链接

Yes, that solves my problem. Thank you, Daniil Maslov!

0

请先登录再写评论。