Skip to content

Commit

Permalink
ci: add createPool releaseConnection tsc build test
Browse files Browse the repository at this point in the history
  • Loading branch information
wellwelwel committed Jun 11, 2023
1 parent 737be62 commit e806944
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { mysql } from '../../../index';
import { access } from '../../baseConnection';

const pool = mysql.createPool(access);

pool.getConnection((err, conn) => {
pool.releaseConnection(conn);
});
9 changes: 9 additions & 0 deletions test/tsc-build/mysql/createPool/promise/releaseConnection.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { mysql } from '../../../index';
import { access } from '../../baseConnection';

(async () => {
const pool = mysql.createPool(access);
const conn = await pool.promise().getConnection();

pool.releaseConnection(conn);
})();
9 changes: 9 additions & 0 deletions test/tsc-build/promise/createPool/releaseConnection.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { mysqlp as mysql } from '../../index';
import { access } from '../baseConnection';

(async () => {
const pool = mysql.createPool(access);
const conn = await pool.getConnection();

pool.releaseConnection(conn);
})();

0 comments on commit e806944

Please sign in to comment.