Skip to content

[2pt] uuid comparison rules #1681

Open
Open
@TarantoolBot

Description

@TarantoolBot

uuid comparison rules

Product: Tarantool
Since: 2.7.1
Audience/target: Lua devs
Root document:
SME: @olegrok
Peer reviewer: @ documentarian name

Details

Currently comparison between uuid values is supported.

Example:

u1 = uuid.fromstr('aaaaaaaa-aaaa-4000-b000-000000000001')
u2 = uuid.fromstr('bbbbbbbb-bbbb-4000-b000-000000000001')

u1 > u2  -- false
u1 >= u2 -- false
u1 <= u2 -- true
u1 < u2  -- true

Also it's possible to compare uuid values with its string
representations:

u1_str = 'aaaaaaaa-aaaa-4000-b000-000000000001'
u1 = uuid.fromstr(u1_str)
u2_str = 'bbbbbbbb-bbbb-4000-b000-000000000001'

u1 == u1_str -- true
u1 == u2_str -- false

u1 >= u1_str -- true
u1 < u2_str  -- true

Requested by @olegrok in tarantool/tarantool@e27745a.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureA new functionalityreference[location] Tarantool manual, Reference partserver[area] Task relates to Tarantool's server (core) functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions