db-conn-mysql
TypeScript icon, indicating that this package has built-in type declarations

1.5.0 • Public • Published

MySQL implementation of db-conn (JDBC Like)

Connect to datanase

const config: MySqlConnectionConfig = {
	host: 'localhost',
	user: 'root',
	database: 'test',
	password:'*******'
};
let conn = await driver.connect(config);
let data = await conn.executeQuery("select 1 from dual");
await conn.close();

Connection Pool

const config = {
        host: 'localhost',
        user: 'root',
        database: 'test',
        password: '******'
};
const oPool = new MySqlDataSource(config);
const conn = await oPool.getConnection();
await conn.close();
await oPool.close();

Readme

Keywords

none

Package Sidebar

Install

npm i db-conn-mysql

Weekly Downloads

8

Version

1.5.0

License

ISC

Unpacked Size

17.1 kB

Total Files

20

Last publish

Collaborators

  • sunxufei