mysql 모듈에서 pool을 사용한 다음 release를 하지 않아도 된다.
이슈(https://github.com/mysqljs/mysql/issues/1202)를 참고하면,
yes.pool.query()is shortcut forpool.getConnection()+connection.query()+connection.release()- see https://github.com/felixge/node-mysql/blob/master/lib/Pool.js#L194-L207
아래와 같이 답변이 있다.
pool.query()는 getConnection()과 query, 커넥션 release가 포함되어있다는 내용이다.
반응형
'Programming > Node.js' 카테고리의 다른 글
| Express.js IP 구하기 (0) | 2018.07.03 |
|---|---|
| 간단한 express서버 만들기 (0) | 2017.08.15 |