code: function getStringValue(value)
  {
  	var return_value = '';
  	switch(typeof(value))
  	{
  		case 'string':
  			return_value = "'" + value + "'";
  			break;
  
  		case 'number':
  			return_value = value;
  			break;
  
  		case 'object':
  
  			if(value==null)
  					return_value = value;
  			else
  			{
  					var valuestring = JSON.stringify(value);
  					return_value = "'" + valuestring + "'";
  			}
  			break;
  
  		default:
  			return_value = "'" + value + "'";
  			break;
  	}
    return return_value;
  }
docs: A private function to normalize the value for sql query
  @param  {String|Number|Object} value - The given value
  @return {String}