Class Struct (7.5.0)

Struct

Inheritance

Array<Field> >Struct

Package

@google-cloud/spanner

Methods

fromArray(fields)

staticfromArray(fields:Field[]):Struct;

Converts an array of fields to a struct.

Parameter
NameDescription
fieldsField[]

List of struct fields. {Struct}

Returns
TypeDescription
Struct

fromJSON(json)

staticfromJSON(json:Json):Struct;

Converts a JSON object to a struct.

Parameter
NameDescription
jsonJson

Struct JSON. {Struct}

Returns
TypeDescription
Struct

toJSON(options)

toJSON(options?:JSONOptions):Json;

Converts struct into a pojo (plain old JavaScript object).

Parameter
NameDescription
optionsJSONOptions

JSON options.

Returns
TypeDescription
Json

{object}

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-10-30 UTC.