Rows always showing [] empty array. Even rowCount returns the rowcount value correctly.Please help

function getByEmail(email, callback) {
//this example uses the “tedious” library
//more info here:
const sqlserver = require(‘tedious@1.11.0’);

const Connection = sqlserver.Connection;
const Request = sqlserver.Request;
const TYPES = sqlserver.TYPES;

const connection = new Connection({
userName: ‘xxxxxxxxxxxxxxxxxxx’,
password: ‘xxxxxxxxxxxxxxxxxxxxx’,
server: ‘xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx’,
options: {
database: ‘xxxxxxxxxxxxxxxx’

const query = “Select id,CONCAT(FirstName,’ ',LastName) as NickName,Email from [User]” +
" WHERE Email = @Email and Isdeleted = 0;";

connection.on(‘debug’, function (text) {
}).on(‘errorMessage’, function (text) {
console.log(JSON.stringify(text, null, 2));
}).on(‘infoMessage’, function (text) {
console.log(JSON.stringify(text, null, 2));

connection.on(‘connect’, function (err) {
if (err) return callback(err);

const request = new Request(query, function (err, rowCount, rows) {
  if (err) return callback(err);

  callback(null, {
    user_id: rows[0].value,
    nickname: rows[0].value,
    email: rows[0].value

request.addParameter('Email', TYPES.VarChar, email);


If I am adding hard coded profile value then Create user script always showing user already exists. I have tired looking this. Please help