MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / attr_compatible

Function attr_compatible

nodedb-sql/src/planner/array_dml.rs:138–147  ·  view source on GitHub ↗
(a: &ArrayAttrLiteral, dtype: ArrayAttrType)

Source from the content-addressed store, hash-verified

136}
137
138fn attr_compatible(a: &ArrayAttrLiteral, dtype: ArrayAttrType) -> bool {
139 matches!(
140 (a, dtype),
141 (ArrayAttrLiteral::Int64(_), ArrayAttrType::Int64)
142 | (ArrayAttrLiteral::Int64(_), ArrayAttrType::Float64)
143 | (ArrayAttrLiteral::Float64(_), ArrayAttrType::Float64)
144 | (ArrayAttrLiteral::String(_), ArrayAttrType::String)
145 | (ArrayAttrLiteral::Bytes(_), ArrayAttrType::Bytes)
146 )
147}
148
149#[cfg(test)]
150mod tests {

Callers 1

validate_attrsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected