Skip to content

Commit a9252d0

Browse files
authored
Merge pull request #7 from palfrey/no-results-without-query
No results without query
2 parents 1caa467 + 7b6d525 commit a9252d0

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ Database support
3030
Development
3131
-----------
3232
To test the Postgres/ODBC support do the following (on OS X):
33-
1. `docker run -P -d postgres` to get a PostgreSQL server running
33+
1. `docker run -P -d postgres:12.1` to get a PostgreSQL server running
3434
2. `brew install psqlodbc sqliteodbc`
3535
3. ``POSTGRES_SERVER=localhost POSTGRES_PORT=32768 POSTGRES_USERNAME=postgres POSTGRES_PASSWORD= RUST_BACKTRACE=1 POSTGRES_DRIVER=`brew --prefix psqlodbc`/lib/psqlodbca.so SQLITE_DRIVER=`brew --prefix sqliteodbc`/lib/libsqlite3odbc-0.9996.dylib cargo test -- --nocapture``

src/main.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@ fn main() {
3232
pg::connect(&opt)
3333
} {
3434
Ok(results) => {
35-
println!("Success {:?}", results);
35+
if opt.sql_query.is_none() {
36+
println!("Success");
37+
} else {
38+
println!("Success {:?}", results);
39+
}
3640
std::process::exit(exitcode::OK);
3741
}
3842
Err(dberror) => match dberror.kind {

0 commit comments

Comments
 (0)