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

Function array_columns

nodedb-sql/src/resolver/columns.rs:275–298  ·  view source on GitHub ↗
(view: &ArrayCatalogView)

Source from the content-addressed store, hash-verified

273}
274
275fn array_columns(view: &ArrayCatalogView) -> Vec<ColumnInfo> {
276 let mut cols = Vec::with_capacity(view.dims.len() + view.attrs.len());
277 for d in &view.dims {
278 cols.push(ColumnInfo {
279 name: d.name.clone(),
280 data_type: dim_type_to_sql(d.dtype),
281 nullable: false,
282 is_primary_key: false,
283 default: None,
284 raw_type: None,
285 });
286 }
287 for a in &view.attrs {
288 cols.push(ColumnInfo {
289 name: a.name.clone(),
290 data_type: attr_type_to_sql(a.dtype),
291 nullable: a.nullable,
292 is_primary_key: false,
293 default: None,
294 raw_type: None,
295 });
296 }
297 cols
298}
299
300fn dim_type_to_sql(t: ArrayDimType) -> SqlDataType {
301 match t {

Callers 1

resolve_array_tvfFunction · 0.85

Calls 5

dim_type_to_sqlFunction · 0.85
attr_type_to_sqlFunction · 0.85
lenMethod · 0.45
pushMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected