Skip to main content

reinhardt_query/value/
array.rs

1//! Array type definitions.
2
3/// Represents the element type of an array value.
4///
5/// This enum is used to track the type of elements in a SQL array,
6/// which is important for proper SQL generation in backends that
7/// support typed arrays (e.g., PostgreSQL).
8#[derive(Clone, Debug, PartialEq, Eq, Hash)]
9pub enum ArrayType {
10	/// Boolean array
11	Bool,
12	/// 8-bit signed integer array
13	TinyInt,
14	/// 16-bit signed integer array
15	SmallInt,
16	/// 32-bit signed integer array
17	Int,
18	/// 64-bit signed integer array
19	BigInt,
20	/// 8-bit unsigned integer array
21	TinyUnsigned,
22	/// 16-bit unsigned integer array
23	SmallUnsigned,
24	/// 32-bit unsigned integer array
25	Unsigned,
26	/// 64-bit unsigned integer array
27	BigUnsigned,
28	/// 32-bit floating point array
29	Float,
30	/// 64-bit floating point array
31	Double,
32	/// String array
33	String,
34	/// Character array
35	Char,
36	/// Binary data array
37	Bytes,
38
39	/// Chrono date array
40	#[cfg(feature = "with-chrono")]
41	ChronoDate,
42	/// Chrono time array
43	#[cfg(feature = "with-chrono")]
44	ChronoTime,
45	/// Chrono datetime array (naive)
46	#[cfg(feature = "with-chrono")]
47	ChronoDateTime,
48	/// Chrono datetime array (UTC)
49	#[cfg(feature = "with-chrono")]
50	ChronoDateTimeUtc,
51	/// Chrono datetime array (Local)
52	#[cfg(feature = "with-chrono")]
53	ChronoDateTimeLocal,
54	/// Chrono datetime array (with timezone)
55	#[cfg(feature = "with-chrono")]
56	ChronoDateTimeWithTimeZone,
57
58	/// UUID array
59	#[cfg(feature = "with-uuid")]
60	Uuid,
61
62	/// JSON array
63	#[cfg(feature = "with-json")]
64	Json,
65
66	/// Rust Decimal array
67	#[cfg(feature = "with-rust_decimal")]
68	Decimal,
69
70	/// BigDecimal array
71	#[cfg(feature = "with-bigdecimal")]
72	BigDecimal,
73}