simolus3 / drift

Drift is an easy to use, reactive, typesafe persistence library for Dart & Flutter.
https://drift.simonbinder.eu/
MIT License
2.41k stars 349 forks source link

Support custom row classes for manager #3004

Closed simolus3 closed 2 weeks ago

simolus3 commented 2 weeks ago

This adds support for generating manager classes for tables with existing row classes. At the moment, the only thing I had to change was removing the DataClass generic bound in the runtime. @dickermoshe, can you check whether you need the extends DataClass bound for future manager changes? If not I think this sounds like a fairly easy way to port manager code over to more tables.

Closes https://github.com/simolus3/drift/issues/2989.

github-actions[bot] commented 2 weeks ago

🚀 Deployed on https://deploy-preview-3004--moor.netlify.app

dickermoshe commented 2 weeks ago

This may make it harder to add features later, but nothing impossible. Custom Row Classes are needed for supporting other DBs so I guess it's a worthy tradeoff.

simolus3 commented 2 weeks ago

Thanks for taking a look and fixing the assert!