Rename Blob to Binary

This commit is contained in:
Ivan Ukhov 2015-08-01 17:51:43 -04:00
parent d6a8437c51
commit e8768b2b7e
3 changed files with 3 additions and 3 deletions

View File

@ -116,7 +116,7 @@ pub type Result<T> = std::result::Result<T, Error>;
#[derive(Clone, Copy, Debug, Eq, PartialEq)] #[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum Type { pub enum Type {
/// The binary type. /// The binary type.
Blob, Binary,
/// The floating-point type (64-bit). /// The floating-point type (64-bit).
Float, Float,
/// The integer type (64-bit, signed). /// The integer type (64-bit, signed).

View File

@ -48,7 +48,7 @@ impl<'l> Statement<'l> {
#[inline] #[inline]
pub fn kind(&self, i: usize) -> Type { pub fn kind(&self, i: usize) -> Type {
match unsafe { ffi::sqlite3_column_type(self.raw.0, i as c_int) } { match unsafe { ffi::sqlite3_column_type(self.raw.0, i as c_int) } {
ffi::SQLITE_BLOB => Type::Blob, ffi::SQLITE_BLOB => Type::Binary,
ffi::SQLITE_FLOAT => Type::Float, ffi::SQLITE_FLOAT => Type::Float,
ffi::SQLITE_INTEGER => Type::Integer, ffi::SQLITE_INTEGER => Type::Integer,
ffi::SQLITE_NULL => Type::Null, ffi::SQLITE_NULL => Type::Null,

View File

@ -98,7 +98,7 @@ fn statement_kind() {
assert_eq!(statement.kind(0), Type::Integer); assert_eq!(statement.kind(0), Type::Integer);
assert_eq!(statement.kind(1), Type::String); assert_eq!(statement.kind(1), Type::String);
assert_eq!(statement.kind(2), Type::Float); assert_eq!(statement.kind(2), Type::Float);
assert_eq!(statement.kind(3), Type::Blob); assert_eq!(statement.kind(3), Type::Binary);
} }
#[test] #[test]