Customers asked for search in the application world. The dictionary grep reads every value whole, which a development dictionary can afford and a production table cannot. db_grep answers the question with the engine doing the work and the agent receiving keys, not values.
Three methods, in order
- Indexed Where a full-text index exists the engine searches terms, with its own syntax and fuzzy matching. With no table named, only the database's indexed columns are searched.
- Scan On a character column the engine compares ignoring case, with wildcards taken literally. On a CLOB where the engine has a large-object function the first 32,000 bytes are compared the same way. A scan runs only on a table the caller names.
- Memory What the server cannot compare ignoring case, an Informix CLOB past 32,000 bytes, a CLOB without the compatibility functions or a legacy TEXT, is streamed and matched in Java, 64 KB at a time with the boundary carried so a match across two pieces is found. The tier is bounded per call at 64 million characters and thirty seconds.
Bounded and governed
- Keys, not values A hit is the row's primary key with its table and column. A keyless table is counted. Reading the row is a separate call with its own grant.
- Row-level security Every statement is a platform select run through the same path as application queries, so the rows a user may not see are not searched.
- Not searched is said A column skipped for want of a function, or a value left unread by the budget, is named with the reason and the remedy.
The tool catalogue keeps up with the code
- Sync from the code A setup command brings the tool catalogue in line with the code: new tools inserted, the grants of renamed tools moved, removed tools deleted. It is a dry run unless committed.
- Never ungrantable A boot fixture inserts any declared tool the catalogue lacks, insert-only, so a release that adds a tool never leaves it ungrantable until someone runs the sync. The boot log states what each fixture wrote.
- Documentation tools gate structure The docs tools decide at the master level whether a grant may change the manual's structure, and write through the documentation application's journalled services rather than the dictionary filesystem.
The dictionary grep and db_grep describe themselves by their difference: one reads every value of a dictionary and answers with line and column, the other lets the engine search business data and answers with keys.