Class Struct.Builder

java.lang.Object
com.google.cloud.spanner.Struct.Builder
Enclosing class:
Struct

public static final class Struct.Builder extends Object
Builder for constructing non-NULL Struct instances.
  • Method Details

    • set

      public ValueBinder<Struct.Builder> set(String fieldName)
      Returns a binder to set the value of a new field in the struct named fieldName.
      Parameters:
      fieldName - name of the field to set. Can be empty or the same as an existing field name in the STRUCT
    • add

      public Struct.Builder add(Value value)
      Adds a new unnamed field fieldName with the given value.
    • build

      public Struct build()