Closed SrujanMungara closed 2 years ago
you mean something like this?
// you can manipulate field names by YourModelFields.fieldname.toString('alias name') like this:
final data = await Product().select(columnsToSelect: [ProductFields.id.toString('ProductId')]).toListObject();
// then you can get ProductId field that alias name for id
print(data[0]['ProductId'].toString());
yeah it worked. thanks.
Besides, you can run MyDBModel.execDataTable(sql) with your own SQL statement
Will try it. thanks
How to query alias name for a value which is fetched from database while exporting/Displaying in print statement.
For Example:
"Select user as UserName from "UserManagement" where user ="123"";