Skip to main content

This documentation is for an older version of this product. See the latest version of this content.Opens in a new tab

ShardKey (インデックス・キーワード)

このクラスに対するシャード・キーを指定します。

使用法

シャード・クラスが完全に実装されるまで、オブジェクト側からではなく、SQL からシャード・テーブルを作成することをお勧めします。ただし、シャード・テーブルを作成することによって生成したクラスを確認する場合、以下のようなコードを見ることもできます。

/// ShardKey index for Sharded table, auto-generated by DDL CREATE TABLE statement
Index ShardKey On DeptNum [ Abstract, CoshardWith = User.Department, ShardKey, SqlName = %ShardKey ];

この例で、DeptNum プロパティは、現在のクラスのシャード・キーです。

関連項目

FeedbackOpens in a new tab