File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
samples/snippets/src/main/java/com/example/spanner Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1575,21 +1575,21 @@ static void isolationLevelSetting(DatabaseId db) {
1575
1575
.readWriteTransaction (Options .isolationLevel (IsolationLevel .REPEATABLE_READ ))
1576
1576
.run (transaction -> {
1577
1577
// Read an AlbumTitle.
1578
- String select_sql =
1578
+ String selectSql =
1579
1579
"SELECT AlbumTitle from Albums WHERE SingerId = 1 and AlbumId = 1" ;
1580
- ResultSet resultSet = transaction .executeQuery (Statement .of (select_sql ));
1580
+ ResultSet resultSet = transaction .executeQuery (Statement .of (selectSql ));
1581
1581
String title = null ;
1582
1582
while (resultSet .next ()) {
1583
1583
title = resultSet .getString ("AlbumTitle" );
1584
1584
}
1585
1585
System .out .printf ("Current album title: %s\n " , title );
1586
1586
1587
1587
// Update the title.
1588
- String update_sql =
1588
+ String updateSql =
1589
1589
"UPDATE Albums "
1590
1590
+ "SET AlbumTitle = 'New Album Title' "
1591
1591
+ "WHERE SingerId = 1 and AlbumId = 1" ;
1592
- long rowCount = transaction .executeUpdate (Statement .of (update_sql ));
1592
+ long rowCount = transaction .executeUpdate (Statement .of (updateSql ));
1593
1593
System .out .printf ("%d record updated.\n " , rowCount );
1594
1594
return null ;
1595
1595
});
You can’t perform that action at this time.
0 commit comments