Exemplo n.º 1
0
        public void BuildDiagnosticCommand(FetchType fetchType, CommandBuilder sql)
        {
            switch (fetchType)
            {
            case FetchType.Any:
                CurrentStatement.ToAny();
                break;

            case FetchType.Count:
                CurrentStatement.ToCount <long>();
                break;

            case FetchType.FetchOne:
                CurrentStatement.Limit = 1;
                break;
            }

            TopStatement.CompileStructure(_session);

            TopStatement.Configure(sql);
        }
Exemplo n.º 2
0
        public void BuildDiagnosticCommand(FetchType fetchType, CommandBuilder sql)
        {
            switch (fetchType)
            {
            case FetchType.Any:
                CurrentStatement.ToAny();
                break;

            case FetchType.Count:
                CurrentStatement.ToCount <long>();
                break;

            case FetchType.FetchOne:
                CurrentStatement.Limit = 1;
                break;
            }

            TopStatement.CompileStructure(new MartenExpressionParser(_session.Serializer, _session.Options));

            TopStatement.Configure(sql);
        }