lib_dblib_search
Search .DbLib database libraries read-only for components using case-insensitive text across selected tables or columns, with row limits and scan reporting.
Instructions
Search database libraries (.DbLib) for components, read-only.
Case-insensitive substring match against the columns of every row of every enabled table, in one DbLib or in every installed one. lib_search already folds DbLib rows into its own results; this is the direct form, for restricting to one table or a few columns, or for raising the row bound on a large database.
THE QUERY NEVER REACHES THE DATABASE. Each table is read with a
plain SELECT of the DbLib's own declared table and every row is
matched inside Altium, so a query holding quotes, wildcards or
SQL is matched as the text it is. The cost is that every row is
read: max_rows bounds the total, rows_scanned reports it,
and scan_capped says the bound cut the search short.
Args:
query: Text to find (case-insensitive substring).
library_path: One .DbLib to search. Omitted, every installed
database library is searched.
table: One table the DbLib declares (as lib_dblib_info names
it). Omitted, every enabled table.
fields: Column names to match. Omitted, every column. A name
a table lacks is reported under unknown_fields.
limit: Cap on returned rows (1 to 1000, default 50).
max_rows: Cap on rows read in total (default 20000).
Returns:
{"query", "count", "limit", "truncated", "rows_scanned",
"scan_capped", "libraries": [{"library_path", "searched",
"error", "tables_searched", "tables_failed", "unknown_fields"}],
"results": [{"library_path", "table", "key", "key_field",
"symbol_ref", "symbol_library", "footprints": [{"ref",
"library"}], "description", "matched_field", "matched_value"}]}.
A library's error is a code (READ_FAILED, TABLE_UNKNOWN,
NO_TABLES, NO_CONNECTION_STRING, CONNECT_FAILED,
LIMIT_REACHED); the reason text never carries the connection
string.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| query | Yes | ||
| table | No | ||
| fields | No | ||
| max_rows | No | ||
| library_path | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||