Exemple #1
0
 public static RequestDropIndex MakeRequestDropIndex(ServiceVertexType myVertexType, String myIndexName,String myEdition)
 {
     RequestDropIndex Request = new RequestDropIndex(myVertexType.Name, myIndexName, myEdition);
     return Request;
 }
Exemple #2
0
        public void DropIndex(RequestDropIndex myDropIndexRequest, Int64 myTransactionToken, SecurityToken mySecurityToken)
        {
            var vertexType = _vertexTypeManager.ExecuteManager.GetType(myDropIndexRequest.TypeName, myTransactionToken, mySecurityToken);

            if (!String.IsNullOrEmpty(myDropIndexRequest.IndexName))
            {
                //so there is an index name

                var indexDefinitions = vertexType.GetIndexDefinitions(false);

                if (indexDefinitions != null && indexDefinitions.Count() > 0)
                {
                    if (!String.IsNullOrEmpty(myDropIndexRequest.Edition))
                    {
                        //so there is also an edition
                        ProcessDropIndex(indexDefinitions.Where(_ => _.SourceIndex == null && _.IndexTypeName == myDropIndexRequest.IndexName && _.Edition == myDropIndexRequest.Edition), vertexType, mySecurityToken, myTransactionToken);
                    }
                    else
                    {
                        //no edition
                        ProcessDropIndex(indexDefinitions.Where(_ => _.SourceIndex == null && _.Name == myDropIndexRequest.IndexName), vertexType, mySecurityToken, myTransactionToken);
                    }

                    _vertexTypeManager.ExecuteManager.CleanUpTypes();
                }
            }
        }
Exemple #3
0
        public TResult DropIndex <TResult>(sones.Library.Commons.Security.SecurityToken mySecurityToken, long myTransactionID, sones.GraphDB.Request.RequestDropIndex myRequestDropIndex, sones.GraphDB.Request.Converter.DropIndexResultConverter <TResult> myOutputconverter)
        {
            Stopwatch RunningTime = Stopwatch.StartNew();

            _GraphDSService.DropIndex(mySecurityToken, myTransactionID, new ServiceVertexType(myRequestDropIndex.TypeName), myRequestDropIndex.IndexName, myRequestDropIndex.Edition);
            RunningTime.Stop();
            return(myOutputconverter(new RequestStatistics(new TimeSpan(RunningTime.ElapsedTicks))));
        }