(define (dg-debug-display-content-left->right txn) (status-t dg-txn-t*) status-init (dg-mdb-introduce-cursor txn left->right) (define id-left dg-id-t id-right dg-id-t id-label dg-id-t ordinal dg-ordinal-t) dg-mdb-introduce-val-relation-key dg-mdb-introduce-val-relation-data (printf "left->right\n") (dg-mdb-cursor-each-key left->right val-relation-key val-relation-data (compound-statement (set id-left (dg-mdb-val->id-at val-relation-key 0) id-label (dg-mdb-val->id-at val-relation-key 1)) (do-while dg-mdb-status-success? (set id-right (dg-mdb-val-relation-data->id val-relation-data) ordinal (dg-mdb-val-relation-data->ordinal val-relation-data)) (printf " (%lu %lu) (%lu %lu)\n" id-left id-label ordinal id-right) (dg-mdb-cursor-next-dup! left->right val-relation-key val-relation-data)))) (label exit (mdb-cursor-close left->right) dg-status-success-if-mdb-notfound (return status))) (define (dg-debug-display-content-right->left txn) (status-t dg-txn-t*) status-init (dg-mdb-introduce-cursor txn right->left) (define id-left dg-id-t id-right dg-id-t id-label dg-id-t) dg-mdb-introduce-val-relation-key dg-mdb-introduce-val-id (printf "right->left\n") (dg-mdb-cursor-each-key right->left val-relation-key val-id (compound-statement (set id-right (dg-mdb-val->id-at val-relation-key 0) id-label (dg-mdb-val->id-at val-relation-key 1)) (do-while dg-mdb-status-success? (set id-left (dg-mdb-val->id val-id)) (printf " (%lu %lu) %lu\n" id-right id-label id-left) (dg-mdb-cursor-next-dup! right->left val-relation-key val-id)))) (label exit (mdb-cursor-close right->left) dg-status-success-if-mdb-notfound (return status)))