(view: &ArrayCatalogView)
| 273 | } |
| 274 | |
| 275 | fn 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 | |
| 300 | fn dim_type_to_sql(t: ArrayDimType) -> SqlDataType { |
| 301 | match t { |
no test coverage detected