Expand description
§rivven-rdbc
Production-grade relational database connectivity for the Rivven event streaming platform.
This crate provides a unified interface for connecting to relational databases, with feature parity to Kafka Connect JDBC connector and Debezium’s relational support.
§Features
- Multi-Database Support: PostgreSQL, MySQL, SQL Server with unified API
- Connection Pooling: High-performance connection pooling with health checks
- SQL Dialect Abstraction: Vendor-agnostic SQL generation using sea-query
- Schema Discovery: Automatic schema introspection and metadata
- Table Source: Query-based CDC with incrementing/timestamp modes
- Table Sink: High-performance batch writes with upsert support
- Type Safety: Comprehensive value types matching Debezium’s type system
§Quick Start
ⓘ
use rivven_rdbc::prelude::*;
// Create a connection pool
let pool = PoolBuilder::new("postgres://user:pass@localhost/db")
.min_size(2)
.max_size(10)
.build();
// Use connection for queries
let conn = pool.get().await?;
let rows = conn.query("SELECT * FROM users WHERE id = $1", &[Value::Int32(1)]).await?;
// Configure a table source
let source = TableSourceConfig::incrementing("users", "id")
.with_schema("public")
.with_poll_interval(Duration::from_secs(1));
// Configure a table sink
let sink = TableSinkBuilder::new()
.batch_size(1000)
.write_mode(WriteMode::Upsert)
.auto_ddl(AutoDdlMode::Create)
.build();§Feature Flags
postgres- PostgreSQL support via tokio-postgresmysql- MySQL/MariaDB support via mysql_asyncsqlserver- SQL Server support via tiberiustls- TLS support for secure connectionsfull- All features enabled
Re-exports§
Modules§
- connection
- Connection traits for rivven-rdbc
- dialect
- SQL dialect abstraction for rivven-rdbc
- error
- Error types for rivven-rdbc
- mysql
- MySQL backend implementation for rivven-rdbc
- pool
- Connection pool abstraction for rivven-rdbc
- postgres
- PostgreSQL backend implementation for rivven-rdbc
- prelude
- Prelude module for convenient imports
- schema
- Schema discovery and management for rivven-rdbc
- security
- Security utilities for SQL injection prevention in rivven-rdbc.
- sink
- Table sink for writing data to databases
- source
- Table source for reading data from databases
- sqlserver
- SQL Server backend implementation for rivven-rdbc
- types
- Value types for rivven-rdbc