Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What does JsonKey do ? #59

Open
ValentinVignal opened this issue Apr 16, 2024 · 0 comments
Open

What does JsonKey do ? #59

ValentinVignal opened this issue Apr 16, 2024 · 0 comments

Comments

@ValentinVignal
Copy link

In the README.md https://github.com/vanlooverenkoen/db_viewer/blob/master/drift_db_viewer/README.md

It is written what we should use JsonKey for named columns or you won't be able to "hide it".

### Using named columns
When using named columns you should add a @JsonKey to the column otherwise we won't be able to hide this table
```
class Todos extends Table {
IntColumn get id => integer().autoIncrement()();
TextColumn get title => text().withLength(min: 6, max: 32)();
@JsonKey('body') //This is required for the drift_db_viewer.
TextColumn get content => text().named('body')();
IntColumn get category => integer().nullable()();
}
```

What do you mean "hide it" ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant