Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion connectorx/src/sources/mysql/typesystem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ pub enum MySQLTypeSystem {
MediumBlob(bool),
LongBlob(bool),
Json(bool),
Bit(bool)
}

impl_typesystem! {
Expand All @@ -51,7 +52,7 @@ impl_typesystem! {
{ Time => NaiveTime }
{ Decimal => Decimal }
{ Char | VarChar | Enum => String }
{ TinyBlob | Blob | MediumBlob | LongBlob => Vec<u8>}
{ TinyBlob | Blob | MediumBlob | LongBlob | Bit => Vec<u8>}
{ Json => Value }
}
}
Expand Down Expand Up @@ -116,6 +117,7 @@ impl<'a> From<(&'a ColumnType, &'a ColumnFlags)> for MySQLTypeSystem {
ColumnType::MYSQL_TYPE_LONG_BLOB => LongBlob(null_ok),
ColumnType::MYSQL_TYPE_JSON => Json(null_ok),
ColumnType::MYSQL_TYPE_VARCHAR => VarChar(null_ok),
ColumnType::MYSQL_TYPE_BIT => Bit(null_ok),
_ => unimplemented!("{}", format!("{:?}", ty)),
}
}
Expand Down
1 change: 1 addition & 0 deletions connectorx/src/transports/mysql_arrow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ impl_transport!(
{ MediumBlob[Vec<u8>] => LargeBinary[Vec<u8>] | conversion none }
{ LongBlob[Vec<u8>] => LargeBinary[Vec<u8>] | conversion none }
{ Json[Value] => LargeUtf8[String] | conversion option }
{ Bit[Vec<u8>] => LargeBinary[Vec<u8>] | conversion none }
}
);

Expand Down