You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sadly we don't allow completely dynamic queries like yours. Your use-case might be an exception but generally this is also not a good idea because of sql-injections and other issues.
It might be possible to use @rawQuery/isRaw for this once it is implemented (see #315), but you will miss auto-updated Streams and static type validation, which can only be done on queries which are known at compile time.
is that in some cases it is necessary to take only one field, in other cases it is necessary to make a count, in other cases it is necessary to do sum, the dynamic query would greatly decrease the creation of methods.
how to do?
@query(sql)
Future findBySql(String sql);
in .g.dart
@OverRide
Future findBySql(String sql) async {
return _queryAdapter.query(sql, mapper: _tMapper);
}
The text was updated successfully, but these errors were encountered: