lib/mosql/cli.rb in mosql-0.4.0 vs lib/mosql/cli.rb in mosql-0.4.1

- old
+ new

@@ -96,9 +96,14 @@ end opts.on("--unsafe", "Ignore rows that cause errors on insert") do @options[:unsafe] = true end + + # eg, --oplog-filter '{"ns": {"$regex": "^somedb[0-9]*\\.collection$"}}' + opts.on("--oplog-filter [filter]", "An additional JSON filter for the oplog query") do |filter| + @options[:oplog_filter] = JSON.parse(filter) + end end optparse.parse!(@args) log = Log4r::Logger.new('Stripe')