pub fn fix_attributes_in_statements<
    Store: store::Store,
    Heap: heap::Heap,
> (
    view: &View<Store, Heap>,
    statements: &mut [Statement],
) {
    for stmt in statements.iter_mut() {
        let aid = match stmt.attribute {
            QueryAttribute::Fixed(aid) => aid,
            QueryAttribute::Named(cid) => match view.lookup_attribute_id(cid) {
                Ok(aid) => aid,
                Err(name) => {
                    // TODO: Have proper error handling for missing attributes.
                    panic!("No such attribute: {:?}", name);
                }
            }
        };

        stmt.attribute = QueryAttribute::Fixed(aid);
    }
}
/// Convert named attributes into fixed (by-id) attributes.
Convert named attributes into fixed (by-id) attributes.
Convert named attributes into fixed ( by - id ) attributes .
pub fn fix_attributes_in_statements<
    Store: store::Store,
    Heap: heap::Heap,
> (
    view: &View<Store, Heap>,
    statements: &mut [Statement],
) {
    for stmt in statements.iter_mut() {
        let aid = match stmt.attribute {
            QueryAttribute::Fixed(aid) => aid,
            QueryAttribute::Named(cid) => match view.lookup_attribute_id(cid) {
                Ok(aid) => aid,
                Err(name) => {
                    // TODO: Have proper error handling for missing attributes.
                    panic!("No such attribute: {:?}", name);
                }
            }
        };
        stmt.attribute = QueryAttribute::Fixed(aid);
    }
}
pub fn fix_attributes_in_statements < Store : store :: Store , Heap : heap :: Heap , > ( view : & View < Store , Heap > , statements : & mut [ Statement ] , ) { for stmt in statements . iter_mut ( ) { let aid = match stmt . attribute { QueryAttribute :: Fixed ( aid ) => aid , QueryAttribute :: Named ( cid ) => match view . lookup_attribute_id ( cid ) { Ok ( aid ) => aid , Err ( name ) => { // TODO: Have proper error handling for missing attributes. panic ! ( " " name ) ; } } } ; stmt . attribute = QueryAttribute :: Fixed ( aid ) ; } }
Convert named attributes into fixed (by-id) attributes.
Convert named attributes into fixed ( by - id ) attributes .
view
&View<Store, Heap>
statements
&mut [Statement]
view
&View<Store, Heap>
statements
&mut [Statement]