Skip to content

Commit

Permalink
fix: translate {INT64, INT8, UINT64, UINT8}
Browse files Browse the repository at this point in the history
  • Loading branch information
ever0de committed Nov 18, 2023
1 parent c0c80f0 commit a70fdb5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion core/src/translate/data_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@ use {
pub fn translate_data_type(sql_data_type: &SqlDataType) -> Result<DataType> {
match sql_data_type {
SqlDataType::Boolean => Ok(DataType::Boolean),
SqlDataType::Int(None) | SqlDataType::Integer(None) => Ok(DataType::Int),
SqlDataType::Int(None) | SqlDataType::Integer(None) | SqlDataType::Int64 => {
Ok(DataType::Int)
}
SqlDataType::Int8(None) => Ok(DataType::Int8),

SqlDataType::UnsignedInt(None) | SqlDataType::UnsignedInteger(None) => Ok(DataType::Uint64),
SqlDataType::UnsignedInt8(None) => Ok(DataType::Uint8),

SqlDataType::Float(_) => Ok(DataType::Float),
SqlDataType::Text => Ok(DataType::Text),
SqlDataType::Bytea => Ok(DataType::Bytea),
Expand Down

0 comments on commit a70fdb5

Please sign in to comment.