mirror of
https://github.com/fluencelabs/sqlite-wasm-connector
synced 2025-04-25 08:42:14 +00:00
Rename Blob to Binary
This commit is contained in:
parent
d6a8437c51
commit
e8768b2b7e
@ -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).
|
||||||
|
@ -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,
|
||||||
|
@ -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]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user