"SequoiaDB Giant Sequoia Database" setAttributes() Overview 4

Example

Create a normal collection, and then modify the collection to a partitioned collection.

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

Create a normal collection, then modify the collection to a partitioned collection, and automatically split:

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

Create a normal collection, and then modify the collection to snappy compression

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

Create a collection with auto-increment fields and modify its initial value

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

Click on Jushan Database Documentation Center for more information

Guess you like

Origin blog.csdn.net/weixin_48909806/article/details/112968617