Next: Intrinsic String Data Functions, Previous: Byte Array Data Functions, Up: Top [Index]
The traversal functions read multiple keys and their associated data into ‘decq’ double ended queue objects. Before adding to the ‘decq’ collector, they clear it. The keys are added in their table forward traversal order. They are immediately followed in the ‘decq’ sequence by their table associated data.
void db_q_glxf(table t, decq q, data g, data l, integer x, ...);
adds to q the keys and their associated data in table t, from the first greater than g towards the last less than l, all if x is negative, x otherwise.
void db_q_goxf(table t, decq q, data g, data o, integer x, ...);
adds to q the keys and their associated data in table t, from the first greater than g towards the last less than or matching o, all if x is negative, x otherwise.
void db_q_ulxf(table t, decq q, data u, data l, integer x, ...);
adds to q the keys and their associated data in table t, from the first matching or greater than u towards the last less than l, all if x is negative, x otherwise.
void db_q_uoxf(table t, decq q, data u, data o, integer x, ...);
adds to q the keys and their associated data in table t, from the first matching or greater than u towards the last less than or matching o, all if x is negative, x otherwise.
After the maximal keys retrieval count, a number of operation modifiers may follow as an integer identifier and an optional argument. Recognized modifiers include:
pick only keys
dump as many bytes as specified by the modifier ‘integer’ argument from the start of the retrieved keys, all for shorter keys
Read all keys and their associated data between inclusive "alpha" and non inclusive "omega" from table "illusion":
db_q_ulxf(db["illusion"], q, "alpha", "omega", -1);
Read all keys starting with inter, remove their common prefix:
db_q_ulxf(db["illusion"], q, "inter", "intes", -1, 'k', 'p', 5);
Traverse keys only, from after start key a to before end key z, picking up to 225 at a time and summing their lengths to y.
decq q; data a, z; integer j, y; a = "alpha"; z = "omega"; y = 0; while (~t.q_glxf.1(q, a, z, 225, 'k')) { j = ~q; do { y += ~qf_qs_data(q); } while (j -= 1); a.copy(qb_q_data(q)); }
Next: Intrinsic String Data Functions, Previous: Byte Array Data Functions, Up: Top [Index]