Implementation
Map<String, Object> get options => <String, Object>{
if (writeConcern != null)
keyWriteConcern:
writeConcern!.asMap(collection.db.masterConnection.serverStatus),
keyUniqueIndex: uniqueIndex,
keySparseIndex: sparseIndex,
keyBackground: background,
keyDropDuplicatedEntries: dropDuplicatedEntries,
if (geoLowerBound != null) keyGeoLowerBound: geoLowerBound!,
if (geoHighBound != null) keyGeoHighBound: geoHighBound!,
if (formatVersion != null) keyFormatVersion: formatVersion!,
if (expireAfterSeconds != null)
keyExpireAfterSeconds: expireAfterSeconds!,
if (indexName != null) keyIndexName: indexName!,
if (partialFilterExpression != null)
keyPartialFilterExpression: partialFilterExpression!,
if (collation != null) keyCollation: collation!,
//if (session 1= null) keySession: session
};