Skip to content

Commit

Permalink
fix: add Binary type for python/nodejs binding (#332)
Browse files Browse the repository at this point in the history
  • Loading branch information
andylokandy authored Jan 9, 2024
1 parent ebda603 commit 451915a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions bindings/nodejs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ impl ToNapiValue for Value {
databend_driver::Value::EmptyArray => String::to_napi_value(env, "[]".to_string()),
databend_driver::Value::EmptyMap => String::to_napi_value(env, "{}".to_string()),
databend_driver::Value::Boolean(b) => bool::to_napi_value(env, b),
databend_driver::Value::Binary(b) => Buffer::to_napi_value(env, b.into()),
databend_driver::Value::String(s) => String::to_napi_value(env, s),
databend_driver::Value::Number(n) => NumberValue::to_napi_value(env, NumberValue(n)),
databend_driver::Value::Timestamp(_) => {
Expand Down
1 change: 1 addition & 0 deletions bindings/python/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ impl IntoPy<PyObject> for Value {
dict.into_py(py)
}
databend_driver::Value::Boolean(b) => b.into_py(py),
databend_driver::Value::Binary(b) => b.into_py(py),
databend_driver::Value::String(s) => s.into_py(py),
databend_driver::Value::Number(n) => {
let v = NumberValue(n);
Expand Down

0 comments on commit 451915a

Please sign in to comment.