Skip to content

Commit 31c6af5

Browse files
committed
Switched MySQL2 default client from CallbackPool to Pool
1 parent 734e789 commit 31c6af5

10 files changed

Lines changed: 15 additions & 14 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Switched `MySQL2` default client from `CallbackPool` to `Pool`

drizzle-arktype/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "drizzle-arktype",
3-
"version": "1.0.0-beta.8",
3+
"version": "1.0.0-beta.9",
44
"description": "Generate arktype schemas from Drizzle ORM schemas",
55
"type": "module",
66
"scripts": {

drizzle-kit/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "drizzle-kit",
3-
"version": "1.0.0-beta.8",
3+
"version": "1.0.0-beta.9",
44
"homepage": "https://orm.drizzle.team",
55
"keywords": [
66
"drizzle",

drizzle-orm/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "drizzle-orm",
3-
"version": "1.0.0-beta.8",
3+
"version": "1.0.0-beta.9",
44
"description": "Drizzle ORM package for SQL databases",
55
"type": "module",
66
"scripts": {

drizzle-orm/src/mysql2/driver.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { type Connection as CallbackConnection, createPool, type Pool as CallbackPool, type PoolOptions } from 'mysql2';
2-
import type { Connection, Pool } from 'mysql2/promise';
1+
import type { Connection as CallbackConnection, Pool as CallbackPool } from 'mysql2';
2+
import { type Connection, createPool, type Pool, type PoolOptions } from 'mysql2/promise';
33
import * as V1 from '~/_relations.ts';
44
import type { Cache } from '~/cache/core/index.ts';
55
import { entityKind } from '~/entity.ts';
@@ -61,12 +61,12 @@ export type MySql2DrizzleConfig<
6161
function construct<
6262
TSchema extends Record<string, unknown> = Record<string, never>,
6363
TRelations extends AnyRelations = EmptyRelations,
64-
TClient extends Pool | Connection | CallbackPool | CallbackConnection = CallbackPool,
64+
TClient extends Pool | Connection | CallbackPool | CallbackConnection = Pool,
6565
>(
6666
client: TClient,
6767
config: MySql2DrizzleConfig<TSchema, TRelations> = {},
6868
): MySql2Database<TSchema, TRelations> & {
69-
$client: AnyMySql2Connection extends TClient ? CallbackPool : TClient;
69+
$client: AnyMySql2Connection extends TClient ? Pool : TClient;
7070
} {
7171
const dialect = new MySqlDialect({ casing: config.casing });
7272
let logger;
@@ -132,7 +132,7 @@ export type AnyMySql2Connection = Pool | Connection | CallbackPool | CallbackCon
132132
export function drizzle<
133133
TSchema extends Record<string, unknown> = Record<string, never>,
134134
TRelations extends AnyRelations = EmptyRelations,
135-
TClient extends AnyMySql2Connection = CallbackPool,
135+
TClient extends AnyMySql2Connection = Pool,
136136
>(
137137
...params: [
138138
string,
@@ -150,7 +150,7 @@ export function drizzle<
150150
),
151151
]
152152
): MySql2Database<TSchema, TRelations> & {
153-
$client: AnyMySql2Connection extends TClient ? CallbackPool : TClient;
153+
$client: AnyMySql2Connection extends TClient ? Pool : TClient;
154154
} {
155155
if (typeof params[0] === 'string') {
156156
const connectionString = params[0]!;

drizzle-seed/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "drizzle-seed",
3-
"version": "1.0.0-beta.8",
3+
"version": "1.0.0-beta.9",
44
"main": "index.js",
55
"type": "module",
66
"scripts": {

drizzle-typebox/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "drizzle-typebox",
3-
"version": "1.0.0-beta.8",
3+
"version": "1.0.0-beta.9",
44
"description": "Generate Typebox schemas from Drizzle ORM schemas",
55
"type": "module",
66
"scripts": {

drizzle-valibot/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "drizzle-valibot",
3-
"version": "1.0.0-beta.8",
3+
"version": "1.0.0-beta.9",
44
"description": "Generate valibot schemas from Drizzle ORM schemas",
55
"type": "module",
66
"scripts": {

drizzle-zod/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "drizzle-zod",
3-
"version": "1.0.0-beta.8",
3+
"version": "1.0.0-beta.9",
44
"description": "Generate Zod schemas from Drizzle ORM schemas",
55
"type": "module",
66
"scripts": {

eslint-plugin-drizzle/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint-plugin-drizzle",
3-
"version": "1.0.0-beta.8",
3+
"version": "1.0.0-beta.9",
44
"description": "Eslint plugin for drizzle users to avoid common pitfalls",
55
"main": "src/index.js",
66
"scripts": {

0 commit comments

Comments
 (0)