mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-28 10:41:12 +00:00
32 lines
578 B
C++
32 lines
578 B
C++
/*
|
|
* Modified by ScyllaDB
|
|
*
|
|
* Copyright (C) 2015-present ScyllaDB
|
|
*/
|
|
|
|
/*
|
|
* SPDX-License-Identifier: (LicenseRef-ScyllaDB-Source-Available-1.1 and Apache-2.0)
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "types/types.hh"
|
|
#include "native_scalar_function.hh"
|
|
#include "utils/UUID.hh"
|
|
|
|
namespace cql3 {
|
|
|
|
namespace functions {
|
|
|
|
inline
|
|
shared_ptr<function>
|
|
make_uuid_fct() {
|
|
return make_native_scalar_function<false>("uuid", uuid_type, {},
|
|
[] (std::span<const bytes_opt> parameters) -> bytes_opt {
|
|
return {uuid_type->decompose(utils::make_random_uuid())};
|
|
});
|
|
}
|
|
|
|
}
|
|
}
|