Moor: How to store List of Strings in moor?

Created on 4 Dec 2019  路  1Comment  路  Source: simolus3/moor

I want to store list of strings in one column in table. How can it be implemented?

question

Most helpful comment

You can use a TypeConverter for this. In your case, you can write a class ListInColumnConverter extends TypeConverter<List<String>, String> that uses json.encode and json.decode to read and write lists.

>All comments

You can use a TypeConverter for this. In your case, you can write a class ListInColumnConverter extends TypeConverter<List<String>, String> that uses json.encode and json.decode to read and write lists.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

VadimOsovsky picture VadimOsovsky  路  3Comments

kira1752 picture kira1752  路  3Comments

johrpan picture johrpan  路  4Comments

Holofox picture Holofox  路  4Comments

KKRoko picture KKRoko  路  3Comments