using System;
using System.Collections.Generic;
using System.Text;
using Howest.QueryBuilder.Specifications;

namespace Howest.QueryBuilder.Statements
{
	public class ColumnSelectQueryListItem : SelectQueryListItem
	{
		private string _valueExpression;

		public string ValueExpression
		{
			get { return _valueExpression; }
			set { _valueExpression = value; }
		}
	
		private string _alias;

		public string Alias
		{
			get { return _alias; }
			set { _alias = value; }
		}

		protected override string Generate()
		{
			return ValueExpression + (string.IsNullOrEmpty(_alias) ? string.Empty : QueryConstants.AS + QueryConstants.SPACE + _alias);
		}
	}
}
