
- [x] Rename `where_cond` to `filter` and remove `where_id` (cause it encourages wasteful boxing)
- [x] Switch IDs to Arc<str>
- [x] Switch to Arc for all entities (!!!)
- [x] Support skipping prev hydrated rows (as shared)
- [x] query selectable -- macro rules.
- [x] rename `convert_row` -> `hydrate`
- [x] Select arbitrary expressions? - like columns, expressions, etc.

- [x] Make bulk take refs &[Arc<E>]
- [x] Remove SubentityRef
- [x] Rename SubentityList

cleaning up on hidden lifetimes?
list mutations... operations in reality. index. index mut? push?
wrappers. from. into. etc. constructors... `.into()` usage...

- [ ] Q::any(vec![pql!(...)])) + `.filter_any(vec![...])`
- [ ] Specialized types:
    - plain SQL without any values, example: "NOW()"
    - array (tuple of the same type) -- why not PG array?
    - col to col
    - col to ref
    - col to val
    - reorder the implementations (?)
- [ ] just one macro to rule them all
    pql!(table.c.column)
    pql!(expression) -- ref
    pql!([expression]) -- value (boxed)
    pql!([[x, y, z]]) -- arrays
    pql!({{ x, y, z }}) -- tuples
    pql!("NOW()")
    pql!("FUNK(?, ?, ?)", pql!(...), pql!(...), pql!(...))
    pql!(table.c.coloumn, "IS NULL")
    pql! { table.c.coloumn = table.c.coloumn }
    pql! { table.c.coloumn = expression } -- ref
    pql! { table.c.coloumn = [expression] } -- value (boxed)
    pql! { table.c.coloumn = { expression } } -- pql expression (as in another `pql!(...)`)
    ^ the final ones can be done with $op:tt and stringify!
    pql!(table.c.coloumn, "...", table.c.coloumn) // also available with the usual combos.
    pql! { table.c.coloumn in table.c.coloumn } // maybe? automatic array?


- [ ] Q::as_selectable => SelectableExpr::of(expr)
- [ ] util: simple_load(&order.buyer) -- convenience. esp when prototyping?
        similar util for the children? Need ChildEntity, for the ...?
- [ ] macro: load_entity_refs!
    let order = load_entity_refs!(result = order { buyer? });
    let order = load_entity_refs!(result? = order { buyer? });
    let orders = load_entity_refs!(result[..] = order { buyer? });
    https://gemini.google.com/app/475cce29f6a7097c
    // better error messages? asserting types... payload result
- Child entities
    // impl ChildEntity for PaymentItem {
    //   type ParentEntity = ParentEntity; // must be an entity
    //   parent(c) { return &c.parent_id; }
    //   get_mut_list_field(p) { return &mut p.field; }
    // }
    // just do load_children(parents: Vec<Arc<Parent>>, children: Vec<Arc<child>>)
    // - group children first by the parent id
    // - then loop through the parents to and find the right children... (AKA link/attach)
    // - get mut of the arc...
    // no repeats? select each exactly once? empty vec if none.
- Default ordering for children can be specified. Applied when calling `from`.
// What about parents? It could have that too...

- clippy.

- [ ] More extensive testing for all the diff types, use cases, and scenarios!
    Jot down the things to cover...

- [ ] JSON operations
- [ ] Case expressions (?)

- [ ] Replace most panics -- introduce a PetroError type...
- [ ] Printing out the query? (and params?)

- [ ] Support lateral queries and subqueries (?)
- [ ] group by & having (?)

- [ ] Ability to add param direclty for QB (getting the number) -- for more raw queries... counts..


internal DNS. load balancers... setup and secrecy... wildcards.

let orders = result
    .into_iter()
    .map(|(mut order, buyer)| { order.buyer = buyer.map(EntityRef::from); return order; })
    .collect();

q.filter(pql! { code_t.c.ip_address = &ip_address })
    .filter(pql! { code_t.c.purpose = &purpose })
    .filter(pql! { code_t.c.id = &id })
    .filter(pql! { code_t.c.attempts_remaining > &0 })
    .filter(pql! { code_t.c.expiration_time > { pql!("TIMEZONE('UTC', NOW())") } })
    .filter(Q::any(vec![
        pql! { code_t.c.expiration_time > { pql!("TIMEZONE('UTC', NOW())") } },
        pql! { code_t.c.expiration_time > { pql!("TIMEZONE('UTC', NOW())") } },
        pql! { code_t.c.expiration_time > { pql!("TIMEZONE('UTC', NOW())") } },
    ]))


Why Arc?
- easier referencing. more efficient.
- prevent mutations, need to be careful here...
- remember to update we don't modify, instead we...
    - clone. and use both old and new to determine how to update.
- when inserting and updating and deleting, we only need a reference, not the actual
    - and when dealing with bulk... hm...

assertions and constraints.
