2013-07-25 07:10:18 +00:00
|
|
|
extern mod postgres;
|
|
|
|
|
2013-08-22 05:52:15 +00:00
|
|
|
use postgres::PostgresConnection;
|
2013-08-18 03:30:31 +00:00
|
|
|
|
2013-08-04 05:21:16 +00:00
|
|
|
#[test]
|
2013-08-22 05:52:15 +00:00
|
|
|
fn test_connect() {
|
|
|
|
let conn = PostgresConnection::connect("postgres://127.0.0.1:54322",
|
|
|
|
"postgres");
|
2013-08-18 02:42:12 +00:00
|
|
|
|
2013-08-22 06:41:26 +00:00
|
|
|
let stmt = conn.prepare("CREATE TABLE foo (id BIGINT PRIMARY KEY)");
|
2013-08-22 07:12:35 +00:00
|
|
|
stmt.query();
|
2013-08-18 02:42:12 +00:00
|
|
|
}
|