Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions clirr-ignored-differences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,8 @@
<className>com/google/cloud/spanner/jdbc/CloudSpannerJdbcConnection</className>
<method>com.google.cloud.spanner.DatabaseId getDatabaseId()</method>
</difference>
<difference>
<differenceType>8001</differenceType>
<className>com/google/cloud/spanner/connection/ConnectionPropertiesHelper</className>
</difference>
</differences>
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@
<goal>java</goal>
</goals>
<configuration>
<mainClass>com.google.cloud.spanner.connection.ConnectionPropertiesFileGenerator</mainClass>
<mainClass>com.google.cloud.spanner.jdbc.ConnectionPropertiesFileGenerator</mainClass>
<classpathScope>test</classpathScope>
<skip>false</skip>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
* limitations under the License.
*/

package com.google.cloud.spanner.connection;
package com.google.cloud.spanner.jdbc;

import com.google.api.core.InternalApi;
import com.google.cloud.spanner.connection.ConnectionProperties;
import com.google.cloud.spanner.connection.ConnectionProperty;
import com.google.common.collect.ImmutableList;
import java.sql.DriverPropertyInfo;
import java.util.Arrays;
Expand All @@ -26,16 +27,14 @@
import java.util.regex.Pattern;
import java.util.stream.Collectors;

// TODO: Remove this class when the Connection API has made the list of properties public.
@InternalApi
public class ConnectionPropertiesHelper {
public static ImmutableList<ConnectionProperty<?>> VALID_CONNECTION_PROPERTIES =
class ConnectionPropertiesHelper {
static ImmutableList<ConnectionProperty<?>> VALID_CONNECTION_PROPERTIES =
ImmutableList.copyOf(
ConnectionProperties.CONNECTION_PROPERTIES.values().stream()
ConnectionProperties.VALID_CONNECTION_PROPERTIES.stream()
.sorted(Comparator.comparing(ConnectionProperty::getName))
.collect(Collectors.toList()));

public static DriverPropertyInfo toDriverPropertyInfo(
static DriverPropertyInfo toDriverPropertyInfo(
String connectionUri, ConnectionProperty<?> connectionProperty) {
DriverPropertyInfo result =
new DriverPropertyInfo(
Expand All @@ -56,7 +55,7 @@ public static DriverPropertyInfo toDriverPropertyInfo(
return result;
}

public static String getConnectionPropertyName(ConnectionProperty<?> connectionProperty) {
static String getConnectionPropertyName(ConnectionProperty<?> connectionProperty) {
return connectionProperty.getName();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import com.google.cloud.spanner.SpannerException;
import com.google.cloud.spanner.connection.ConnectionOptions;
import com.google.cloud.spanner.connection.ConnectionOptionsHelper;
import com.google.cloud.spanner.connection.ConnectionPropertiesHelper;
import com.google.cloud.spanner.connection.ConnectionProperty;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Suppliers;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
* limitations under the License.
*/

package com.google.cloud.spanner.connection;
package com.google.cloud.spanner.jdbc;

import com.google.cloud.spanner.connection.ConnectionProperty;
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@

import com.google.cloud.ServiceOptions;
import com.google.cloud.spanner.MockSpannerServiceImpl;
import com.google.cloud.spanner.connection.ConnectionPropertiesHelper;
import com.google.cloud.spanner.connection.SpannerPool;
import com.google.common.collect.Collections2;
import com.google.common.collect.ImmutableList;
Expand Down