question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MysqlDialect doesn't work anymore in `0.19.2`

See original GitHub issue

Using MysqlDialect will throw when making the first connection

TypeError: Cannot read properties of undefined (reading 'getConnection')
 ❯ file:/Users/morse/Documents/GitHub/docs-from-notion/node_modules/.pnpm/kysely@0.19.2/node_modules/kysely/dist/esm/dialect/mysql/mysql-driver.js:35:24
 ❯ MysqlDriver.#acquireConnection file:/Users/morse/Documents/GitHub/docs-from-notion/node_modules/.pnpm/kysely@0.19.2/node_modules/kysely/dist/esm/dialect/mysql/mysql-driver.js:34:16
 ❯ MysqlDriver.acquireConnection file:/Users/morse/Documents/GitHub/docs-from-notion/node_modules/.pnpm/kysely@0.19.2/node_modules/kysely/dist/esm/dialect/mysql/mysql-driver.js:19:60
 ❯ RuntimeDriver.acquireConnection file:/Users/morse/Documents/GitHub/docs-from-notion/node_modules/.pnpm/kysely@0.19.2/node_modules/kysely/dist/esm/driver/runtime-driver.js:29:47
 ❯ async DefaultConnectionProvider.provideConnection file:/Users/morse/Documents/GitHub/docs-from-notion/node_modules/.pnpm/kysely@0.19.2/node_modules/kysely/dist/esm/driver/default-connection-provider.js:8:28
 ❯ async DefaultQueryExecutor.executeQuery file:/Users/morse/Documents/GitHub/docs-from-notion/node_modules/.pnpm/kysely@0.19.2/node_modules/kysely/dist/esm/query-executor/query-executor-base.js:32:16
 ❯ async SelectQueryBuilder.execute file:/Users/morse/Documents/GitHub/docs-from-notion/node_modules/.pnpm/kysely@0.19.2/node_modules/kysely/dist/esm/query-builder/select-query-builder.js:565:24
 ❯ async SelectQueryBuilder.executeTakeFirst file:/Users/morse/Documents/GitHub/docs-from-notion/node_modules/.pnpm/kysely@0.19.2/node_modules/kysely/dist/esm/query-builder/select-query-builder.js:573:26˙

This is because the MysqlAdapter now expects a pool parameter i think but the typescript type didn’t change https://github.com/koskimas/kysely/blob/ba42803de18a274a8f569b80e159de231bd27ba5/src/dialect/mysql/mysql-driver.ts#L28-L30

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
koskimascommented, May 17, 2022

@steida Like half of the issues and questions in discord are about things failing when bundling kysely. The API is slightly more complicated but now Kysely is completely dependency-free and platform agnostic.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Changelog - Tortoise ORM v0.19.3 Documentation
Added schema attribute to Model's Meta to specify exact schema to use with the model. Fixed¶. Mixin does not work. (#1133). using_db wrong...
Read more >
knex/CHANGELOG.md at master
A query builder for PostgreSQL, MySQL, CockroachDB, SQL Server, SQLite3 and Oracle, designed to be flexible, portable, and fun to use.
Read more >
knex/CHANGELOG.md
- Various fixes to mssql dialect to make it compatible with other dialects #2653, Unique constraint now allow multiple null values, float type...
Read more >
Spring boot ignores/not working with custom MySqlDialect
The problem is that you configure your dialect using a mechanism of Spring Boot. But your application (the one started by your main...
Read more >
Fedora rawhide compose report: 20170613.n.1 changes
Don't bother running Cassandane on s390x for now. ... 0.05-3 - Perl 5.26 rebuild Package: perl-B-Hooks-Parser-0.19-2.fc27 Old package: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found