Skip to content

Commit e39e973

Browse files
authored
Merge branch 'main' into x-goog-request-id-base
2 parents d0827e1 + 92494d0 commit e39e973

File tree

17 files changed

+2532
-816
lines changed

17 files changed

+2532
-816
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
1919
<dependency>
2020
<groupId>com.google.cloud</groupId>
2121
<artifactId>libraries-bom</artifactId>
22-
<version>26.54.0</version>
22+
<version>26.57.0</version>
2323
<type>pom</type>
2424
<scope>import</scope>
2525
</dependency>

google-cloud-spanner/clirr-ignored-differences.xml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -927,5 +927,23 @@
927927
<className>com/google/cloud/spanner/connection/ConnectionOptions</className>
928928
<field>VALID_PROPERTIES</field>
929929
</difference>
930+
931+
<!-- Remove supportsExplain() from the parser -->
932+
<difference>
933+
<differenceType>7002</differenceType>
934+
<className>com/google/cloud/spanner/connection/AbstractStatementParser</className>
935+
<method>boolean supportsExplain()</method>
936+
</difference>
937+
<difference>
938+
<differenceType>7002</differenceType>
939+
<className>com/google/cloud/spanner/connection/PostgreSQLStatementParser</className>
940+
<method>boolean supportsExplain()</method>
941+
</difference>
942+
<difference>
943+
<differenceType>7002</differenceType>
944+
<className>com/google/cloud/spanner/connection/SpannerStatementParser</className>
945+
<method>boolean supportsExplain()</method>
946+
</difference>
947+
930948

931949
</differences>

google-cloud-spanner/pom.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,19 @@
517517
</execution>
518518
</executions>
519519
</plugin>
520+
<plugin>
521+
<groupId>org.apache.maven.plugins</groupId>
522+
<artifactId>maven-compiler-plugin</artifactId>
523+
<configuration>
524+
<annotationProcessorPaths>
525+
<path>
526+
<groupId>org.openjdk.jmh</groupId>
527+
<artifactId>jmh-generator-annprocess</artifactId>
528+
<version>1.37</version>
529+
</path>
530+
</annotationProcessorPaths>
531+
</configuration>
532+
</plugin>
520533
</plugins>
521534
</build>
522535
</profile>

google-cloud-spanner/src/main/java/com/google/cloud/spanner/Statement.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
import com.google.cloud.spanner.ReadContext.QueryAnalyzeMode;
2323
import com.google.common.base.Preconditions;
24+
import com.google.common.collect.ImmutableMap;
2425
import com.google.spanner.v1.ExecuteSqlRequest.QueryOptions;
2526
import java.io.Serializable;
2627
import java.util.Collections;
@@ -140,7 +141,12 @@ Builder handle(Value value) {
140141

141142
/** Creates a {@code Statement} with the given SQL text {@code sql}. */
142143
public static Statement of(String sql) {
143-
return newBuilder(sql).build();
144+
return new Statement(sql, ImmutableMap.of(), /*queryOptions=*/ null);
145+
}
146+
147+
/** Creates a {@link Statement} with the given SQL text and parameters. */
148+
public static Statement of(String sql, ImmutableMap<String, Value> parameters) {
149+
return new Statement(sql, parameters, /*queryOptions=*/ null);
144150
}
145151

146152
/** Creates a new statement builder with the SQL text {@code sql}. */

0 commit comments

Comments
 (0)