exe/csvsql in csvsql-0.1.3 vs exe/csvsql in csvsql-0.1.4

- old
+ new

@@ -24,10 +24,14 @@ "How many rows to import per batch. Default value is #{Csvsql::Db::BATCH_ROWS}" ) do |n| options[:batch_rows] = n.to_i end + opts.on('-e', '--encoding encoding', "Set the file encoding, default is UTF-8") do |encoding| + options[:encoding] = encoding + end + opts.on('--clear-cache', "Clear all cache data") do options[:clear_cache] = true end opts.on('--debug', "Print debug info") do @@ -47,8 +51,11 @@ csv_data = options[:csv_path] || StringIO.new($stdin.read) puts Csvsql.execute( ARGV[0], csv_data, - use_cache: options[:use_cache], batch_rows: options[:batch_rows], sql_error_action: 'exit' + use_cache: options[:use_cache], + batch_rows: options[:batch_rows], + sql_error_action: 'exit', + encoding: options[:encoding] )