Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/**
* @module mysql_p
*/
var AWSXRay = require('aws-xray-sdk-core');
var SqlData = AWSXRay.database.SqlData;
var DATABASE_VERS = process.env.MYSQL_DATABASE_VERSION;
var DRIVER_VERS = process.env.MYSQL_DRIVER_VERSION;
var PREPARED = 'statement';
/**
* Patches the Node MySQL client to automatically capture query information for the segment.
* Connection.query, connection.execute, and pool.query calls are automatically captured.
* In manual mode, these functions require a segment or subsegment object as an additional,
* last argument.
* @param {mysql} module - The MySQL npm module.
* @returns {mysql}
* @see https://github.com/mysqljs/mysql
*/
/**
* @module postgres_p
*/
var AWSXRay = require('aws-xray-sdk-core');
var SqlData = AWSXRay.database.SqlData;
var DATABASE_VERS = process.env.POSTGRES_DATABASE_VERSION;
var DRIVER_VERS = process.env.POSTGRES_DRIVER_VERSION;
var PREPARED = 'statement';
/**
* Patches the Node PostreSQL client to automatically capture query information for the segment.
* Client.query calls are automatically captured.
* In manual mode, client.query requires a sub/segment object
* as an additional argument as the last argument for the query.
* @function
* @param {pg} module - The PostgreSQL npm module.
* @returns {pg}
* @see https://github.com/brianc/node-postgres
*/