Пример #1
0
        private ConvertedStatementResult GetIStatement(IGraphStatement graphStmt, GraphOptions options)
        {
            var graphProtocol = graphStmt.GraphProtocolVersion ?? options.GraphProtocolVersion;

            if (graphProtocol == null)
            {
                throw new DriverInternalError("Unable to determine graph protocol version. This is a bug, please report.");
            }

            // Existing graph statement implementations of this method are empty
            // but it's part of the public interface definition
            var stmt = graphStmt.ToIStatement(options);

            if (stmt != null)
            {
                return(new ConvertedStatementResult
                {
                    Serializer = _graphTypeSerializerFactory.CreateSerializer(
                        _session, null, null, graphProtocol.Value, true),
                    Statement = stmt
                });
            }

            return(ConvertGraphStatement(graphStmt, options, graphProtocol.Value));
        }
Пример #2
0
 public Task<GraphResultSet> ExecuteGraphAsync(IGraphStatement graphStatement)
 {
     var stmt = graphStatement.ToIStatement(_config.GraphOptions);
     return GetAnalyticsMaster(stmt, graphStatement)
         .Then(s =>
             _coreSession
                 .ExecuteAsync(s)
                 .ContinueSync(rs => new GraphResultSet(rs)));
 }
Пример #3
0
        public Task <GraphResultSet> ExecuteGraphAsync(IGraphStatement graphStatement)
        {
            var stmt = graphStatement.ToIStatement(_config.GraphOptions);

            return(GetAnalyticsMaster(stmt, graphStatement)
                   .Then(s =>
                         _coreSession
                         .ExecuteAsync(s)
                         .ContinueSync(rs => new GraphResultSet(rs))));
        }
Пример #4
0
        public async Task <GraphResultSet> ExecuteGraphAsync(IGraphStatement graphStatement)
        {
            var stmt = graphStatement.ToIStatement(_config.GraphOptions);

            await GetAnalyticsMaster(stmt, graphStatement).ConfigureAwait(false);

            var rs = await _coreSession.ExecuteAsync(stmt).ConfigureAwait(false);

            return(GraphResultSet.CreateNew(rs, graphStatement, _config.GraphOptions));
        }