Update for upstream changes
This commit is contained in:
parent
61f9f43cf3
commit
4adf743aeb
2
configure
vendored
2
configure
vendored
@ -25,5 +25,3 @@ git submodule update --init
|
|||||||
sed -e "s|%PREFIX%|$PREFIX|" \
|
sed -e "s|%PREFIX%|$PREFIX|" \
|
||||||
-e "s|%CONFIGURE_ARGS%|$CONFIGURE_ARGS|" \
|
-e "s|%CONFIGURE_ARGS%|$CONFIGURE_ARGS|" \
|
||||||
< Makefile.in > Makefile
|
< Makefile.in > Makefile
|
||||||
|
|
||||||
touch config.stamp
|
|
||||||
|
24
src/lib.rs
24
src/lib.rs
@ -55,14 +55,14 @@ fn main() {
|
|||||||
```
|
```
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#[crate_id="github.com/sfackler/rust-postgres#postgres:0.0"];
|
#![crate_id="github.com/sfackler/rust-postgres#postgres:0.0"]
|
||||||
#[crate_type="rlib"];
|
#![crate_type="rlib"]
|
||||||
#[crate_type="dylib"];
|
#![crate_type="dylib"]
|
||||||
#[doc(html_root_url="http://www.rust-ci.org/sfackler/rust-postgres/doc")];
|
#![doc(html_root_url="http://www.rust-ci.org/sfackler/rust-postgres/doc")]
|
||||||
|
|
||||||
#[warn(missing_doc)];
|
#![warn(missing_doc)]
|
||||||
|
|
||||||
#[feature(macro_rules, struct_variant, phase)];
|
#![feature(macro_rules, struct_variant, phase)]
|
||||||
|
|
||||||
extern crate collections;
|
extern crate collections;
|
||||||
extern crate openssl;
|
extern crate openssl;
|
||||||
@ -386,7 +386,7 @@ impl Writer for InternalStream {
|
|||||||
struct InnerPostgresConnection {
|
struct InnerPostgresConnection {
|
||||||
stream: BufferedStream<InternalStream>,
|
stream: BufferedStream<InternalStream>,
|
||||||
next_stmt_id: uint,
|
next_stmt_id: uint,
|
||||||
notice_handler: ~PostgresNoticeHandler,
|
notice_handler: ~PostgresNoticeHandler:Send,
|
||||||
notifications: RingBuf<PostgresNotification>,
|
notifications: RingBuf<PostgresNotification>,
|
||||||
cancel_data: PostgresCancelData,
|
cancel_data: PostgresCancelData,
|
||||||
unknown_types: HashMap<Oid, ~str>,
|
unknown_types: HashMap<Oid, ~str>,
|
||||||
@ -436,7 +436,7 @@ impl InnerPostgresConnection {
|
|||||||
let mut conn = InnerPostgresConnection {
|
let mut conn = InnerPostgresConnection {
|
||||||
stream: BufferedStream::new(stream),
|
stream: BufferedStream::new(stream),
|
||||||
next_stmt_id: 0,
|
next_stmt_id: 0,
|
||||||
notice_handler: ~DefaultNoticeHandler as ~PostgresNoticeHandler,
|
notice_handler: ~DefaultNoticeHandler,
|
||||||
notifications: RingBuf::new(),
|
notifications: RingBuf::new(),
|
||||||
cancel_data: PostgresCancelData { process_id: 0, secret_key: 0 },
|
cancel_data: PostgresCancelData { process_id: 0, secret_key: 0 },
|
||||||
unknown_types: HashMap::new(),
|
unknown_types: HashMap::new(),
|
||||||
@ -551,8 +551,8 @@ impl InnerPostgresConnection {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set_notice_handler(&mut self, handler: ~PostgresNoticeHandler)
|
fn set_notice_handler(&mut self, handler: ~PostgresNoticeHandler:Send)
|
||||||
-> ~PostgresNoticeHandler {
|
-> ~PostgresNoticeHandler:Send {
|
||||||
mem::replace(&mut self.notice_handler, handler)
|
mem::replace(&mut self.notice_handler, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -728,8 +728,8 @@ impl PostgresConnection {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Sets the notice handler for the connection, returning the old handler.
|
/// Sets the notice handler for the connection, returning the old handler.
|
||||||
pub fn set_notice_handler(&self, handler: ~PostgresNoticeHandler)
|
pub fn set_notice_handler(&self, handler: ~PostgresNoticeHandler:Send)
|
||||||
-> ~PostgresNoticeHandler {
|
-> ~PostgresNoticeHandler:Send {
|
||||||
self.conn.borrow_mut().set_notice_handler(handler)
|
self.conn.borrow_mut().set_notice_handler(handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -769,7 +769,7 @@ fn test_custom_notice_handler() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let conn = or_fail!(PostgresConnection::connect("postgres://postgres@localhost?client_min_messages=NOTICE", &NoSsl));
|
let conn = or_fail!(PostgresConnection::connect("postgres://postgres@localhost?client_min_messages=NOTICE", &NoSsl));
|
||||||
conn.set_notice_handler(~Handler as ~PostgresNoticeHandler);
|
conn.set_notice_handler(~Handler);
|
||||||
or_fail!(conn.execute("CREATE FUNCTION pg_temp.note() RETURNS INT AS $$
|
or_fail!(conn.execute("CREATE FUNCTION pg_temp.note() RETURNS INT AS $$
|
||||||
BEGIN
|
BEGIN
|
||||||
RAISE NOTICE 'note';
|
RAISE NOTICE 'note';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
//! Traits dealing with Postgres data types
|
//! Traits dealing with Postgres data types
|
||||||
#[macro_escape];
|
#![macro_escape]
|
||||||
|
|
||||||
use collections::HashMap;
|
use collections::HashMap;
|
||||||
use uuid::Uuid;
|
use uuid::Uuid;
|
||||||
@ -73,12 +73,12 @@ static RANGE_LOWER_INCLUSIVE: i8 = 0b0000_0010;
|
|||||||
static RANGE_EMPTY: i8 = 0b0000_0001;
|
static RANGE_EMPTY: i8 = 0b0000_0001;
|
||||||
|
|
||||||
macro_rules! make_postgres_type(
|
macro_rules! make_postgres_type(
|
||||||
($($doc:attr $oid:ident => $variant:ident $(member $member:ident)*),+) => (
|
($(#[$doc:meta] $oid:ident => $variant:ident $(member $member:ident)*),+) => (
|
||||||
/// A Postgres type
|
/// A Postgres type
|
||||||
#[deriving(Eq, Clone, Show)]
|
#[deriving(Eq, Clone, Show)]
|
||||||
pub enum PostgresType {
|
pub enum PostgresType {
|
||||||
$(
|
$(
|
||||||
$doc
|
#[$doc]
|
||||||
$variant,
|
$variant,
|
||||||
)+
|
)+
|
||||||
/// An unknown type
|
/// An unknown type
|
||||||
@ -504,14 +504,6 @@ impl FromSql for HashMap<~str, Option<~str>> {
|
|||||||
ret.map(|ok| ok.unwrap())
|
ret.map(|ok| ok.unwrap())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
macro_rules! or_fail(
|
|
||||||
($e:expr) => (
|
|
||||||
match $e {
|
|
||||||
Ok(ok) => ok,
|
|
||||||
Err(err) => fail!("{}", err)
|
|
||||||
}
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
/// A trait for types that can be converted into Postgres values
|
/// A trait for types that can be converted into Postgres values
|
||||||
pub trait ToSql {
|
pub trait ToSql {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
//! Types dealing with ranges of values
|
//! Types dealing with ranges of values
|
||||||
#[macro_escape];
|
#![macro_escape]
|
||||||
|
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::i32;
|
use std::i32;
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 761901d0e409304450a49d784bae989d125c68b2
|
Subproject commit bf2dadd7fba702c9706a457523e049d36ed8f10b
|
@ -1 +1 @@
|
|||||||
Subproject commit 84aa16d16bdccaafd4246cd00fc92533c00c7551
|
Subproject commit ab0ea8271d87768519ef066f80f2d7981c558a17
|
Loading…
Reference in New Issue
Block a user