Ejemplo n.º 1
0
        public string CreateSqlString(CommandFactory factory, CreateSqlState state)
        {
            StringBuilder sb        = new StringBuilder();
            CommandData   command   = factory.CreateAggregateTableCommand(_model.EntityMapping, _model.GetSelector(), Model.GetGroupBy(), _query, _having, null, null, state);
            string        aliasName = _aliasTableName;// ?? factory.CreateDataTableMappingSql(_model.EntityMapping, state);

            sb.Append(factory.CreateAliasQuerySql(command.CommandText, aliasName));
            return(sb.ToString());
        }
Ejemplo n.º 2
0
        public string CreateSqlString(CommandFactory factory, CreateSqlState state)
        {
            StringBuilder sb        = new StringBuilder();
            CommandData   command   = factory.CreateSelectCommand(_model.EntityMapping, _model.CreateSelector(), _query, _order, _distinct, null, state);
            string        aliasName = _aliasTableName;// ?? factory.CreateDataTableMappingSql(_model.EntityMapping, state);

            sb.Append(factory.CreateAliasQuerySql(command.CommandText, aliasName));
            return(sb.ToString());
        }
Ejemplo n.º 3
0
        public string CreateSqlString(CommandFactory factory, CreateSqlState state)
        {
            var sb        = new StringBuilder();
            var command   = factory.CreateSelectCommand(Model.EntityMapping, Model.CreateSelector(), Query, Order, Distinct, null, state);
            var aliasName = AliasTableName;// ?? factory.CreateDataTableMappingSql(_model.EntityMapping, state);

            sb.Append(factory.CreateAliasQuerySql(command.CommandText, aliasName));
            return(sb.ToString());
        }
Ejemplo n.º 4
0
        public string CreateSqlString(CommandFactory factory, CreateSqlState state)
        {
            var sb = new StringBuilder();

            if (Query != null || Order != null || Distinct)
            {
                var command   = factory.CreateSelectCommand(Mapping, AllSelector.Value, Query, Order, Distinct, null, state);
                var aliasName = AliasTableName;// ?? factory.CreateDataTableMappingSql(_mapping, state);
                sb.Append(factory.CreateAliasQuerySql(command.CommandText, aliasName));
            }
            else
            {
                sb.Append(AliasTableName != null
                    ? factory.CreateAliasTableSql(factory.CreateDataTableMappingSql(Mapping, state), AliasTableName)
                    : factory.CreateDataTableMappingSql(Mapping, state));
            }
            return(sb.ToString());
        }
Ejemplo n.º 5
0
        public string CreateSqlString(CommandFactory factory, CreateSqlState state)
        {
            StringBuilder sb = new StringBuilder();

            if (_query != null || _order != null || _distinct)
            {
                CommandData command   = factory.CreateSelectCommand(_mapping, AllSelector.Value, _query, _order, _distinct, null, state);
                string      aliasName = _aliasTableName;// ?? factory.CreateDataTableMappingSql(_mapping, state);
                sb.Append(factory.CreateAliasQuerySql(command.CommandText, aliasName));
            }
            else
            {
                if (_aliasTableName != null)
                {
                    sb.Append(factory.CreateAliasTableSql(factory.CreateDataTableMappingSql(_mapping, state), _aliasTableName));
                }
                else
                {
                    sb.Append(factory.CreateDataTableMappingSql(_mapping, state));
                }
            }
            return(sb.ToString());
        }