public TResult DescribeIndices <TResult>(sones.Library.Commons.Security.SecurityToken mySecurityToken, Int64 myTransactionToken, RequestDescribeIndex myRequestDescribeIndex, Converter.DescribeIndicesResultConverter <TResult> myOutputconverter) { return(_iGraphDB.DescribeIndices <TResult>(mySecurityToken, myTransactionToken, myRequestDescribeIndex, myOutputconverter)); }
public override QueryResult GetResult( GQLPluginManager myPluginManager, IGraphDB myGraphDB, SecurityToken mySecurityToken, Int64 myTransactionToken) { IEnumerable<IVertexView> resultingVertices = new List<IVertexView>(); ASonesException error = null; #region Specific index var request = new RequestDescribeIndex(_TypeName, _IndexName, _IndexEdition); IEnumerable<IIndexDefinition> indices = null; if (request.IndexName == String.Empty && request.TypeName == String.Empty && request.Edition == String.Empty) { indices = myGraphDB.DescribeIndices<IEnumerable<IIndexDefinition>>(mySecurityToken, myTransactionToken, request, (stats, definitions) => definitions); } else { indices = myGraphDB.DescribeIndex<IEnumerable<IIndexDefinition>>(mySecurityToken, myTransactionToken, request, (stats, definitions) => definitions); } if (indices == null) { error = new IndexTypeDoesNotExistException(_TypeName, _IndexName); } if (String.IsNullOrEmpty(_IndexEdition)) { //_IndexEdition = DBConstants.DEFAULTINDEX; } resultingVertices = GenerateOutput(indices, _IndexName); #endregion if(error != null) return new QueryResult("", SonesGQLConstants.GQL, 0L, ResultType.Failed, resultingVertices, error); else return new QueryResult("", SonesGQLConstants.GQL, 0L, ResultType.Successful, resultingVertices); }
public override IEnumerable <IVertexView> GetResult( GQLPluginManager myPluginManager, IGraphDB myGraphDB, SecurityToken mySecurityToken, Int64 myTransactionToken) { IEnumerable <IVertexView> resultingVertices = new List <IVertexView>(); #region Specific index var request = new RequestDescribeIndex(_TypeName, _IndexName, _IndexEdition); IEnumerable <IIndexDefinition> indices = null; if (request.IndexName == String.Empty && request.TypeName == String.Empty && request.Edition == String.Empty) { indices = myGraphDB.DescribeIndices <IEnumerable <IIndexDefinition> >(mySecurityToken, myTransactionToken, request, (stats, definitions) => definitions); } else { indices = myGraphDB.DescribeIndex <IEnumerable <IIndexDefinition> >(mySecurityToken, myTransactionToken, request, (stats, definitions) => definitions); } if (indices == null) { throw new IndexTypeDoesNotExistException(_TypeName, _IndexName); } if (String.IsNullOrEmpty(_IndexEdition)) { //_IndexEdition = DBConstants.DEFAULTINDEX; } resultingVertices = GenerateOutput(indices, _IndexName); return(resultingVertices); #endregion }