This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.mongodb.client.MongoClients; | |
import com.mongodb.client.MongoCollection; | |
import org.bson.BsonArray; | |
import org.bson.BsonDocument; | |
import org.bson.BsonInt32; | |
import org.bson.BsonNull; | |
import org.bson.BsonString; | |
import org.bson.BsonValue; | |
import org.bson.Document; | |
import org.bson.conversions.Bson; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x = 5000 OR x = 6000 | |
{ | |
"$match": { | |
"$or": [ | |
{ | |
"x": 5000 | |
}, | |
{ | |
"x": 6000 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (c) 2008 - 2013 10gen, Inc. <http://10gen.com> | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright 2008-present MongoDB, Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.mongodb.ConnectionString; | |
import com.mongodb.MongoClientSettings; | |
import com.mongodb.client.MongoClient; | |
import com.mongodb.client.MongoClients; | |
import javax.net.ssl.SSLContext; | |
import java.security.NoSuchAlgorithmException; | |
import java.util.function.Consumer; | |
public class ProgrammaticMongoClientSettingsConfiguration { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.mongodb.MongoClientSettings; | |
import com.mongodb.client.MongoClient; | |
import com.mongodb.client.MongoClients; | |
import com.mongodb.client.MongoCollection; | |
import com.mongodb.client.model.Filters; | |
import com.mongodb.client.model.Updates; | |
import com.mongodb.event.CommandListener; | |
import com.mongodb.event.CommandStartedEvent; | |
import org.bson.BsonArray; | |
import org.bson.BsonDocument; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (c) 2008 - 2013 10gen, Inc. <http://10gen.com> | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.mongodb; | |
import com.mongodb.MongoClientSettings; | |
import com.mongodb.client.MongoClient; | |
import com.mongodb.client.MongoClients; | |
import com.mongodb.connection.ClusterDescription; | |
import com.mongodb.event.ClusterDescriptionChangedEvent; | |
import com.mongodb.event.ClusterListener; | |
import org.bson.Document; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.mongodb.ConnectionString; | |
import com.mongodb.MongoClientSettings; | |
import com.mongodb.client.MongoClient; | |
import com.mongodb.client.MongoClients; | |
import com.mongodb.connection.SocketSettings; | |
import com.mongodb.connection.SocketStreamFactory; | |
import com.mongodb.connection.SslSettings; | |
import com.mongodb.connection.StreamFactory; | |
import com.mongodb.connection.StreamFactoryFactory; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright 2023 MongoDB, Inc. | |
*/ | |
import com.mongodb.AutoEncryptionSettings; | |
import com.mongodb.ClientEncryptionSettings; | |
import com.mongodb.MongoClientSettings; | |
import com.mongodb.client.MongoClients; | |
import com.mongodb.client.MongoDatabase; | |
import com.mongodb.client.model.vault.EncryptOptions; |
NewerOlder