Skip to content

Struct #1059

@asmyasnikov

Description

@asmyasnikov

Next code must be worked:

params := ydb.ParamsBuilder().Param("$param").Struct().
     Field("col1").Text("text").
     Field("col2").Uint32(123).
     Field("col3").Int64(456).
     Build().
     Build()

Variable params can be used in

err := db.Table().Do(ctx, func(ctx, s) error) {
    res, tx, err := s.Execute(ctx, txControl, `
        -- DECLARE $param AS Struct<col1:Text,col2:Uin32,col3:Int64>;
        SELECT $param;
    `, params)
    . . .
})

See ydb.Builder().Param("$name").List() as example

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions