ydb-platform / ydb-go-sdk

Pure Go native and database/sql driver for YDB
https://ydb.tech
Apache License 2.0
132 stars 69 forks source link

Support container types (Tuple, Dict, List, Set) produced from List #1273

Open asmyasnikov opened 3 weeks ago

asmyasnikov commented 3 weeks ago

List of lists:

listOfLists := ydb.ParamsBuilder().Param("$list").BeginList().
   Add().BeginList().
      Add().Uint64(1).
      Add().Uint64(2).
      Add().Uint64(3).
      Add().Uint64(4).
      EndList().
   EndList().
   Add().BeginList().
      Add().Uint64(5).
      Add().Uint64(6).
      Add().Uint64(7).
      Add().Uint64(8).
      EndList().
   EndList().
   Build()

List of dicts:

listOfDicts := ydb.ParamsBuilder().Param("$list").BeginList().
   Add().BeginDict().
      Add().Text("a").Uint64(1).
      Add().Text("b").Uint64(2).
      EndDict().
   Add().BeginDict().
      Add().Text("c").Uint64(3).
      Add().Text("d").Uint64(4).
      EndDict().
   EndList().
   Build()