Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 39 additions & 1 deletion crates/catalog/sql/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
//! Iceberg sql catalog implementation.
//!
//! To build a sql catalog with configurations
//! # Example
//! # Examples
//!
//! ## Generic
//!
//! ```rust, no_run
//! use std::collections::HashMap;
Expand Down Expand Up @@ -53,6 +55,42 @@
//! .unwrap();
//! }
//! ```
//!
//! ## Postgres
//!
//! ```rust, no_run
//! use std::collections::HashMap;
//!
//! use iceberg::CatalogBuilder;
//! use iceberg_catalog_sql::{
//! SQL_CATALOG_PROP_BIND_STYLE, SQL_CATALOG_PROP_URI, SQL_CATALOG_PROP_WAREHOUSE,
//! SqlBindStyle, SqlCatalogBuilder,
//! };
//!
//! #[tokio::main]
//! async fn main() {
//! let _catalog = SqlCatalogBuilder::default()
//! .load(
//! "postgres",
//! HashMap::from_iter([
//! (
//! SQL_CATALOG_PROP_URI.to_string(),
//! "postgres://iceberg:playground@localhost:5432".to_string(),
//! ),
//! (
//! SQL_CATALOG_PROP_WAREHOUSE.to_string(),
//! "s3://localhost:9000".to_string(),
//! ),
//! (
//! SQL_CATALOG_PROP_BIND_STYLE.to_string(),
//! SqlBindStyle::DollarNumeric.to_string(),
//! ),
//! ]),
//! )
//! .await
//! .unwrap();
//! }
//! ```

#![deny(missing_docs)]

Expand Down
Loading