From a2bddc6cce8a7a61b8fc58d71565885021b2361e Mon Sep 17 00:00:00 2001 From: Julien Ruaux Date: Tue, 18 Jun 2019 09:43:29 -0700 Subject: [PATCH] added option to specify password in command --- README.adoc | 10 ++++++++++ pom.xml | 2 +- .../redislabs/riot/cli/DatabaseConnectionOptions.java | 2 +- src/main/java/com/redislabs/riot/cli/RootCommand.java | 2 +- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/README.adoc b/README.adoc index ed9d6e6ec..add9f06dc 100644 --- a/README.adoc +++ b/README.adoc @@ -40,6 +40,16 @@ WARNING: Add the appropriate driver jar for your database under the `lib` direct For example with MySQL: `lib/mysql-connector-java-5.1.47.jar` +==== MS SQL Server + +https://docs.microsoft.com/en-us/sql/connect/jdbc/microsoft-jdbc-driver-for-sql-server[JDBC Driver] + +https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-2017[Building the Connection URL] +``` +jdbc:sqlserver://[serverName[\instanceName][:portNumber]][;property=value[;property=value]] +``` + + === JSON RIOT can read and write JSON data in the following format: [source,plaintext] diff --git a/pom.xml b/pom.xml index 27cf0662d..4e24d4172 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ com.redislabs riot - 0.5.1 + 0.5.2 jar RIOT Redis Input/Output Tool diff --git a/src/main/java/com/redislabs/riot/cli/DatabaseConnectionOptions.java b/src/main/java/com/redislabs/riot/cli/DatabaseConnectionOptions.java index 90c452cae..bfc49d467 100644 --- a/src/main/java/com/redislabs/riot/cli/DatabaseConnectionOptions.java +++ b/src/main/java/com/redislabs/riot/cli/DatabaseConnectionOptions.java @@ -18,7 +18,7 @@ public class DatabaseConnectionOptions { private String url; @Option(names = "--username", description = "Login username of the database.") private String username; - @Option(names = "--password", description = "Login password of the database.", interactive = true) + @Option(names = "--password", description = "Login password of the database.", arity = "0..1", interactive = true) private String password; public DataSource dataSource() { diff --git a/src/main/java/com/redislabs/riot/cli/RootCommand.java b/src/main/java/com/redislabs/riot/cli/RootCommand.java index a0fcaa5db..351372ff0 100644 --- a/src/main/java/com/redislabs/riot/cli/RootCommand.java +++ b/src/main/java/com/redislabs/riot/cli/RootCommand.java @@ -49,7 +49,7 @@ public class RootCommand extends AbstractCommand { private int connectionTimeout = Protocol.DEFAULT_TIMEOUT; @Option(names = "--socket-timeout", description = "Redis socket timeout in milliseconds. (default: ${DEFAULT-VALUE}).") private int socketTimeout = Protocol.DEFAULT_TIMEOUT; - @Option(names = "--password", description = "Redis database password.", interactive = true) + @Option(names = "--password", description = "Redis database password.", arity = "0..1", interactive = true) private String password; @Option(names = "--pool-max-idle", description = "Maximum number of idle connections in the pool. Use a negative value to indicate an unlimited number of idle connections. (default: ${DEFAULT-VALUE}).") private int maxIdle = 8;