private IQueryResult GenerateOutput(String myQuery, IRequestStatistics myStats) { return(QueryResult.Success(myQuery, SonesGQLConstants.GQL, new IVertexView[0], Convert.ToUInt64(myStats.ExecutionTime.TotalMilliseconds))); }
private IQueryResult GenerateOutput(IRequestStatistics myStats) { return(QueryResult.Success(_Query, SonesGQLConstants.GQL, new List <IVertexView>(), Convert.ToUInt64(myStats.ExecutionTime.Milliseconds))); }
/// <summary> /// Generates a query result using some statistics and the created vertices /// </summary> /// <param name="myStats">The statistics of the request</param> /// <param name="myCreatedVertexTypes">The created vertex types</param> /// <returns>A IQueryResult</returns> private IQueryResult CreateQueryResult(IRequestStatistics myStats, IEnumerable <IEdgeType> myCreatedEdgeTypes) { return(QueryResult.Success(_query, SonesGQLConstants.GQL, CreateVertexViews(myCreatedEdgeTypes), Convert.ToUInt64(myStats.ExecutionTime.Milliseconds))); }
private IQueryResult CreateOutput(IRequestStatistics myStats, IEdgeType myALteredType) { return(QueryResult.Success(_query, SonesGQLConstants.GQL, CreateVertexViews(myALteredType), Convert.ToUInt64(myStats.ExecutionTime.Milliseconds))); }
/// <summary> /// Creates the query result /// </summary> /// <param name="myStats">The stats of the request</param> /// <param name="myCreatedVertex">The vertex that has been created</param> /// <returns>The created query result</returns> private IQueryResult CreateQueryResult(IRequestStatistics myStats, IVertex myCreatedVertex) { return(QueryResult.Success(_queryString, SonesGQLConstants.GQL, new List <IVertexView> { CreateAVertexView(myCreatedVertex) }, Convert.ToUInt64(myStats.ExecutionTime.TotalMilliseconds))); }
public static List<Int64> ConverterOnlyRelevantList(IRequestStatistics myRequestStatistics, IEnumerable<IComparable> myDeletedAttributes, IEnumerable<IComparable> myDeletedVertices) { if (myDeletedAttributes != null && myDeletedAttributes.Count() != 0) { return myDeletedAttributes.Select(x => (Int64)x).ToList(); } if (myDeletedVertices != null && myDeletedVertices.Count() != 0) { return myDeletedVertices.Select(x => (Int64)x).ToList(); } return new List<Int64>(); }
public static List <Int64> ConverterOnlyRelevantList(IRequestStatistics myRequestStatistics, IEnumerable <IComparable> myDeletedAttributes, IEnumerable <IComparable> myDeletedVertices) { if (myDeletedAttributes != null && myDeletedAttributes.Count() != 0) { return(myDeletedAttributes.Select(x => (Int64)x).ToList()); } if (myDeletedVertices != null && myDeletedVertices.Count() != 0) { return(myDeletedVertices.Select(x => (Int64)x).ToList()); } return(new List <Int64>()); }
private IQueryResult GenerateResult(IRequestStatistics myStats, IIndexDefinition myIndexDefinition) { return(QueryResult.Success(Query, SonesGQLConstants.GQL, new List <IVertexView> { new VertexView(new Dictionary <String, object> { { "CreatedIndex", myIndexDefinition }, { "CreatedIndexTypeName", myIndexDefinition.IndexTypeName } }, new Dictionary <String, IEdgeView>()) }, Convert.ToUInt64(myStats.ExecutionTime.TotalMilliseconds))); }
private QueryResult GenerateOutput(IRequestStatistics myStats, Dictionary<Int64, String> myDeletedTypeIDs) { var temp = new Dictionary<String, object>(); foreach(var item in myDeletedTypeIDs) { temp.Add("RemovedTypeID", item.Key); temp.Add("RemovedTypeName", item.Value); } return new QueryResult(_query, "GQL", Convert.ToUInt64(myStats.ExecutionTime.Milliseconds), ResultType.Successful, new List<IVertexView> { new VertexView( temp, null ) }); }
private IQueryResult GenerateOutput(IRequestStatistics myStats, IEnumerable <IVertex> myVertices) { List <IVertexView> list = new List <IVertexView>(); foreach (var vertex in myVertices) { list.Add(new VertexView(new Dictionary <String, Object> { { "VertexID", vertex.VertexID }, { "VertexTypeID", vertex.VertexTypeID } }, null)); } return(QueryResult.Success(Query, SonesGQLConstants.GQL, list, Convert.ToUInt64(myStats.ExecutionTime.Milliseconds))); }
private IQueryResult GenerateOutput(IRequestStatistics myStats, Dictionary <Int64, String> myDeletedTypeIDs) { var temp = new Dictionary <String, object>(); foreach (var item in myDeletedTypeIDs) { temp.Add("RemovedTypeID", item.Key); temp.Add("RemovedTypeName", item.Value); } return(QueryResult.Success(_query, SonesGQLConstants.GQL, new IVertexView[] { new VertexView(temp, null) }, Convert.ToUInt64(myStats.ExecutionTime.Milliseconds))); }
private IQueryResult CreateQueryResult(IRequestStatistics myStats, IEnumerable <IComparable> myDeletedAttributes, IEnumerable <IComparable> myDeletedVertices) { var view = new List <VertexView>(); if (myDeletedVertices.Count() > 0) { view.Add(new VertexView(new Dictionary <String, Object> { { "deleted vertices", new ListCollectionWrapper(myDeletedVertices) } }, null)); } if (myDeletedAttributes.Count() > 0) { view.Add(new VertexView(new Dictionary <String, Object> { { "deleted attributes", new ListCollectionWrapper(myDeletedAttributes) } }, null)); } return(QueryResult.Success(_query, SonesGQLConstants.GQL, view, Convert.ToUInt64(myStats.ExecutionTime.TotalMilliseconds))); }
private QueryResult GenerateOutput(IRequestStatistics myStats, IEnumerable<IVertex> myVertices) { List<IVertexView> list = new List<IVertexView>(); foreach (var vertex in myVertices) { list.Add(new VertexView(new Dictionary<String, Object> { { "VertexID", vertex.VertexID }, { "VertexTypeID", vertex.VertexTypeID } }, null)); } return new QueryResult(Query, "GQL", Convert.ToUInt64(myStats.ExecutionTime.Milliseconds), ResultType.Successful, list); }
private QueryResult GenerateOutput(IRequestStatistics myStats) { return new QueryResult(_Query, "GQL", Convert.ToUInt64(myStats.ExecutionTime.Milliseconds), ResultType.Successful, new List<IVertexView>()); }
public static IVertex ConvertOnlyVertexInstance(IRequestStatistics myRequestStatistics, IVertex myVertex) { return myVertex; }
private IQueryResult GenerateResult(IRequestStatistics myStats, IIndexDefinition myIndexDefinition) { return QueryResult.Success(Query, SonesGQLConstants.GQL, new List<IVertexView> { new VertexView(new Dictionary<String, object> { {"CreatedIndex", myIndexDefinition}, {"CreatedIndexTypeName", myIndexDefinition.IndexTypeName } }, new Dictionary<String, IEdgeView>()) }, Convert.ToUInt64(myStats.ExecutionTime.TotalMilliseconds)); }
public static object ConverteToVoid(IRequestStatistics myRequestStatistics) { return null; }
public static IEdgeType ConvertOnlyEdgeType(IRequestStatistics myRequestStatistics, IEdgeType myCreatedEdgeType) { return myCreatedEdgeType; }
private IQueryResult GenerateOutput(String myQuery, IRequestStatistics myStats) { return QueryResult.Success(myQuery, SonesGQLConstants.GQL, new IVertexView[0], Convert.ToUInt64(myStats.ExecutionTime.TotalMilliseconds)); }
private IQueryResult GenerateOutput(IRequestStatistics myStats, Dictionary<Int64, String> myDeletedTypeIDs) { var temp = new Dictionary<String, object>(); foreach (var item in myDeletedTypeIDs) { temp.Add("RemovedTypeID", item.Key); temp.Add("RemovedTypeName", item.Value); } return QueryResult.Success(_query, SonesGQLConstants.GQL, new IVertexView[] { new VertexView( temp, null ) }, Convert.ToUInt64(myStats.ExecutionTime.Milliseconds)); }
private QueryResult GenerateResult(IRequestStatistics myStats, IIndexDefinition myIndexDefinition) { return new QueryResult(Query, "sones.gql", Convert.ToUInt64(myStats.ExecutionTime.TotalMilliseconds), ResultType.Successful, new List<IVertexView> { new VertexView(new Dictionary<String, object> { {"CreatedIndex", myIndexDefinition} } , new Dictionary<String, IEdgeView>()) }); }
public static IEnumerable <IIndexDefinition> ConverteOnlyIndexDefinitions(IRequestStatistics myRequestStatistics, IEnumerable <IIndexDefinition> myIndexDefinitons) { return(myIndexDefinitons); }
public static IEnumerable <IVertex> ConvertOnlyVertices(IRequestStatistics myRequestStatistics, IEnumerable <IVertex> myVertices) { return(myVertices); }
/// <summary> /// Generates a query result using some statistics and the created vertices /// </summary> /// <param name="myStats">The statistics of the request</param> /// <param name="myCreatedVertexTypes">The created vertex types</param> /// <returns>A IQueryResult</returns> private IQueryResult CreateQueryResult(IRequestStatistics myStats, IEnumerable<IVertexType> myCreatedVertexTypes) { return QueryResult.Success(_query, SonesGQLConstants.GQL, CreateVertexViews(myCreatedVertexTypes), Convert.ToUInt64(myStats.ExecutionTime.Milliseconds)); }
private QueryResult CreateOutput(IRequestStatistics myStats, IVertexType myALteredVertexType) { return new QueryResult(_query, SonesGQLConstants.GQL, Convert.ToUInt64(myStats.ExecutionTime.Milliseconds), ResultType.Successful, CreateVertexViews(myALteredVertexType)); }
private Tuple<Dictionary<string, InternVertexType>, Dictionary<long, Type>, Dictionary<long, long>> ConvertVertexTypes(IRequestStatistics myRequestStatistics, IEnumerable<IVertexType> myVertexTypes) { var vertextypes = myVertexTypes .Where(_ => _.IsUserDefined && !_.IsAbstract) .Select(_ => new InternVertexType( _.Name, _.ID, _.GetAttributeDefinitions(true) .ToDictionary(myAttr => myAttr.Name, myAttr => myAttr.ID))) .ToDictionary(_ => _.Name); var attributetypes = myVertexTypes.SelectMany(_ => _.GetPropertyDefinitions(true)).Distinct().ToDictionary(_ => _.ID, _ => _.BaseType); var edgetypes = myVertexTypes .SelectMany(_ => _.GetOutgoingEdgeDefinitions(true)) .Distinct() .ToDictionary( _ => _.ID, _ => (_.Multiplicity == EdgeMultiplicity.SingleEdge) ? _.EdgeType.ID : _.InnerEdgeType.ID); return Tuple.Create(vertextypes, attributetypes, edgetypes); }
private IDictionary<String, long> ConvertEdgeTypes(IRequestStatistics myRequestStatistics, IEnumerable<IEdgeType> myEdgeTypes) { return myEdgeTypes.SelectMany(_ => _.GetAttributeDefinitions(true)).Distinct().ToDictionary(_ => _.Name, _ => _.ID); }
public static IIndexDefinition ConverteOnlyIndexDefinition(IRequestStatistics myRequestStatistics, IIndexDefinition myIndexDefinition) { return(myIndexDefinition); }
public static IEnumerable<Int64> ConvertOnlyVertexTypeIDs(IRequestStatistics myRequestStatistics, IEnumerable<long> myDeletetVertexTypes) { return myDeletetVertexTypes; }
public static KeyValuePair <IEnumerable <IComparable>, IEnumerable <IComparable> > ConverteAllLists(IRequestStatistics myRequestStatistics, IEnumerable <IComparable> myDeletedAttributes, IEnumerable <IComparable> myDeletedVertices) { return(new KeyValuePair <IEnumerable <IComparable>, IEnumerable <IComparable> >(myDeletedAttributes, myDeletedVertices)); }
public static IEnumerable<IVertex> ConvertOnlyVertices(IRequestStatistics myRequestStatistics, IEnumerable<IVertex> myVertices) { return myVertices; }
/// <summary> /// Creates the query result /// </summary> /// <param name="myStats">The stats of the request</param> /// <param name="myCreatedVertex">The vertex that has been created</param> /// <returns>The created query result</returns> private QueryResult CreateQueryResult(IRequestStatistics myStats, IVertex myCreatedVertex) { return new QueryResult(_queryString, SonesGQLConstants.GQL, Convert.ToUInt64(myStats.ExecutionTime.TotalMilliseconds), ResultType.Successful, new List<IVertexView> {CreateAVertexView(myCreatedVertex)}); }
public static Dictionary<Int64, String> ConverteOnlyDeletedTypeIDs(IRequestStatistics myRequestStatistics, Dictionary<Int64, String> myDeletedTypeIDs) { return myDeletedTypeIDs; }
public static IEnumerable<IIndexDefinition> ConverteOnlyIndexDefinitions(IRequestStatistics myRequestStatistics, IEnumerable<IIndexDefinition> myIndexDefinitons) { return myIndexDefinitons; }
private QueryResult CreateQueryResult(IRequestStatistics myStats, IEnumerable<IComparable> myDeletedAttributes, IEnumerable<IComparable> myDeletedVertices) { var view = new List<VertexView>(); if(myDeletedVertices.Count() > 0) view.Add(new VertexView(new Dictionary<String, Object> { { "deleted vertices", new ListCollectionWrapper(myDeletedVertices) } }, null)); if(myDeletedAttributes.Count() > 0) view.Add(new VertexView(new Dictionary<String, Object> { { "deleted attributes", new ListCollectionWrapper(myDeletedAttributes) } }, null)); return new QueryResult(_query, SonesGQLConstants.GQL, Convert.ToUInt64(myStats.ExecutionTime.TotalMilliseconds), ResultType.Successful, view); }
public static IEnumerable<IVertexType> ConvertOnlyVertexTypes(IRequestStatistics myRequestStatistics, IEnumerable<IVertexType> myCreatedVertexTypes) { return myCreatedVertexTypes; }
public static object ConverteToVoid(IRequestStatistics myRequestStatistics) { return(null); }
public static Tuple<IEnumerable<IComparable>, IEnumerable<IComparable>> ConverteAllLists(IRequestStatistics myRequestStatistics, IEnumerable<IComparable> myDeletedAttributes, IEnumerable<IComparable> myDeletedVertices) { return new Tuple<IEnumerable<IComparable>, IEnumerable<IComparable>>(myDeletedAttributes, myDeletedVertices); }
public static Dictionary <Int64, String> ConverteOnlyDeletedTypeIDs(IRequestStatistics myRequestStatistics, Dictionary <Int64, String> myDeletedTypeIDs) { return(myDeletedTypeIDs); }
public static IIndexDefinition ConverteOnlyIndexDefinition(IRequestStatistics myRequestStatistics, IIndexDefinition myIndexDefinition) { return myIndexDefinition; }
public static IVertexType ConvertOnlyVertexType(IRequestStatistics myRequestStatistics, IVertexType myCreatedVertexType) { return(myCreatedVertexType); }
public static IEdgeType ConvertOnlyEdgeType(IRequestStatistics myRequestStatistics, IEdgeType myCreatedEdgeType) { return(myCreatedEdgeType); }
public static IEnumerable <IVertexType> ConvertOnlyVertexTypes(IRequestStatistics myRequestStatistics, IEnumerable <IVertexType> myCreatedVertexTypes) { return(myCreatedVertexTypes); }
public static UInt64 ConvertOnlyCount(IRequestStatistics myRequestStatistics, UInt64 myVertexCount) { return myVertexCount; }
public static IEnumerable <IEdgeType> ConvertOnlyEdgeTypes(IRequestStatistics myRequestStatistics, IEnumerable <IEdgeType> myCreatedEdgeTypes) { return(myCreatedEdgeTypes); }
public static IEnumerable<IEdgeType> ConvertOnlyEdgeTypes(IRequestStatistics myRequestStatistics, IEnumerable<IEdgeType> myCreatedEdgeTypes) { return myCreatedEdgeTypes; }
public static IEnumerable <Int64> ConvertOnlyVertexTypeIDs(IRequestStatistics myRequestStatistics, IEnumerable <long> myDeletetVertexTypes) { return(myDeletetVertexTypes); }
public static IVertexType ConvertOnlyVertexType(IRequestStatistics myRequestStatistics, IVertexType myCreatedVertexType) { return myCreatedVertexType; }
public static UInt64 ConvertOnlyCount(IRequestStatistics myRequestStatistics, UInt64 myVertexCount) { return(myVertexCount); }
private IQueryResult CreateOutput(IRequestStatistics myStats, IEdgeType myALteredType) { return QueryResult.Success(_query, SonesGQLConstants.GQL, CreateVertexViews(myALteredType), Convert.ToUInt64(myStats.ExecutionTime.Milliseconds)); }
public static IVertex ConvertOnlyVertexInstance(IRequestStatistics myRequestStatistics, IVertex myVertex) { return(myVertex); }
long GetVertexID(IRequestStatistics myStats, IVertex myVertex) { return myVertex.VertexID; }
private IQueryResult GenerateOutput(IRequestStatistics myStats) { return QueryResult.Success(_Query, SonesGQLConstants.GQL, new List<IVertexView>(), Convert.ToUInt64(myStats.ExecutionTime.Milliseconds)); }