@@ -106,23 +106,24 @@ type createCollectionOptionsInternal struct {
106106 ReplicationFactor replicationFactor `json:"replicationFactor,omitempty"`
107107 CacheEnabled * bool `json:"cacheEnabled,omitempty"`
108108 // Deprecated: use 'WriteConcern' instead
109- MinReplicationFactor int `json:"minReplicationFactor,omitempty"`
110- WriteConcern int `json:"writeConcern,omitempty"`
111- WaitForSync bool `json:"waitForSync,omitempty"`
112- DoCompact * bool `json:"doCompact,omitempty"`
113- IsVolatile bool `json:"isVolatile,omitempty"`
114- ShardKeys []string `json:"shardKeys,omitempty"`
115- NumberOfShards int `json:"numberOfShards,omitempty"`
116- IsSystem bool `json:"isSystem,omitempty"`
117- Type CollectionType `json:"type,omitempty"`
118- IndexBuckets int `json:"indexBuckets,omitempty"`
119- KeyOptions * CollectionKeyOptions `json:"keyOptions,omitempty"`
120- DistributeShardsLike string `json:"distributeShardsLike,omitempty"`
121- IsSmart bool `json:"isSmart,omitempty"`
122- SmartGraphAttribute string `json:"smartGraphAttribute,omitempty"`
123- Name string `json:"name"`
124- SmartJoinAttribute string `json:"smartJoinAttribute,omitempty"`
125- ShardingStrategy ShardingStrategy `json:"shardingStrategy,omitempty"`
109+ MinReplicationFactor int `json:"minReplicationFactor,omitempty"`
110+ WriteConcern int `json:"writeConcern,omitempty"`
111+ WaitForSync bool `json:"waitForSync,omitempty"`
112+ DoCompact * bool `json:"doCompact,omitempty"`
113+ IsVolatile bool `json:"isVolatile,omitempty"`
114+ ShardKeys []string `json:"shardKeys,omitempty"`
115+ NumberOfShards int `json:"numberOfShards,omitempty"`
116+ IsSystem bool `json:"isSystem,omitempty"`
117+ Type CollectionType `json:"type,omitempty"`
118+ IndexBuckets int `json:"indexBuckets,omitempty"`
119+ KeyOptions * CollectionKeyOptions `json:"keyOptions,omitempty"`
120+ DistributeShardsLike string `json:"distributeShardsLike,omitempty"`
121+ IsSmart bool `json:"isSmart,omitempty"`
122+ SmartGraphAttribute string `json:"smartGraphAttribute,omitempty"`
123+ Name string `json:"name"`
124+ SmartJoinAttribute string `json:"smartJoinAttribute,omitempty"`
125+ ShardingStrategy ShardingStrategy `json:"shardingStrategy,omitempty"`
126+ Schema * CollectionSchemaOptions `json:"schema,omitempty"`
126127}
127128
128129// CreateCollection creates a new collection with given name and options, and opens a connection to it.
@@ -195,6 +196,7 @@ func (p *createCollectionOptionsInternal) fromExternal(i *CreateCollectionOption
195196 p .SmartGraphAttribute = i .SmartGraphAttribute
196197 p .SmartJoinAttribute = i .SmartJoinAttribute
197198 p .ShardingStrategy = i .ShardingStrategy
199+ p .Schema = i .Schema
198200}
199201
200202// // MarshalJSON converts CreateCollectionOptions into json
0 commit comments