Skip to main content

rudb_functions/
lib.rs

1//! The scalar, aggregate and window function library.
2//!
3//! Rank 7 in the layer rule. See `xtask/layers.toml` and `spec/18-package-layout.md`.
4//!
5//! Most of what is here is the signature half: given a name and the types of the arguments, which
6//! function is that and what does it return. The implementations are separate work and they go
7//! behind the same names, so the binder does not change when they arrive.
8//!
9//! [`mod@file`] is the exception and it reads a file. A table function that scans a Parquet file cannot
10//! be resolved from a table of names, because its columns are in the file, so resolving one means
11//! opening it. That is the only I/O in this crate and it is the reason `rudb-io` and `rudb-parquet`
12//! are dependencies of it.
13
14#![forbid(unsafe_code)]
15
16pub mod entrycatalog;
17pub mod file;
18pub mod functioncatalog;
19pub mod settingcatalog;
20pub mod signature;
21pub mod table;
22pub mod typecatalog;
23
24pub use entrycatalog::{
25    DUCKDB, canonical, column_fields, database_fields, numeric_facts, schema_fields, table_fields,
26};
27pub use file::{
28    csv_fields, csv_given, files, is_file, is_pattern, open_csv, open_parquet, parquet_fields,
29};
30pub use functioncatalog::{
31    CONSISTENT, FUNCTION_CATALOG, FUNCTION_SCHEMA, FunctionEntry, function_entries, function_fields,
32};
33pub use rudb_csv::Given;
34pub use settingcatalog::{
35    GLOBAL, SETTINGS, SettingEntry, setting_fields, setting_named, unknown_setting,
36};
37pub use signature::{
38    FunctionKind, FunctionRow, Resolved, function_rows, kind_of, part_type, resolve,
39};
40pub use table::{
41    Columns, FILE_ROW_NUMBER, ResolvedTable, TableFunction, keyword_categories, keyword_fields,
42    resolve_table, series, series_length, strategy_fields,
43};
44pub use typecatalog::{
45    Signature, TYPE_NAMES, TypeEntry, representative, sort_key, type_category, type_fields,
46    type_oid, type_size,
47};