Lightweight 0.20260303.0
Loading...
Searching...
No Matches
Lightweight::SqlGuid Struct Reference

#include <SqlGuid.hpp>

Public Member Functions

constexpr std::weak_ordering operator<=> (SqlGuid const &other) const noexcept=default
 Three-way comparison operator.
 
constexpr bool operator== (SqlGuid const &other) const noexcept
 Equality comparison operator.
 
constexpr bool operator!= (SqlGuid const &other) const noexcept
 Inequality comparison operator.
 
constexpr operator bool () const noexcept
 Tests if the GUID is non-empty.
 
constexpr bool operator! () const noexcept
 Tests if the GUID is empty.
 

Static Public Member Functions

static SqlGuid Create () noexcept
 Creates a new non-empty GUID.
 
static std::optional< SqlGuidTryParse (std::string_view const &text) noexcept
 Parses a GUID from a string.
 
static SqlGuid constexpr UnsafeParse (std::string_view const &text) noexcept
 Parses a GUID from a string. Use with caution and always prefer TryParse at all cost.
 

Public Attributes

uint8_t data [16] {}
 The raw GUID data bytes.
 

Detailed Description

Represents a GUID (Globally Unique Identifier).

Definition at line 19 of file SqlGuid.hpp.

Member Function Documentation

◆ UnsafeParse()

constexpr SqlGuid Lightweight::SqlGuid::UnsafeParse ( std::string_view const &  text)
staticconstexprnoexcept

Parses a GUID from a string. Use with caution and always prefer TryParse at all cost.

Definition at line 61 of file SqlGuid.hpp.

◆ operator==()

constexpr bool Lightweight::SqlGuid::operator== ( SqlGuid const &  other) const
inlineconstexprnoexcept

Equality comparison operator.

Definition at line 37 of file SqlGuid.hpp.

◆ operator!=()

constexpr bool Lightweight::SqlGuid::operator!= ( SqlGuid const &  other) const
inlineconstexprnoexcept

Inequality comparison operator.

Definition at line 43 of file SqlGuid.hpp.

◆ operator bool()

constexpr Lightweight::SqlGuid::operator bool ( ) const
inlineexplicitconstexprnoexcept

Tests if the GUID is non-empty.

Definition at line 49 of file SqlGuid.hpp.

◆ operator!()

constexpr bool Lightweight::SqlGuid::operator! ( ) const
inlineconstexprnoexcept

Tests if the GUID is empty.

Definition at line 55 of file SqlGuid.hpp.

Member Data Documentation

◆ data

uint8_t Lightweight::SqlGuid::data[16] {}

The raw GUID data bytes.

Definition at line 22 of file SqlGuid.hpp.


The documentation for this struct was generated from the following file: