Skip to main content

faucet_sink_oracle/
lib.rs

1#![cfg_attr(docsrs, feature(doc_cfg))]
2
3//! # faucet-sink-oracle
4//!
5//! Oracle Database sink for the
6//! [`faucet-stream`](https://crates.io/crates/faucet-stream) ecosystem, built on
7//! the [`oracle`](https://crates.io/crates/oracle) driver (ODPI-C).
8//!
9//! Writes pages with array DML (one round trip per `batch_size` rows), supports
10//! `write_mode: upsert | delete` via `MERGE`, atomic `overwrite` through a
11//! staging table, exactly-once delivery via a `_faucet_commit_token` watermark
12//! committed in the same transaction as the data, schema-drift evolution and
13//! table auto-creation. Per-row rejections are reported for DLQ routing.
14//!
15//! **Runtime requirement:** Oracle Instant Client must be installed where
16//! ODPI-C can load it.
17//!
18//! ```no_run
19//! # use faucet_sink_oracle::{OracleConnectionConfig, OracleSink, OracleSinkConfig};
20//! # async fn run() -> Result<(), faucet_core::FaucetError> {
21//! let conn = OracleConnectionConfig::new("localhost", 1521, "FREEPDB1", "app", "secret");
22//! let sink = OracleSink::new(OracleSinkConfig::new(conn, "EVENTS")).await?;
23//! # let _ = sink;
24//! # Ok(())
25//! # }
26//! ```
27
28mod config;
29mod descriptor;
30mod plan;
31mod sink;
32
33pub use config::{IdentifierCase, OnUnknownField, OracleColumnMapping, OracleSinkConfig};
34pub use descriptor::DESCRIPTOR;
35pub use faucet_common_oracle::{OracleConnectionConfig, OracleTls};
36pub use sink::OracleSink;