mz_repr/adt/system.rs
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.
9
10//! System data types.
11
12use proptest_derive::Arbitrary;
13use serde::{Deserialize, Serialize};
14
15/// A Rust type representing a PostgreSQL "char".
16#[derive(Debug, Clone, Copy, Eq, PartialEq, Ord, PartialOrd, Hash)]
17pub struct PgLegacyChar(pub u8);
18
19/// A Rust type representing a PostgreSQL object identifier (OID).
20#[derive(
21 Debug, Clone, Copy, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, Arbitrary,
22)]
23pub struct Oid(pub u32);
24
25/// A Rust type representing the OID of a PostgreSQL class.
26#[derive(Debug, Clone, Copy, Eq, PartialEq, Ord, PartialOrd, Hash)]
27pub struct RegClass(pub u32);
28
29/// A Rust type representing the OID of a PostgreSQL function name.
30#[derive(Debug, Clone, Copy, Eq, PartialEq, Ord, PartialOrd, Hash)]
31pub struct RegProc(pub u32);
32
33/// A Rust type representing the OID of a PostgreSQL type.
34#[derive(Debug, Clone, Copy, Eq, PartialEq, Ord, PartialOrd, Hash)]
35pub struct RegType(pub u32);