Class: MongoDbUtils::Tools::Import
- Defined in:
- lib/mongo-db-utils/tools/commands.rb
Instance Method Summary collapse
-
#initialize(host_and_port, db, collection, file, username = '', password = '', opts = {}) ⇒ Import
constructor
A new instance of Import.
Methods inherited from BaseCmd
Constructor Details
#initialize(host_and_port, db, collection, file, username = '', password = '', opts = {}) ⇒ Import
Returns a new instance of Import.
91 92 93 94 95 96 97 |
# File 'lib/mongo-db-utils/tools/commands.rb', line 91 def initialize(host_and_port, db, collection, file, username = '', password = '', opts = {}) super('mongoimport', host_and_port, db, username, password) add_option(o('-c', collection)) add_option(o('--file', file)) add_option('--jsonArray') if opts[:json_array] add_option('--drop') if opts[:drop] end |