/// <summary> /// Sets a value indicating whether the key is clustered. /// </summary> /// <param name="key"> The key. </param> /// <param name="clustered"> The value to set. </param> public static void SetIsClustered([NotNull] this IMutableKey key, bool?clustered) => key.SetOrRemoveAnnotation(SqlServerAnnotationNames.Clustered, clustered);
/// <summary> /// Sets the key constraint name for this key. /// </summary> /// <param name="key"> The key. </param> /// <param name="name"> The value to set. </param> public static void SetName([NotNull] this IMutableKey key, [CanBeNull] string name) => key.SetOrRemoveAnnotation( RelationalAnnotationNames.Name, Check.NullButNotEmpty(name, nameof(name)));
/// <summary> /// Sets prefix lengths for the key. /// </summary> /// <param name="values"> The prefix lengths to set. /// A value of `0` indicates, that the full length should be used for that column. </param> /// <param name="key"> The key. </param> public static void SetPrefixLength([NotNull] this IMutableKey key, int[] values) => key.SetOrRemoveAnnotation( MySqlAnnotationNames.IndexPrefixLength, values);