Skip to content

Commit e00a16e

Browse files
clflushoptalamb
andauthored
feat: Small documentation improvements (#116)
* feat: Small documentation improvements * Update tpchgen/src/lib.rs Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org> --------- Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
1 parent c9de3be commit e00a16e

File tree

2 files changed

+22
-6
lines changed

2 files changed

+22
-6
lines changed

tpchgen/src/csv.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! CSV Formatting for TPCH data
1+
//! CSV formatting support for the row struct objects generated by the library.
22
33
use crate::generators::{Customer, LineItem, Nation, Order, Part, PartSupp, Region, Supplier};
44
use core::fmt;

tpchgen/src/lib.rs

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
//! Rust TPCH Data Generator
22
//!
3-
//! This crate provides a Rust implementation of the TPC-H data generator.
3+
//! This crate provides a native Rust implementation of functions and utilities
4+
//! necessary for generating the TPC-H benchmark dataset in several popular
5+
//! formats.
46
//!
57
//! # Example: TBL output format
68
//! ```
@@ -25,16 +27,30 @@
2527
//! );
2628
//! ```
2729
//!
28-
//! Each generator produces a row struct (e.g. [`LineItem`]) that is designed
29-
//! to be efficiently converted to the output format (e.g. TBL CSV). This crate
30-
//! provides the following output formats:
30+
//! The TPC-H dataset is composed of several tables with foreign key relations
31+
//! between them. For each table we implement and expose a generator that uses
32+
//! the iterator API to produce structs e.g [`LineItem`] that represent a single
33+
//! row.
34+
//!
35+
//! For each struct type we expose several facilities that allow fast conversion
36+
//! to Tbl and Csv formats but can also be extended to support other output formats.
37+
//!
38+
//! This crate currently supports the following output formats:
3139
//!
3240
//! - TBL: The `Display` impl of the row structs produces the TPCH TBL format.
3341
//! - CSV: the [`csv`] module has formatters for CSV output (e.g. [`LineItemCsv`]).
3442
//!
3543
//! [`LineItem`]: generators::LineItem
3644
//! [`LineItemCsv`]: csv::LineItemCsv
37-
45+
//!
46+
//!
47+
//! The library was designed to be easily integrated in existing Rust projects as
48+
//! such it avoids exposing a malleable API and purposely does not have any dependencies
49+
//! on other Rust crates. It is focused entire on the core
50+
//! generation logic.
51+
//!
52+
//! If you want an easy way to generate the TPC-H dataset for usage with external
53+
//! systems you can use CLI tool instead.
3854
pub mod csv;
3955
pub mod dates;
4056
pub mod decimal;

0 commit comments

Comments
 (0)