Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dict #1060

Closed
Tracked by #1062
asmyasnikov opened this issue Feb 28, 2024 · 1 comment
Closed
Tracked by #1062

Dict #1060

asmyasnikov opened this issue Feb 28, 2024 · 1 comment
Labels
enhancement New feature or request student-projects

Comments

@asmyasnikov
Copy link
Member

asmyasnikov commented Feb 28, 2024

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

@asmyasnikov asmyasnikov added the enhancement New feature or request label Feb 28, 2024
@asmyasnikov asmyasnikov changed the title feat: implement ydb.Builder().Param("$name").Dict() Dict Feb 28, 2024
@size12
Copy link
Contributor

size12 commented Mar 7, 2024

i get into this task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request student-projects
Projects
None yet
Development

No branches or pull requests

2 participants