1// Copyright Materialize, Inc. and contributors. All rights reserved.
2//
3// Use of this software is governed by the Business Source License
4// included in the LICENSE file.
5//
6// As of the Change Date specified in that file, in accordance with
7// the Business Source License, use of this software will be governed
8// by the Apache License, Version 2.0.
910use mz_repr::adt::system::{Oid, RegClass, RegProc, RegType};
1112sqlfunc!(
13#[sqlname = "regclasstooid"]
14 #[preserves_uniqueness = true]
15 #[inverse = to_unary!(super::CastOidToRegClass)]
16fn cast_reg_class_to_oid(a: RegClass) -> Oid {
17 Oid(a.0)
18 }
19);
2021sqlfunc!(
22#[sqlname = "regproctooid"]
23 #[preserves_uniqueness = true]
24 #[inverse = to_unary!(super::CastOidToRegProc)]
25fn cast_reg_proc_to_oid(a: RegProc) -> Oid {
26 Oid(a.0)
27 }
28);
2930sqlfunc!(
31#[sqlname = "regtypetooid"]
32 #[preserves_uniqueness = true]
33 #[inverse = to_unary!(super::CastOidToRegType)]
34fn cast_reg_type_to_oid(a: RegType) -> Oid {
35 Oid(a.0)
36 }
37);