Ejemplo n.º 1
0
        public override void AppendSqlString(StringBuilder aBuilder, List <SqlParameter> aParameters)
        {
            //({0} IN (@{0},@{1},...))

            //({0} IN (
            aBuilder.Append(SqlSyntax.LEFT_PARENTHESE);
            aBuilder.Append(Property);
            aBuilder.Append(SqlSyntax.SPACE);
            aBuilder.Append(SqlSyntax.IN);
            aBuilder.Append(SqlSyntax.SPACE);
            aBuilder.Append(SqlSyntax.LEFT_PARENTHESE);
            ParemetersHelper helper = ParemetersHelperFactory.GetParemeterHelper();

            //@{1},@{2},...
            for (int i = 0; i < Value.Length; i++)
            {
                aBuilder.Append(helper.GetParameterString(aParameters.Count));
                if (i != Value.Length - 1)
                {
                    aBuilder.Append(SqlSyntax.COMMA);
                }
                AddExpressionParameters(aParameters, Value[i]);
            }

            //))
            aBuilder.Append(SqlSyntax.RIGHT_PARENTHESE);
            aBuilder.Append(SqlSyntax.RIGHT_PARENTHESE);
        }
Ejemplo n.º 2
0
        protected void AppendSql(StringBuilder aBuilder, List <SqlParameter> aParameters, String Op, Object aValue)
        {
            //property Op @property[X]
            aBuilder.Append(SqlSyntax.LEFT_PARENTHESE);
            aBuilder.Append(Property);
            aBuilder.Append(SqlSyntax.SPACE);
            aBuilder.Append(Op);
            aBuilder.Append(SqlSyntax.SPACE);
            ParemetersHelper helper = ParemetersHelperFactory.GetParemeterHelper();

            aBuilder.Append(helper.GetParameterString(aParameters.Count));
            aBuilder.Append(SqlSyntax.RIGHT_PARENTHESE);

            //adding paremeters
            AddExpressionParameters(aParameters, aValue);
        }
Ejemplo n.º 3
0
        public override void AppendSqlString(StringBuilder aBuilder, List <SqlParameter> aParameters)
        {
            //property Op @property[X]
            aBuilder.Append(SqlSyntax.LEFT_PARENTHESE);
            aBuilder.Append(Property);
            aBuilder.Append(SqlSyntax.SPACE);
            aBuilder.Append(Op);
            aBuilder.Append(SqlSyntax.SPACE);
            ParemetersHelper helper = ParemetersHelperFactory.GetParemeterHelper();

            aBuilder.AppendFormat(FormatFunction,
                                  helper.GetParameterString(aParameters.Count));
            aBuilder.Append(SqlSyntax.RIGHT_PARENTHESE);

            foreach (Object value in Value)
            {
                AddExpressionParameters(aParameters, value);
            }
        }