#![expect(
refining_impl_trait,
reason = "Some of the Row::iter() implementations returns ExactSizeIterator. Is this reasonable?"
)]
#![feature(extract_if)]
#![feature(trait_alias)]
#![feature(type_alias_impl_trait)]
#![feature(test)]
#![feature(trusted_len)]
#![feature(allocator_api)]
#![feature(coroutines)]
#![feature(map_try_insert)]
#![feature(error_generic_member_access)]
#![feature(let_chains)]
#![feature(portable_simd)]
#![feature(array_chunks)]
#![feature(inline_const_pat)]
#![allow(incomplete_features)]
#![feature(iterator_try_collect)]
#![feature(iter_order_by)]
#![feature(binary_heap_into_iter_sorted)]
#![feature(impl_trait_in_assoc_type)]
#![feature(negative_impls)]
#![feature(register_tool)]
#![feature(btree_cursors)]
#![register_tool(rw)]
#[cfg_attr(not(test), allow(unused_extern_crates))]
extern crate self as risingwave_common;
#[macro_use]
extern crate risingwave_error;
pub use risingwave_error::common::{
bail_no_function, bail_not_implemented, no_function, not_implemented,
};
pub use risingwave_error::macros::*;
#[macro_use]
pub mod jemalloc;
#[macro_use]
pub mod error;
#[macro_use]
pub mod array;
#[macro_use]
pub mod util;
pub mod acl;
pub mod bitmap;
pub mod cache;
pub mod cast;
pub mod catalog;
pub mod config;
pub mod constants;
pub mod field_generator;
pub mod hash;
pub mod log;
pub mod memory;
pub use risingwave_common_metrics::{
monitor, register_guarded_gauge_vec_with_registry,
register_guarded_histogram_vec_with_registry, register_guarded_int_counter_vec_with_registry,
register_guarded_int_gauge_vec_with_registry, register_guarded_uint_gauge_vec_with_registry,
};
pub use {
risingwave_common_metrics as metrics, risingwave_common_secret as secret,
risingwave_license as license,
};
pub mod lru;
pub mod opts;
pub mod range;
pub mod row;
pub mod sequence;
pub mod session_config;
pub mod system_param;
pub mod telemetry;
pub mod test_utils;
pub mod transaction;
pub mod types;
pub mod vnode_mapping;
pub mod test_prelude {
pub use super::array::{DataChunkTestExt, StreamChunkTestExt};
pub use super::catalog::test_utils::ColumnDescTestExt;
}
pub const RW_VERSION: &str = env!("CARGO_PKG_VERSION");
pub const UNKNOWN_GIT_SHA: &str = "unknown";
pub const PG_VERSION: &str = "13.14.0";
pub const SERVER_VERSION_NUM: i32 = 130014;
pub const SERVER_ENCODING: &str = "UTF8";
pub const STANDARD_CONFORMING_STRINGS: &str = "on";
#[macro_export]
macro_rules! git_sha {
($env:literal) => {
match option_env!($env) {
Some(v) if !v.is_empty() => v,
_ => $crate::UNKNOWN_GIT_SHA,
}
};
}
pub const GIT_SHA: &str = git_sha!("GIT_SHA");
pub fn current_cluster_version() -> String {
format!(
"PostgreSQL {}-RisingWave-{} ({})",
PG_VERSION, RW_VERSION, GIT_SHA
)
}