Class Struct (6.11.0)

Struct

Inheritance

Array<Field> > Struct

Package

@google-cloud/spanner

Methods

fromArray(fields)

static fromArray(fields: Field[]): Struct;

Converts an array of fields to a struct.

Parameter
NameDescription
fields Field[]

List of struct fields. {Struct}

Returns
TypeDescription
Struct

fromJSON(json)

static fromJSON(json: Json): Struct;

Converts a JSON object to a struct.

Parameter
NameDescription
json Json

Struct JSON. {Struct}

Returns
TypeDescription
Struct

toJSON(options)

toJSON(options?: JSONOptions): Json;

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

Parameter
NameDescription
options JSONOptions

JSON options.

Returns
TypeDescription
Json

{object}