[typed_sql] MariaDB and MySQL support
As of writing there is some preliminary support for MariaDB.
We use package:mysql1, and a DatabaseAdapter and SqlDialect implementation for MariaDB / MySQL.
There are some features we can't support .returning, and a number of tests we skip because we so far haven't found a way to make them pass. Some of this is probably just a matter of improving the SqlDialect (rewriting queries), or fixing bugs in the database driver (perhaps migrating to something other than package:mysql1).
We also have the issue that newer MySQL versions require caching_sha2_password, which isn't support by package:mysql1.
For now MySQL/MariaDB shall remain unsupport and the partial implementation unpublished. We'll keep running tests, to avoid regressing further, and to avoid adding features that prevent MySQL/MariaDB support in the future.
For anyone willing to work this, it's a non-trivial task, some of the steps include:
- [ ] Fix existing skipped tests to the extent possible, or identify why they can't be supported by MariaDB. If they can't be supported by MariaDB we'll have to evaluate if MySQL/MariaDB can even be supported by this package.
- [ ] Get tests passing with MySQL; currently we only test with MariaDB. It may turnout that we cannot support MySQL, and that only MariaDB is possible (if at all).
- [ ] Find a better database driver package (or write one), perhaps package:mysql_dart could be promising).
- [ ] Write better database driver tests.
- [ ] Refactor dialect and database adapter.
- [ ] Handle exceptions in database adapter.
- [ ] ...
- [ ] Add more tests!
- [ ] Identify which features can't be supported by MySQL/MariaDB, evaluate if can prevent people from using them, by moving extension methods enabling out of
package:typed_sql/typed_sql.dartand into something likepackage:typed_sql/postgres.dartor something like that.
If all of this is possible, then maybe, and only maybe, will we consider shipping MySQL and/or MariaDB support. At this point, it's hard to evaluated the feasibility of even shipping such support.
Contributions are welcome, but don't expect support to ship anytime soon, if ever.