Skip to content

Commit

Permalink
refactor: postgres protocol names
Browse files Browse the repository at this point in the history
  • Loading branch information
aljazerzen committed Feb 19, 2024
1 parent 3277b89 commit 25b3bc9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ Similar to [ADBC](https://arrow.apache.org/docs/format/ADBC.html), but written i
| Query | x | x | x |
| Query params | | | |
| Streaming | | | x |
| Temporal types | | | |
| Container types | | | |
| Temporal types | | x | |
| Container types | | x | |
| Schema get | x | x | |
| Schema edit | x | x | |
| Append | x | x | |
Expand Down
4 changes: 2 additions & 2 deletions connector_arrow/src/postgres/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
//! let stmt = conn.query("SELECT * FROM my_table").unwrap();
//! ````
mod protocol_cursor;
mod protocol_extended;
mod protocol_simple;
mod types;

Expand All @@ -36,7 +36,7 @@ impl<'a, P> PostgresConnection<'a, P> {
}

/// Protocol - use Cursor
pub struct ProtocolCursor;
pub struct ProtocolExtended;

/// Protocol - use Simple Query
pub struct ProtocolSimple;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ use crate::util::transport;
use crate::util::{ArrowRowWriter, CellReader};
use crate::{errors::ConnectorError, util::RowsReader};

use super::{types, PostgresError, PostgresStatement, ProtocolCursor};
use super::{types, PostgresError, PostgresStatement, ProtocolExtended};

impl<'conn> Statement<'conn> for PostgresStatement<'conn, ProtocolCursor> {
impl<'conn> Statement<'conn> for PostgresStatement<'conn, ProtocolExtended> {
type Params = ();

type Reader<'stmt> = PostgresBatchStream<'stmt> where Self: 'stmt;
Expand Down
4 changes: 2 additions & 2 deletions connector_arrow/tests/it/test_postgres.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use arrow::util::pretty::pretty_format_batches;
use connector_arrow::postgres::{PostgresConnection, ProtocolCursor, ProtocolSimple};
use connector_arrow::postgres::{PostgresConnection, ProtocolExtended, ProtocolSimple};
use insta::assert_display_snapshot;
use postgres::{Client, NoTls};

Expand Down Expand Up @@ -37,7 +37,7 @@ fn test_protocol_simple() {
#[test]
fn test_protocol_cursor() {
let mut conn = init();
let mut conn = PostgresConnection::<ProtocolCursor>::new(&mut conn);
let mut conn = PostgresConnection::<ProtocolExtended>::new(&mut conn);

let query = "select * from test_table";
let results = connector_arrow::query_one(&mut conn, query).unwrap();
Expand Down

0 comments on commit 25b3bc9

Please sign in to comment.