Skip to content

Dict #1060

@asmyasnikov

Description

@asmyasnikov

Next code must be worked:

params := ydb.ParamsBuilder().Param("$param").Dict().
     Pair().Text("key1").Uint32(1).
     Pair().Text("key2").Uint32(2).
     Pair().Text("key3").Uint32(3).
     Pair().Text("key4").Uint32(4).
     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 Dict<Text,Uin32>;
        SELECT $param;
    `, params)
    . . .
})

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions