Exemple #1
0
        internal override string GetSelectCommand(SelectDataDefinition data)
        {
            StringBuilder stringBuilder = new StringBuilder();

            stringBuilder.Append("SELECT ");
            foreach (string target in data.SelectTargetList)
            {
                stringBuilder.Append(target);
                if (target != data.SelectTargetList.Last())
                {
                    stringBuilder.Append(",");
                }
            }
            stringBuilder.Append($" FROM {data.TableName}");

            if (data.JoinDef != null)
            {
                stringBuilder.Append($" {GetJoinCommand(data.JoinDef)}");
            }

            if (data.ConditionBracket != null)
            {
                stringBuilder.Append($" {GetConditionCommand(data.ConditionBracket)}");
            }
            stringBuilder.Append(";");
            return(stringBuilder.ToString());
        }
Exemple #2
0
 internal abstract string GetSelectCommand(SelectDataDefinition data);