「SequoiaDBジャイアントセコイアデータベース」setAttributes()概要4

通常のコレクションを作成してから、コレクションをパーティション化されたコレクションに変更します。

db.sample.createCL('employee')
>
  > db.sample.employee.setAttributes( { ShardingKey: { a: 1 }, ShardingType: "hash" } )

通常のコレクションを作成してから、コレクションをパーティション化されたコレクションに変更し、自動的に分割します。

db.sample.createCL('employee')
db.sample.employee.setAttributes( { ShardingKey: { a: 1 }, ShardingType: "hash", AutoSplit: true } )

通常のコレクションを作成してから、コレクションをスナップ圧縮に変更します

db.sample.createCL('employee')
db.sample.employee.setAttributes( { CompressionType: 'snappy' } )

自動インクリメントフィールドを使用してコレクションを作成し、その初期値を変更します

db.sample.createCL( 'employee', { AutoIncrement: { Field: "studentID" } } )
db.sample.employee.setAttributes( { AutoIncrement: { Field: "studentID", StartValue: 2017140000 } } )

詳細については、Jushanデータベースドキュメントセンタークリックしてください

おすすめ

転載: blog.csdn.net/weixin_48909806/article/details/112968617