MySQL driver does not have default import
woowenjun99 opened this issue · 3 comments
woowenjun99 commented
When I use the MySQL driver, sqlc generates
import mysql, { RowDataPacket } from "mysql2/promise";However, there is no default import for mysql. Changing to the following works:
import * as mysql from "mysql2/promise";kyleconroy commented
So I have an end-to-end test to ensure that the generated code works with MySQL. You can see the import I'm using there works just fine. Can you help me understand why my example works and yours doesn't?
yshrsmz commented
@woowenjun99 I can also confirm that it's working fine in its current form.
How do you configure your tsconfig.json?
woowenjun99 commented
Hi @kyleconroy @yshrsmz try using "postgresql" as the engine for MySQL prior to my PR and it should produce the result.
The issue should be fixed by the PR referenced to this GitHub issue. Will be closing this issue