【问题标题】:How to insert UUID in Tarantool using go-tarantool?如何使用 go-tarantool 在 Tarantool 中插入 UUID?
【发布时间】:2020-06-17 19:53:18
【问题描述】:

Tarantool 现在有一个内置类型 UUID。
如何使用https://github.com/tarantool/go-tarantool插入记录并传递该字段?

现在我有这个:

Tuple field 1 type does not match one required by operation: expected uuid (0x17)

尝试将 UUID 作为字符串插入时

"github.com/satori/go.uuid"

...

var (
    Tarantool *tarantool.Connection
)

...

Tarantool.Insert("log", []interface{}{
        uuid.NewV4().String(),
...

索引:

index:
    0: &0
      unique: true
      parts:
      - type: uuid
        is_nullable: false
        fieldno: 1
      id: 0
      space_id: 513
      type: HASH
      name: primary
    primary: *0

【问题讨论】:

    标签: tarantool


    【解决方案1】:

    这是一个新功能,官方 go 驱动程序不支持。您可以跟踪实施进度并公开讨论here

    【讨论】:

      猜你喜欢
      • 2018-09-30
      • 2020-09-16
      • 2020-10-13
      • 1970-01-01
      • 1970-01-01
      • 2016-07-13
      • 2023-03-31
      • 2018-03-02
      • 2021-01-31
      相关资源
      最近更新 更多