Пример #1
0
        /// <summary>
        ///     Returns a value indicating whether the key is clustered.
        /// </summary>
        /// <param name="key"> The key. </param>
        /// <param name="storeObject"> The identifier of the store object. </param>
        /// <returns> <see langword="true" /> if the key is clustered. </returns>
        public static bool?IsClustered([NotNull] this IKey key, StoreObjectIdentifier storeObject)
        {
            var annotation = key.FindAnnotation(SqlServerAnnotationNames.Clustered);

            if (annotation != null)
            {
                return((bool?)annotation.Value);
            }

            return(GetDefaultIsClustered(key, storeObject));
        }
        /// <summary>
        ///     Returns a value indicating whether the key is clustered.
        /// </summary>
        /// <param name="key"> The key. </param>
        /// <param name="tableName"> The table name. </param>
        /// <param name="schema"> The schema. </param>
        /// <returns> <see langword="true" /> if the key is clustered. </returns>
        public static bool?IsClustered(
            [NotNull] this IKey key,
            [NotNull] string tableName,
            [CanBeNull] string schema)
        {
            var annotation = key.FindAnnotation(SqlServerAnnotationNames.Clustered);

            if (annotation != null)
            {
                return((bool?)annotation.Value);
            }

            return(GetDefaultIsClustered(key, tableName, schema));
        }