Skip to content

Commit

Permalink
chore: add some comment for unfinished parts
Browse files Browse the repository at this point in the history
  • Loading branch information
sunng87 committed Dec 10, 2023
1 parent 3af6d1e commit 902b25e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions examples/proxy.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use std::sync::Arc;

use async_trait::async_trait;
use futures::{stream, StreamExt};
use tokio::net::TcpListener;
use tokio_postgres::{Client, NoTls, SimpleQueryMessage};

Expand Down Expand Up @@ -37,13 +36,18 @@ impl SimpleQueryHandler for ProxyProcessor {
Tag::new_for_execution("", Some(count as usize)),
));
} else {
downstream_response.push(Response::Query(row_buf));
// FIXME: convert SimpleQueryRows to
// QueryResponse: including schema and data
let query_response = row_buf.into();
downstream_response.push(Response::Query(query_response));
}
}
SimpleQueryMessage::Row(row) => {
// TODO: convert simple query row to Response::Query
// TODO: convert simple query row to pgwire data row
// and process the response when needed
row_buf.push(row);
}
_ => {}
}
}

Expand Down

0 comments on commit 902b25e

Please sign in to comment.