feldera_types/transport/postgres.rs
1use serde::{Deserialize, Serialize};
2use utoipa::ToSchema;
3
4/// Postgres input connector configuration.
5#[derive(Debug, Clone, Eq, PartialEq, Deserialize, Serialize, ToSchema)]
6pub struct PostgresReaderConfig {
7 /// Postgres URI.
8 /// See: <https://docs.rs/tokio-postgres/0.7.12/tokio_postgres/config/struct.Config.html>
9 pub uri: String,
10
11 /// Query that specifies what data to fetch from postgres.
12 pub query: String,
13}
14
15/// Postgres output connector configuration.
16#[derive(Debug, Clone, Eq, PartialEq, Deserialize, Serialize, ToSchema)]
17pub struct PostgresWriterConfig {
18 /// Postgres URI.
19 /// See: <https://docs.rs/tokio-postgres/0.7.12/tokio_postgres/config/struct.Config.html>
20 pub uri: String,
21
22 /// The table to write the output to.
23 pub table: String,
24}