Tencent / wcdb

WCDB is a cross-platform database framework developed by WeChat.
Other
10.61k stars 1.39k forks source link

grouy by 查询之后,如何返回实体类呢 #1110

Closed jimdaxu closed 1 month ago

jimdaxu commented 1 month ago

The language of WCDB

e.g. swift

The version of WCDB

e.g. v2.1.5

The platform of WCDB

e.g. Android

The installation of WCDB

e.g. Cocoapods

What's the issue?

Post the outputs or screenshots for errors.

Explain what you want by example or code in English.

image

grouy by 查询之后,如何返回实体类呢?现在返回的是[Any]。

Qiuwen-chen commented 1 month ago

The result of getRows is MultiRowsValue, you can use it to construct any type of object.

jimdaxu commented 3 weeks ago

请问下MultiRowsValue 怎么实例化成实体类呢?

Qiuwen-chen commented 3 weeks ago

MultiRowsValue is just a two-dimensional array. You read the data in it and assign it to your object.