Documentation
¶
Overview ¶
Package with support of Tarantool's UUID data type.
UUID data type supported in Tarantool since 2.4.1.
Since: 1.6.0.
See also ¶
* Tarantool commit with UUID support https://github.com/tarantool/tarantool/commit/d68fc29246714eee505bc9bbcd84a02de17972c5
* Tarantool data model https://www.tarantool.io/en/doc/latest/book/box/data_model/
* Module UUID https://www.tarantool.io/en/doc/latest/reference/reference_lua/uuid/
Example ¶
Example demonstrates how to use tuples with UUID. To enable UUID support in msgpack with google/uuid (https://github.com/google/uuid), import tarantool/uuid submodule.
opts := tarantool.Opts{
User: "test",
Pass: "test",
}
client, err := tarantool.Connect("127.0.0.1:3013", opts)
if err != nil {
log.Fatalf("Failed to connect: %s", err.Error())
}
spaceNo := uint32(524)
id, uuidErr := uuid.Parse("c8f0fa1f-da29-438c-a040-393f1126ad39")
if uuidErr != nil {
log.Fatalf("Failed to prepare uuid: %s", uuidErr)
}
resp, err := client.Replace(spaceNo, []interface{}{id})
fmt.Println("UUID tuple replace")
fmt.Println("Error", err)
fmt.Println("Code", resp.Code)
fmt.Println("Data", resp.Data)
Index ¶
Examples ¶
Constants ¶
View Source
const UUID_extId = 2
UUID external type.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.