@@ -3545,41 +3545,51 @@ def add_split_points(instance_id, database_id):
35453545 table = "Singers" ,
35463546 keys = [
35473547 spanner_database_admin .SplitPoints .Key (
3548- key_parts = struct_pb2 .ListValue ().values .add (struct_pb2 .Value (string_value = "42" ))
3548+ key_parts = struct_pb2 .ListValue (
3549+ values = [struct_pb2 .Value (string_value = "42" )]
3550+ )
35493551 )
3550- ]
3552+ ],
35513553 ),
35523554 spanner_database_admin .SplitPoints (
35533555 index = "SingersByFirstLastName" ,
35543556 keys = [
35553557 spanner_database_admin .SplitPoints .Key (
3556- key_parts = struct_pb2 .ListValue ().values .extend ([
3557- struct_pb2 .Value (string_value = "John" ),
3558- struct_pb2 .Value (string_value = "Doe" )
3559- ])
3558+ key_parts = struct_pb2 .ListValue (
3559+ values = [
3560+ struct_pb2 .Value (string_value = "John" ),
3561+ struct_pb2 .Value (string_value = "Doe" ),
3562+ ]
3563+ )
35603564 )
3561- ]
3565+ ],
35623566 ),
35633567 spanner_database_admin .SplitPoints (
35643568 index = "SingersByFirstLastName" ,
35653569 keys = [
35663570 spanner_database_admin .SplitPoints .Key (
3567- key_parts = struct_pb2 .ListValue ().values .add (struct_pb2 .Value (string_value = "38" ))
3571+ key_parts = struct_pb2 .ListValue (
3572+ values = [struct_pb2 .Value (string_value = "38" )]
3573+ )
35683574 ),
35693575 spanner_database_admin .SplitPoints .Key (
3570- key_parts = struct_pb2 .ListValue ().values .extend ([
3571- struct_pb2 .Value (string_value = "Jane" ),
3572- struct_pb2 .Value (string_value = "Doe" )
3573- ])
3574- )
3575- ]
3576- )
3577- ]
3576+ key_parts = struct_pb2 .ListValue (
3577+ values = [
3578+ struct_pb2 .Value (string_value = "Jane" ),
3579+ struct_pb2 .Value (string_value = "Doe" ),
3580+ ]
3581+ )
3582+ ),
3583+ ],
3584+ ),
3585+ ],
35783586 )
35793587
35803588 operation = database_admin_api .add_split_points (addSplitPointRequest )
35813589
35823590 print ("Added split points." )
3591+
3592+
35833593# [END spanner_database_add_split_points]
35843594
35853595
0 commit comments