Programming/Node.js
mysql에서 pool query 후 release 하기
신재헌
2018. 12. 4. 12:25
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가 포함되어있다는 내용이다.
반응형