New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mad::Mapper should not be tightly bound to MySQL #1
Comments
The documentation states:
Are you going to use it with Mojo::SQLite as well...? I haven't tested it with that driver, but I would very much like to support it. I won't implement the change, unless I know how to test it. |
Mojo::SQLite,Mojo::Pg and Mojo::mysql are a good start :) and this would cover more than 90% of the use-cases. Mojo::SQLite should (must?!) not be used in asynchronous mode, but I do not know the exact technical details - the internals where the mode is switched. It should be within the the Mojo::$drivername it self so this should not be a concern of Mad::Mapper. |
Why can't Mojo::SQLite be used in async mode? I know the database is synchronous, but that doesn't mean that Mojo::SQLite shouldn't support an async API. Actually, I got @Grinnz to support just that: https://metacpan.org/pod/Mojo::SQLite::Database#query The "mode" you're referring to is switched inside Mojo::DRIVER::Database. Mad::Mapper does not change the internals of the $dbh. (At least not intentionally) (DRIVER = Pg, mysql, SQLite) |
Thanks :) 👍 ! |
You're welcome 😄 |
I intend to use Mad::Mapper not only with Mojo::mysql.
Please replace all occurrences of
$res->sth->mysql_insertid
with something like$self->dbh->last_insert_id(undef, undef, $self->table, $self->pk)
I know Mad::Mapper is still new, but it should not be bound to one specific database driver.
Please inform if otherwise.
Thanks.
The text was updated successfully, but these errors were encountered: