Skip to content

TParamsBuilder::AddParam() for scalar types #544

@georgthegreat

Description

@georgthegreat

At the time YDB C++ SDK requires the following syntax to for building (indentation mine):

params
        .AddParam("$a")
        .Uint64(4)
    .Build()
        .AddParam("$b")
        .Utf8("Hello, World!")
    .Build()
;

There is an alternative available which looks like this:

params.AddParam("$id", NYdb::TValueBuilder().Utf8(id).Build());

Both require verbose wording.
Maybe is it possible to invent a more compact alternative using modern C++ syntax, i. e.:

params
    .AddParam("$a", 4ull)
    .AddParam("$b", "Hello, World!)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions