@@ -250,10 +250,11 @@ StringBuilder toString(StringBuilder b) {
250250 }
251251
252252 /**
253- * Factory for creating {@link Statement}.
253+ * Factory for creating {@link Statement}s with unnamed parameters .
254254 *
255- * <p>This factory class supports creating {@link Statement} with positional(or unnamed)
256- * parameters.
255+ * <p>This class is primarily intended for framework developers who want to integrate the Spanner
256+ * client with a framework that uses unnamed parameters. Developers who want to use the Spanner
257+ * client in their application, should use named parameters.
257258 *
258259 * <p>
259260 *
@@ -266,7 +267,18 @@ StringBuilder toString(StringBuilder b) {
266267 * .withUnnamedParameters("SELECT * FROM TABLE WHERE ID = ?", 10L)
267268 * }</pre>
268269 *
269- * How to use SQL queries with IN command
270+ * SQL query with multiple parameters
271+ *
272+ * <pre>{@code
273+ * long id = 10L;
274+ * String name = "google";
275+ * List<String> phoneNumbers = Arrays.asList("1234567890", "0987654321");
276+ * Statement statement = databaseClient.getStatementFactory()
277+ * * .withUnnamedParameters("INSERT INTO TABLE (ID, name, phonenumbers)
278+ * // VALUES(?, ?, ?)", id, name, phoneNumbers)
279+ * }</pre>
280+ *
281+ * How to use arrays with the IN operator
270282 *
271283 * <pre>{@code
272284 * long[] ids = {10L, 12L, 1483L};
@@ -289,25 +301,27 @@ public Statement of(String sql) {
289301 }
290302
291303 /**
292- * This function accepts the SQL statement with unnamed parameters(?) and accepts the list of
293- * objects to replace unnamed parameters. Primitive types are supported.
304+ * This function accepts a SQL statement with unnamed parameters (?) and accepts a list of
305+ * objects that should be used as the values for those parameters. Primitive types are
306+ * supported.
294307 *
295- * <p>For Date column, following types are supported
308+ * <p>For parameters of type DATE, the following types are supported
296309 *
297310 * <ul>
298- * <li>java.util.Date
299- * <li>LocalDate
300- * <li>com.google.cloud.Date
311+ * <li>{@link java.time.LocalDate}
312+ * <li>{@link com.google.cloud.Date}
301313 * </ul>
302314 *
303- * <p>For Timestamp column, following types are supported. All the dates should be in UTC
304- * format. Incase if the timezone is not in UTC, spanner client will convert that to UTC
305- * automatically
315+ * <p>For parameters of type TIMESTAMP, the following types are supported. Note that Spanner
316+ * stores all timestamps in UTC. Instances of ZonedDateTime and OffsetDateTime that use other
317+ * timezones than UTC, will be converted to the corresponding UTC values before being sent to
318+ * Spanner. Instances of LocalDateTime will be converted to a ZonedDateTime using the system
319+ * default timezone, and then converted to UTC before being sent to Spanner.
306320 *
307321 * <ul>
308- * <li>LocalDateTime
309- * <li>OffsetDateTime
310- * <li>ZonedDateTime
322+ * <li>{@link java.time. LocalDateTime}
323+ * <li>{@link java.time. OffsetDateTime}
324+ * <li>{@link java.time. ZonedDateTime}
311325 * </ul>
312326 *
313327 * <p>
0 commit comments