⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 storage.cs

📁 Perst开源实时数据库
💻 CS
📖 第 1 页 / 共 5 页
字号:
#if USE_GENERICS
        /// <summary> 
        /// Create new multi-field index
        /// </summary>
        /// <param name="fieldNames">array of names of the fields. Field with such name should be present in specified class <code>type</code>
        /// </param>
        /// <param name="unique">whether index is unique (duplicate value of keys are not allowed)
        /// </param>
        /// <returns>persistent object implementing field index
        /// </returns>
        /// <exception cref="Perst.StorageError">StorageError(StorageError.INDEXED_FIELD_NOT_FOUND) if there is no such field in specified class,
        /// StorageError(StorageError.UNSUPPORTED_INDEX_TYPE) exception if type of specified field is not supported by implementation
        /// </exception>
        MultiFieldIndex<V> CreateFieldIndex<V>(string[] fieldNames, bool unique) where V:class,IPersistent;
#else
        /// <summary> 
        /// Create new multi-field index
        /// </summary>
        /// <param name="type">objects of which type (or derived from which type) will be included in the index
        /// </param>
        /// <param name="fieldNames">array of names of the fields. Field with such name should be present in specified class <code>type</code>
        /// </param>
        /// <param name="unique">whether index is unique (duplicate value of keys are not allowed)
        /// </param>
        /// <returns>persistent object implementing field index
        /// </returns>
        /// <exception cref="Perst.StorageError">StorageError(StorageError.INDEXED_FIELD_NOT_FOUND) if there is no such field in specified class,
        /// StorageError(StorageError.UNSUPPORTED_INDEX_TYPE) exception if type of specified field is not supported by implementation
        /// </exception>
        MultiFieldIndex CreateFieldIndex(Type type, string[] fieldNames, bool unique);
#endif
	
		
#if USE_GENERICS
        /// <summary> Create new index optimized for access by element position. 
        /// K parameter specifies key type, V - associated object type.
        /// </summary>
        /// <param name="unique">whether index is unique (duplicate value of keys are not allowed)
        /// </param>
        /// <returns>persistent object implementing index
        /// </returns>
        /// <exception cref="Perst.StorageError">StorageError(StorageError.ErrorCode.UNSUPPORTED_INDEX_TYPE) exception if 
        /// specified key type is not supported by implementation.
        /// </exception>
        Index<K,V> CreateRandomAccessIndex<K,V>(bool unique) where V:class,IPersistent;
#else
        /// <summary> Create new index optimized for access by element position. 
        /// </summary>
        /// <param name="type">type of the index key (you should path here <code>String.class</code>, 
        /// <code>int.class</code>, ...)
        /// </param>
        /// <param name="unique">whether index is unique (duplicate value of keys are not allowed)
        /// </param>
        /// <returns>persistent object implementing index
        /// </returns>
        /// <exception cref="Perst.StorageError">StorageError(StorageError.ErrorCode.UNSUPPORTED_INDEX_TYPE) exception if 
        /// specified key type is not supported by implementation.
        /// 
        /// </exception>
        Index CreateRandomAccessIndex(Type type, bool unique);
#endif
		
#if !COMPACT_NET_FRAMEWORK
        /// <summary> Create new compound index optimized for access by element position.
        /// </summary>
        /// <param name="types">types of components of compund key
        /// </param>
        /// <param name="unique">whether index is unique (duplicate value of keys are not allowed)
        /// </param>
        /// <returns>persistent object implementing index
        /// </returns>
        /// <exception cref="Perst.StorageError">StorageError(StorageError.ErrorCode.UNSUPPORTED_INDEX_TYPE) exception if 
        /// specified key type is not supported by implementation.
        /// </exception>
#if USE_GENERICS
        CompoundIndex<V> CreateRandomAccessIndex<V>(Type[] types, bool unique) where V:class,IPersistent;
#else
        CompoundIndex    CreateRandomAccessIndex(Type[] types, bool unique);
#endif
#endif
		
#if USE_GENERICS
        /// <summary> 
        /// Create new field index optimized for access by element position.
        /// K parameter specifies key type, V - associated object type.
        /// </summary>
        /// <param name="fieldName">name of the index field. Field with such name should be present in specified class <code>type</code>
        /// </param>
        /// <param name="unique">whether index is unique (duplicate value of keys are not allowed)
        /// </param>
        /// <returns>persistent object implementing field index
        /// </returns>
        /// <exception cref="Perst.StorageError">StorageError(StorageError.INDEXED_FIELD_NOT_FOUND) if there is no such field in specified class,
        /// StorageError(StorageError.UNSUPPORTED_INDEX_TYPE) exception if type of specified field is not supported by implementation
        /// </exception>
        FieldIndex<K,V> CreateRandomAccessFieldIndex<K,V>(string fieldName, bool unique) where V:class,IPersistent;
#else
        /// <summary> 
        /// Create new field index optimized for access by element position.
        /// </summary>
        /// <param name="type">objects of which type (or derived from which type) will be included in the index
        /// </param>
        /// <param name="fieldName">name of the index field. Field with such name should be present in specified class <code>type</code>
        /// </param>
        /// <param name="unique">whether index is unique (duplicate value of keys are not allowed)
        /// </param>
        /// <returns>persistent object implementing field index
        /// </returns>
        /// <exception cref="Perst.StorageError">StorageError(StorageError.INDEXED_FIELD_NOT_FOUND) if there is no such field in specified class,
        /// StorageError(StorageError.UNSUPPORTED_INDEX_TYPE) exception if type of specified field is not supported by implementation
        /// </exception>
        FieldIndex CreateRandomAccessFieldIndex(Type type, string fieldName, bool unique);
#endif

#if !COMPACT_NET_FRAMEWORK
#if USE_GENERICS
        /// <summary> 
        /// Create new multi-field index optimized for access by element position.
        /// </summary>
        /// <param name="fieldNames">array of names of the fields. Field with such name should be present in specified class <code>type</code>
        /// </param>
        /// <param name="unique">whether index is unique (duplicate value of keys are not allowed)
        /// </param>
        /// <returns>persistent object implementing field index
        /// </returns>
        /// <exception cref="Perst.StorageError">StorageError(StorageError.INDEXED_FIELD_NOT_FOUND) if there is no such field in specified class,
        /// StorageError(StorageError.UNSUPPORTED_INDEX_TYPE) exception if type of specified field is not supported by implementation
        /// </exception>
        MultiFieldIndex<V> CreateRandomAccessFieldIndex<V>(string[] fieldNames, bool unique) where V:class,IPersistent;
#else
        /// <summary> 
        /// Create new multi-field index optimized for access by element position.
        /// </summary>
        /// <param name="type">objects of which type (or derived from which type) will be included in the index
        /// </param>
        /// <param name="fieldNames">array of names of the fields. Field with such name should be present in specified class <code>type</code>
        /// </param>
        /// <param name="unique">whether index is unique (duplicate value of keys are not allowed)
        /// </param>
        /// <returns>persistent object implementing field index
        /// </returns>
        /// <exception cref="Perst.StorageError">StorageError(StorageError.INDEXED_FIELD_NOT_FOUND) if there is no such field in specified class,
        /// StorageError(StorageError.UNSUPPORTED_INDEX_TYPE) exception if type of specified field is not supported by implementation
        /// </exception>
        MultiFieldIndex CreateRandomAccessFieldIndex(Type type, string[] fieldNames, bool unique);
#endif
#endif

        /// <summary>
        /// Create new bit index. Bit index is used to select object 
        /// with specified set of (boolean) properties.
        /// </summary>
        /// <returns>persistent object implementing bit index</returns>
#if USE_GENERICS
        BitIndex<T> CreateBitIndex<T>() where T:class,IPersistent;
#else
        BitIndex CreateBitIndex();
#endif

        /// <summary>
        /// Create new spatial index with integer coordinates
        /// </summary>
        /// <returns>
        /// persistent object implementing spatial index
        /// </returns>
#if USE_GENERICS
        SpatialIndex<T> CreateSpatialIndex<T>() where T:class,IPersistent;
#else
        SpatialIndex CreateSpatialIndex();
#endif

        /// <summary>
        /// Create new R2 spatial index
        /// </summary>
        /// <returns>
        /// persistent object implementing spatial index
        /// </returns>
#if USE_GENERICS
        SpatialIndexR2<T> CreateSpatialIndexR2<T>() where T:class,IPersistent;
#else
        SpatialIndexR2 CreateSpatialIndexR2();
#endif

        /// <summary>
        /// Create new sorted collection with specified comparator
        /// </summary>
        /// <param name="comparator">comparator class specifying order in the collection</param>
        /// <param name="unique"> whether collection is unique (members with the same key value are not allowed)</param>
        /// <returns> persistent object implementing sorted collection</returns>
#if USE_GENERICS
        SortedCollection<K,V> CreateSortedCollection<K,V>(PersistentComparator<K,V> comparator, bool unique) where V:class,IPersistent;
#else
        SortedCollection CreateSortedCollection(PersistentComparator comparator, bool unique);
#endif

        /// <summary>
        /// Create new sorted collection. Members of this collections should implement 
        /// <code>System.IComparable</code> interface and make it possible to compare 
        /// collection members with each other as well as with serch key.
        /// </summary>
        /// <param name="unique"> whether collection is unique (members with the same key value are not allowed)</param>
        /// <returns> persistent object implementing sorted collection</returns>
#if USE_GENERICS
        SortedCollection<K,V> CreateSortedCollection<K,V>(bool unique) where V:class,IPersistent,IComparable<K>,IComparable<V>;
#else
        SortedCollection CreateSortedCollection(bool unique);
#endif

        /// <summary>
        /// Create new object set
        /// </summary>
        /// <returns>
        /// empty set of persistent objects
        /// </returns>
#if USE_GENERICS
        ISet<T> CreateSet<T>() where T:class,IPersistent;
#else
        ISet CreateSet();
#endif

        /// <summary> Create one-to-many link.
        /// </summary>
        /// <returns>new empty link, new members can be added to the link later.
        /// 
        /// </returns>
#if USE_GENERICS
        Link<T> CreateLink<T>() where T:class,IPersistent;
#else
        Link CreateLink();
#endif
		
        /// <summary> Create one-to-many link with specified initial size.
        /// </summary>
        /// <param name="initialSize">initial size of the array</param>
        /// <returns>new link with specified size

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -