コード例 #1
0
        public virtual IEnumerable <string> GetIndexedKeys(Type elementClass)
        {
            KeyIndexableGraphContract.ValidateGetIndexedKeys(elementClass);

            return(typeof(IVertex).IsAssignableFrom(elementClass)
                       ? VertexKeyIndex.GetIndexedKeys()
                       : EdgeKeyIndex.GetIndexedKeys());
        }
コード例 #2
0
        public virtual void CreateKeyIndex(string key, Type elementClass, params Parameter[] indexParameters)
        {
            KeyIndexableGraphContract.ValidateCreateKeyIndex(key, elementClass, indexParameters);

            if (typeof(IVertex).IsAssignableFrom(elementClass))
            {
                VertexKeyIndex.CreateKeyIndex(key);
            }
            else
            {
                EdgeKeyIndex.CreateKeyIndex(key);
            }
        }
コード例 #3
0
        public virtual void DropKeyIndex(string key, Type elementClass)
        {
            KeyIndexableGraphContract.ValidateDropKeyIndex(key, elementClass);

            if (typeof(IVertex).IsAssignableFrom(elementClass))
            {
                VertexKeyIndex.DropKeyIndex(key);
            }
            else
            {
                EdgeKeyIndex.DropKeyIndex(key);
            }
        }
コード例 #4
0
ファイル: IdGraph.cs プロジェクト: marinusmaurice/VelocityDB
        public IEnumerable <string> GetIndexedKeys(Type elementClass)
        {
            KeyIndexableGraphContract.ValidateGetIndexedKeys(elementClass);

            var v         = IsVertex(elementClass);
            var supported = ((v && _supportVertexIds) || (!v && _supportEdgeIds));

            if (supported)
            {
                ISet <string> keys = new HashSet <string>(_baseGraph.GetIndexedKeys(elementClass));
                keys.Remove(Id);
                return(keys);
            }
            return(_baseGraph.GetIndexedKeys(elementClass));
        }
コード例 #5
0
        public IEnumerable <string> GetIndexedKeys(Type elementClass)
        {
            KeyIndexableGraphContract.ValidateGetIndexedKeys(elementClass);

            return(((IKeyIndexableGraph)BaseGraph).GetIndexedKeys(elementClass));
        }
コード例 #6
0
        public void DropKeyIndex(string key, Type elementClass)
        {
            KeyIndexableGraphContract.ValidateDropKeyIndex(key, elementClass);

            throw new InvalidOperationException(ReadOnlyTokens.MutateErrorMessage);
        }
コード例 #7
0
ファイル: IdGraph.cs プロジェクト: marinusmaurice/VelocityDB
        public void CreateKeyIndex(string key, Type elementClass, params Parameter[] indexParameters)
        {
            KeyIndexableGraphContract.ValidateCreateKeyIndex(key, elementClass, indexParameters);

            _baseGraph.CreateKeyIndex(key, elementClass, indexParameters);
        }
コード例 #8
0
ファイル: IdGraph.cs プロジェクト: marinusmaurice/VelocityDB
        public void DropKeyIndex(string key, Type elementClass)
        {
            KeyIndexableGraphContract.ValidateDropKeyIndex(key, elementClass);

            _baseGraph.DropKeyIndex(key, elementClass);
        }