Sergey
Sergey

Reputation: 21201

How to insert UUID in Tarantool using go-tarantool?

Tarantool now has a built-in type UUID.
How to insert a record and pass this field using https://github.com/tarantool/go-tarantool?

For now I have this:

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

when trying to insert UUID as a string

"github.com/satori/go.uuid"

...

var (
    Tarantool *tarantool.Connection
)

...

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

Index:

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

Upvotes: 1

Views: 402

Answers (1)

Dmitry Sharonov
Dmitry Sharonov

Reputation: 481

it is a fresh feature that is not supported in official go driver. You may track implementation progress and open discussions here

Upvotes: 2

Related Questions