Class: VertxMongo::MongoClient
- Inherits:
-
Object
- Object
- VertxMongo::MongoClient
- Defined in:
- /Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mongo/mongo_client.rb
Class Method Summary (collapse)
- + (Object) create_non_shared(vertx = nil, config = nil)
- + (Object) create_shared(vertx = nil, config = nil, dataSourceName = nil)
Instance Method Summary (collapse)
- - (Object) close
- - (Object) count(collection = nil, query = nil)
- - (Object) create_collection(collectionName = nil)
- - (Object) create_index(collection = nil, key = nil)
- - (Object) create_index_with_options(collection = nil, key = nil, options = nil)
- - (Object) distinct(collection = nil, fieldName = nil, resultClassname = nil)
- - (Object) distinct_batch(collection = nil, fieldName = nil, resultClassname = nil)
- - (Object) drop_collection(collection = nil)
- - (Object) drop_index(collection = nil, indexName = nil)
- - (Object) find(collection = nil, query = nil)
- - (Object) find_batch(collection = nil, query = nil)
- - (Object) find_batch_with_options(collection = nil, query = nil, options = nil)
- - (Object) find_one(collection = nil, query = nil, fields = nil)
- - (Object) find_with_options(collection = nil, query = nil, options = nil)
- - (Object) get_collections
-
- (MongoClient) initialize(j_del)
constructor
A new instance of MongoClient.
- - (Object) insert(collection = nil, document = nil)
- - (Object) insert_with_options(collection = nil, document = nil, writeOption = nil)
- - (Object) j_del
- - (Object) list_indexes(collection = nil)
- - (Object) remove(collection = nil, query = nil)
- - (Object) remove_document(collection = nil, query = nil)
- - (Object) remove_document_with_options(collection = nil, query = nil, writeOption = nil)
- - (Object) remove_documents(collection = nil, query = nil)
- - (Object) remove_documents_with_options(collection = nil, query = nil, writeOption = nil)
- - (Object) remove_one(collection = nil, query = nil)
- - (Object) remove_one_with_options(collection = nil, query = nil, writeOption = nil)
- - (Object) remove_with_options(collection = nil, query = nil, writeOption = nil)
- - (Object) replace(collection = nil, query = nil, replace = nil)
- - (Object) replace_documents(collection = nil, query = nil, replace = nil)
- - (Object) replace_documents_with_options(collection = nil, query = nil, replace = nil, options = nil)
- - (Object) replace_with_options(collection = nil, query = nil, replace = nil, options = nil)
- - (Object) run_command(commandName = nil, command = nil)
- - (Object) save(collection = nil, document = nil)
- - (Object) save_with_options(collection = nil, document = nil, writeOption = nil)
- - (Object) update(collection = nil, query = nil, update = nil)
- - (Object) update_collection(collection = nil, query = nil, update = nil)
- - (Object) update_collection_with_options(collection = nil, query = nil, update = nil, options = nil)
- - (Object) update_with_options(collection = nil, query = nil, update = nil, options = nil)
Constructor Details
- (MongoClient) initialize(j_del)
Returns a new instance of MongoClient
11 12 13 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mongo/mongo_client.rb', line 11 def initialize(j_del) @j_del = j_del end |
Class Method Details
+ (Object) create_non_shared(vertx = nil, config = nil)
23 24 25 26 27 28 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mongo/mongo_client.rb', line 23 def self.create_non_shared(vertx=nil,config=nil) if vertx.class.method_defined?(:j_del) && config.class == Hash && !block_given? return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtMongo::MongoClient.java_method(:createNonShared, [Java::IoVertxCore::Vertx.java_class,Java::IoVertxCoreJson::JsonObject.java_class]).call(vertx.j_del,::Vertx::Util::Utils.to_json_object(config)),::VertxMongo::MongoClient) end raise ArgumentError, "Invalid arguments when calling create_non_shared(vertx,config)" end |
+ (Object) create_shared(vertx = nil, config = nil, dataSourceName = nil)
35 36 37 38 39 40 41 42 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mongo/mongo_client.rb', line 35 def self.create_shared(vertx=nil,config=nil,dataSourceName=nil) if vertx.class.method_defined?(:j_del) && config.class == Hash && !block_given? && dataSourceName == nil return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtMongo::MongoClient.java_method(:createShared, [Java::IoVertxCore::Vertx.java_class,Java::IoVertxCoreJson::JsonObject.java_class]).call(vertx.j_del,::Vertx::Util::Utils.to_json_object(config)),::VertxMongo::MongoClient) elsif vertx.class.method_defined?(:j_del) && config.class == Hash && dataSourceName.class == String && !block_given? return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtMongo::MongoClient.java_method(:createShared, [Java::IoVertxCore::Vertx.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::java.lang.String.java_class]).call(vertx.j_del,::Vertx::Util::Utils.to_json_object(config),dataSourceName),::VertxMongo::MongoClient) end raise ArgumentError, "Invalid arguments when calling create_shared(vertx,config,dataSourceName)" end |
Instance Method Details
- (Object) close
515 516 517 518 519 520 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mongo/mongo_client.rb', line 515 def close if !block_given? return @j_del.java_method(:close, []).call() end raise ArgumentError, "Invalid arguments when calling close()" end |
- (Object) count(collection = nil, query = nil)
285 286 287 288 289 290 291 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mongo/mongo_client.rb', line 285 def count(collection=nil,query=nil) if collection.class == String && query.class == Hash && block_given? @j_del.java_method(:count, [Java::java.lang.String.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxCore::Handler.java_class]).call(collection,::Vertx::Util::Utils.to_json_object(query),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) })) return self end raise ArgumentError, "Invalid arguments when calling count(collection,query)" end |
- (Object) create_collection(collectionName = nil)
396 397 398 399 400 401 402 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mongo/mongo_client.rb', line 396 def create_collection(collectionName=nil) if collectionName.class == String && block_given? @j_del.java_method(:createCollection, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(collectionName,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) })) return self end raise ArgumentError, "Invalid arguments when calling create_collection(collectionName)" end |
- (Object) create_index(collection = nil, key = nil)
429 430 431 432 433 434 435 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mongo/mongo_client.rb', line 429 def create_index(collection=nil,key=nil) if collection.class == String && key.class == Hash && block_given? @j_del.java_method(:createIndex, [Java::java.lang.String.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxCore::Handler.java_class]).call(collection,::Vertx::Util::Utils.to_json_object(key),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) })) return self end raise ArgumentError, "Invalid arguments when calling create_index(collection,key)" end |
- (Object) create_index_with_options(collection = nil, key = nil, options = nil)
442 443 444 445 446 447 448 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mongo/mongo_client.rb', line 442 def (collection=nil,key=nil,=nil) if collection.class == String && key.class == Hash && .class == Hash && block_given? @j_del.java_method(:createIndexWithOptions, [Java::java.lang.String.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxExtMongo::IndexOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(collection,::Vertx::Util::Utils.to_json_object(key),Java::IoVertxExtMongo::IndexOptions.new(::Vertx::Util::Utils.to_json_object()),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) })) return self end raise ArgumentError, "Invalid arguments when calling create_index_with_options(collection,key,options)" end |
- (Object) distinct(collection = nil, fieldName = nil, resultClassname = nil)
491 492 493 494 495 496 497 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mongo/mongo_client.rb', line 491 def distinct(collection=nil,fieldName=nil,resultClassname=nil) if collection.class == String && fieldName.class == String && resultClassname.class == String && block_given? @j_del.java_method(:distinct, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(collection,fieldName,resultClassname,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.encode) : nil : nil) })) return self end raise ArgumentError, "Invalid arguments when calling distinct(collection,fieldName,resultClassname)" end |
- (Object) distinct_batch(collection = nil, fieldName = nil, resultClassname = nil)
506 507 508 509 510 511 512 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mongo/mongo_client.rb', line 506 def distinct_batch(collection=nil,fieldName=nil,resultClassname=nil) if collection.class == String && fieldName.class == String && resultClassname.class == String && block_given? @j_del.java_method(:distinctBatch, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(collection,fieldName,resultClassname,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.encode) : nil : nil) })) return self end raise ArgumentError, "Invalid arguments when calling distinct_batch(collection,fieldName,resultClassname)" end |
- (Object) drop_collection(collection = nil)
417 418 419 420 421 422 423 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mongo/mongo_client.rb', line 417 def drop_collection(collection=nil) if collection.class == String && block_given? @j_del.java_method(:dropCollection, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(collection,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) })) return self end raise ArgumentError, "Invalid arguments when calling drop_collection(collection)" end |
- (Object) drop_index(collection = nil, indexName = nil)
465 466 467 468 469 470 471 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mongo/mongo_client.rb', line 465 def drop_index(collection=nil,indexName=nil) if collection.class == String && indexName.class == String && block_given? @j_del.java_method(:dropIndex, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(collection,indexName,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) })) return self end raise ArgumentError, "Invalid arguments when calling drop_index(collection,indexName)" end |
- (Object) find(collection = nil, query = nil)
218 219 220 221 222 223 224 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mongo/mongo_client.rb', line 218 def find(collection=nil,query=nil) if collection.class == String && query.class == Hash && block_given? @j_del.java_method(:find, [Java::java.lang.String.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxCore::Handler.java_class]).call(collection,::Vertx::Util::Utils.to_json_object(query),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result.to_a.map { |elt| elt != nil ? JSON.parse(elt.encode) : nil } : nil) })) return self end raise ArgumentError, "Invalid arguments when calling find(collection,query)" end |
- (Object) find_batch(collection = nil, query = nil)
231 232 233 234 235 236 237 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mongo/mongo_client.rb', line 231 def find_batch(collection=nil,query=nil) if collection.class == String && query.class == Hash && block_given? @j_del.java_method(:findBatch, [Java::java.lang.String.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxCore::Handler.java_class]).call(collection,::Vertx::Util::Utils.to_json_object(query),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.encode) : nil : nil) })) return self end raise ArgumentError, "Invalid arguments when calling find_batch(collection,query)" end |
- (Object) find_batch_with_options(collection = nil, query = nil, options = nil)
258 259 260 261 262 263 264 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mongo/mongo_client.rb', line 258 def (collection=nil,query=nil,=nil) if collection.class == String && query.class == Hash && .class == Hash && block_given? @j_del.java_method(:findBatchWithOptions, [Java::java.lang.String.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxExtMongo::FindOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(collection,::Vertx::Util::Utils.to_json_object(query),Java::IoVertxExtMongo::FindOptions.new(::Vertx::Util::Utils.to_json_object()),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.encode) : nil : nil) })) return self end raise ArgumentError, "Invalid arguments when calling find_batch_with_options(collection,query,options)" end |
- (Object) find_one(collection = nil, query = nil, fields = nil)
273 274 275 276 277 278 279 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mongo/mongo_client.rb', line 273 def find_one(collection=nil,query=nil,fields=nil) if collection.class == String && query.class == Hash && fields.class == Hash && block_given? @j_del.java_method(:findOne, [Java::java.lang.String.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxCore::Handler.java_class]).call(collection,::Vertx::Util::Utils.to_json_object(query),::Vertx::Util::Utils.to_json_object(fields),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.encode) : nil : nil) })) return self end raise ArgumentError, "Invalid arguments when calling find_one(collection,query,fields)" end |
- (Object) find_with_options(collection = nil, query = nil, options = nil)
244 245 246 247 248 249 250 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mongo/mongo_client.rb', line 244 def (collection=nil,query=nil,=nil) if collection.class == String && query.class == Hash && .class == Hash && block_given? @j_del.java_method(:findWithOptions, [Java::java.lang.String.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxExtMongo::FindOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(collection,::Vertx::Util::Utils.to_json_object(query),Java::IoVertxExtMongo::FindOptions.new(::Vertx::Util::Utils.to_json_object()),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result.to_a.map { |elt| elt != nil ? JSON.parse(elt.encode) : nil } : nil) })) return self end raise ArgumentError, "Invalid arguments when calling find_with_options(collection,query,options)" end |
- (Object) get_collections
406 407 408 409 410 411 412 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mongo/mongo_client.rb', line 406 def get_collections if block_given? @j_del.java_method(:getCollections, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result.to_a.map { |elt| elt } : nil) })) return self end raise ArgumentError, "Invalid arguments when calling get_collections()" end |
- (Object) insert(collection = nil, document = nil)
79 80 81 82 83 84 85 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mongo/mongo_client.rb', line 79 def insert(collection=nil,document=nil) if collection.class == String && document.class == Hash && block_given? @j_del.java_method(:insert, [Java::java.lang.String.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxCore::Handler.java_class]).call(collection,::Vertx::Util::Utils.to_json_object(document),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) })) return self end raise ArgumentError, "Invalid arguments when calling insert(collection,document)" end |
- (Object) insert_with_options(collection = nil, document = nil, writeOption = nil)
94 95 96 97 98 99 100 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mongo/mongo_client.rb', line 94 def (collection=nil,document=nil,writeOption=nil) if collection.class == String && document.class == Hash && writeOption.class == Symbol && block_given? @j_del.java_method(:insertWithOptions, [Java::java.lang.String.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxExtMongo::WriteOption.java_class,Java::IoVertxCore::Handler.java_class]).call(collection,::Vertx::Util::Utils.to_json_object(document),Java::IoVertxExtMongo::WriteOption.valueOf(writeOption),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) })) return self end raise ArgumentError, "Invalid arguments when calling insert_with_options(collection,document,writeOption)" end |
- (Object) j_del
16 17 18 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mongo/mongo_client.rb', line 16 def j_del @j_del end |
- (Object) list_indexes(collection = nil)
453 454 455 456 457 458 459 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mongo/mongo_client.rb', line 453 def list_indexes(collection=nil) if collection.class == String && block_given? @j_del.java_method(:listIndexes, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(collection,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.encode) : nil : nil) })) return self end raise ArgumentError, "Invalid arguments when calling list_indexes(collection)" end |
- (Object) remove(collection = nil, query = nil)
297 298 299 300 301 302 303 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mongo/mongo_client.rb', line 297 def remove(collection=nil,query=nil) if collection.class == String && query.class == Hash && block_given? @j_del.java_method(:remove, [Java::java.lang.String.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxCore::Handler.java_class]).call(collection,::Vertx::Util::Utils.to_json_object(query),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) })) return self end raise ArgumentError, "Invalid arguments when calling remove(collection,query)" end |
- (Object) remove_document(collection = nil, query = nil)
359 360 361 362 363 364 365 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mongo/mongo_client.rb', line 359 def remove_document(collection=nil,query=nil) if collection.class == String && query.class == Hash && block_given? @j_del.java_method(:removeDocument, [Java::java.lang.String.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxCore::Handler.java_class]).call(collection,::Vertx::Util::Utils.to_json_object(query),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) })) return self end raise ArgumentError, "Invalid arguments when calling remove_document(collection,query)" end |
- (Object) remove_document_with_options(collection = nil, query = nil, writeOption = nil)
385 386 387 388 389 390 391 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mongo/mongo_client.rb', line 385 def (collection=nil,query=nil,writeOption=nil) if collection.class == String && query.class == Hash && writeOption.class == Symbol && block_given? @j_del.java_method(:removeDocumentWithOptions, [Java::java.lang.String.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxExtMongo::WriteOption.java_class,Java::IoVertxCore::Handler.java_class]).call(collection,::Vertx::Util::Utils.to_json_object(query),Java::IoVertxExtMongo::WriteOption.valueOf(writeOption),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) })) return self end raise ArgumentError, "Invalid arguments when calling remove_document_with_options(collection,query,writeOption)" end |
- (Object) remove_documents(collection = nil, query = nil)
309 310 311 312 313 314 315 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mongo/mongo_client.rb', line 309 def remove_documents(collection=nil,query=nil) if collection.class == String && query.class == Hash && block_given? @j_del.java_method(:removeDocuments, [Java::java.lang.String.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxCore::Handler.java_class]).call(collection,::Vertx::Util::Utils.to_json_object(query),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) })) return self end raise ArgumentError, "Invalid arguments when calling remove_documents(collection,query)" end |
- (Object) remove_documents_with_options(collection = nil, query = nil, writeOption = nil)
335 336 337 338 339 340 341 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mongo/mongo_client.rb', line 335 def (collection=nil,query=nil,writeOption=nil) if collection.class == String && query.class == Hash && writeOption.class == Symbol && block_given? @j_del.java_method(:removeDocumentsWithOptions, [Java::java.lang.String.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxExtMongo::WriteOption.java_class,Java::IoVertxCore::Handler.java_class]).call(collection,::Vertx::Util::Utils.to_json_object(query),Java::IoVertxExtMongo::WriteOption.valueOf(writeOption),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) })) return self end raise ArgumentError, "Invalid arguments when calling remove_documents_with_options(collection,query,writeOption)" end |
- (Object) remove_one(collection = nil, query = nil)
347 348 349 350 351 352 353 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mongo/mongo_client.rb', line 347 def remove_one(collection=nil,query=nil) if collection.class == String && query.class == Hash && block_given? @j_del.java_method(:removeOne, [Java::java.lang.String.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxCore::Handler.java_class]).call(collection,::Vertx::Util::Utils.to_json_object(query),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) })) return self end raise ArgumentError, "Invalid arguments when calling remove_one(collection,query)" end |
- (Object) remove_one_with_options(collection = nil, query = nil, writeOption = nil)
372 373 374 375 376 377 378 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mongo/mongo_client.rb', line 372 def (collection=nil,query=nil,writeOption=nil) if collection.class == String && query.class == Hash && writeOption.class == Symbol && block_given? @j_del.java_method(:removeOneWithOptions, [Java::java.lang.String.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxExtMongo::WriteOption.java_class,Java::IoVertxCore::Handler.java_class]).call(collection,::Vertx::Util::Utils.to_json_object(query),Java::IoVertxExtMongo::WriteOption.valueOf(writeOption),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) })) return self end raise ArgumentError, "Invalid arguments when calling remove_one_with_options(collection,query,writeOption)" end |
- (Object) remove_with_options(collection = nil, query = nil, writeOption = nil)
322 323 324 325 326 327 328 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mongo/mongo_client.rb', line 322 def (collection=nil,query=nil,writeOption=nil) if collection.class == String && query.class == Hash && writeOption.class == Symbol && block_given? @j_del.java_method(:removeWithOptions, [Java::java.lang.String.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxExtMongo::WriteOption.java_class,Java::IoVertxCore::Handler.java_class]).call(collection,::Vertx::Util::Utils.to_json_object(query),Java::IoVertxExtMongo::WriteOption.valueOf(writeOption),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) })) return self end raise ArgumentError, "Invalid arguments when calling remove_with_options(collection,query,writeOption)" end |
- (Object) replace(collection = nil, query = nil, replace = nil)
163 164 165 166 167 168 169 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mongo/mongo_client.rb', line 163 def replace(collection=nil,query=nil,replace=nil) if collection.class == String && query.class == Hash && replace.class == Hash && block_given? @j_del.java_method(:replace, [Java::java.lang.String.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxCore::Handler.java_class]).call(collection,::Vertx::Util::Utils.to_json_object(query),::Vertx::Util::Utils.to_json_object(replace),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) })) return self end raise ArgumentError, "Invalid arguments when calling replace(collection,query,replace)" end |
- (Object) replace_documents(collection = nil, query = nil, replace = nil)
176 177 178 179 180 181 182 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mongo/mongo_client.rb', line 176 def replace_documents(collection=nil,query=nil,replace=nil) if collection.class == String && query.class == Hash && replace.class == Hash && block_given? @j_del.java_method(:replaceDocuments, [Java::java.lang.String.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxCore::Handler.java_class]).call(collection,::Vertx::Util::Utils.to_json_object(query),::Vertx::Util::Utils.to_json_object(replace),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) })) return self end raise ArgumentError, "Invalid arguments when calling replace_documents(collection,query,replace)" end |
- (Object) replace_documents_with_options(collection = nil, query = nil, replace = nil, options = nil)
206 207 208 209 210 211 212 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mongo/mongo_client.rb', line 206 def (collection=nil,query=nil,replace=nil,=nil) if collection.class == String && query.class == Hash && replace.class == Hash && .class == Hash && block_given? @j_del.java_method(:replaceDocumentsWithOptions, [Java::java.lang.String.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxExtMongo::UpdateOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(collection,::Vertx::Util::Utils.to_json_object(query),::Vertx::Util::Utils.to_json_object(replace),Java::IoVertxExtMongo::UpdateOptions.new(::Vertx::Util::Utils.to_json_object()),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) })) return self end raise ArgumentError, "Invalid arguments when calling replace_documents_with_options(collection,query,replace,options)" end |
- (Object) replace_with_options(collection = nil, query = nil, replace = nil, options = nil)
192 193 194 195 196 197 198 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mongo/mongo_client.rb', line 192 def (collection=nil,query=nil,replace=nil,=nil) if collection.class == String && query.class == Hash && replace.class == Hash && .class == Hash && block_given? @j_del.java_method(:replaceWithOptions, [Java::java.lang.String.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxExtMongo::UpdateOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(collection,::Vertx::Util::Utils.to_json_object(query),::Vertx::Util::Utils.to_json_object(replace),Java::IoVertxExtMongo::UpdateOptions.new(::Vertx::Util::Utils.to_json_object()),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) })) return self end raise ArgumentError, "Invalid arguments when calling replace_with_options(collection,query,replace,options)" end |
- (Object) run_command(commandName = nil, command = nil)
477 478 479 480 481 482 483 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mongo/mongo_client.rb', line 477 def run_command(commandName=nil,command=nil) if commandName.class == String && command.class == Hash && block_given? @j_del.java_method(:runCommand, [Java::java.lang.String.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxCore::Handler.java_class]).call(commandName,::Vertx::Util::Utils.to_json_object(command),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.encode) : nil : nil) })) return self end raise ArgumentError, "Invalid arguments when calling run_command(commandName,command)" end |
- (Object) save(collection = nil, document = nil)
50 51 52 53 54 55 56 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mongo/mongo_client.rb', line 50 def save(collection=nil,document=nil) if collection.class == String && document.class == Hash && block_given? @j_del.java_method(:save, [Java::java.lang.String.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxCore::Handler.java_class]).call(collection,::Vertx::Util::Utils.to_json_object(document),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) })) return self end raise ArgumentError, "Invalid arguments when calling save(collection,document)" end |
- (Object) save_with_options(collection = nil, document = nil, writeOption = nil)
65 66 67 68 69 70 71 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mongo/mongo_client.rb', line 65 def (collection=nil,document=nil,writeOption=nil) if collection.class == String && document.class == Hash && writeOption.class == Symbol && block_given? @j_del.java_method(:saveWithOptions, [Java::java.lang.String.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxExtMongo::WriteOption.java_class,Java::IoVertxCore::Handler.java_class]).call(collection,::Vertx::Util::Utils.to_json_object(document),Java::IoVertxExtMongo::WriteOption.valueOf(writeOption),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) })) return self end raise ArgumentError, "Invalid arguments when calling save_with_options(collection,document,writeOption)" end |
- (Object) update(collection = nil, query = nil, update = nil)
107 108 109 110 111 112 113 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mongo/mongo_client.rb', line 107 def update(collection=nil,query=nil,update=nil) if collection.class == String && query.class == Hash && update.class == Hash && block_given? @j_del.java_method(:update, [Java::java.lang.String.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxCore::Handler.java_class]).call(collection,::Vertx::Util::Utils.to_json_object(query),::Vertx::Util::Utils.to_json_object(update),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) })) return self end raise ArgumentError, "Invalid arguments when calling update(collection,query,update)" end |
- (Object) update_collection(collection = nil, query = nil, update = nil)
120 121 122 123 124 125 126 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mongo/mongo_client.rb', line 120 def update_collection(collection=nil,query=nil,update=nil) if collection.class == String && query.class == Hash && update.class == Hash && block_given? @j_del.java_method(:updateCollection, [Java::java.lang.String.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxCore::Handler.java_class]).call(collection,::Vertx::Util::Utils.to_json_object(query),::Vertx::Util::Utils.to_json_object(update),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) })) return self end raise ArgumentError, "Invalid arguments when calling update_collection(collection,query,update)" end |
- (Object) update_collection_with_options(collection = nil, query = nil, update = nil, options = nil)
148 149 150 151 152 153 154 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mongo/mongo_client.rb', line 148 def (collection=nil,query=nil,update=nil,=nil) if collection.class == String && query.class == Hash && update.class == Hash && .class == Hash && block_given? @j_del.java_method(:updateCollectionWithOptions, [Java::java.lang.String.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxExtMongo::UpdateOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(collection,::Vertx::Util::Utils.to_json_object(query),::Vertx::Util::Utils.to_json_object(update),Java::IoVertxExtMongo::UpdateOptions.new(::Vertx::Util::Utils.to_json_object()),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) })) return self end raise ArgumentError, "Invalid arguments when calling update_collection_with_options(collection,query,update,options)" end |
- (Object) update_with_options(collection = nil, query = nil, update = nil, options = nil)
134 135 136 137 138 139 140 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mongo/mongo_client.rb', line 134 def (collection=nil,query=nil,update=nil,=nil) if collection.class == String && query.class == Hash && update.class == Hash && .class == Hash && block_given? @j_del.java_method(:updateWithOptions, [Java::java.lang.String.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxExtMongo::UpdateOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(collection,::Vertx::Util::Utils.to_json_object(query),::Vertx::Util::Utils.to_json_object(update),Java::IoVertxExtMongo::UpdateOptions.new(::Vertx::Util::Utils.to_json_object()),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) })) return self end raise ArgumentError, "Invalid arguments when calling update_with_options(collection,query,update,options)" end |