hocquerying
Hocquerying is a paradigm for formulating queries over data sources that support higher-order constructs. It extends conventional query languages by treating predicates, relations, and even entire queries as first-class objects that can be passed as arguments, returned as results, or composed to form new queries. In practice, hocquerying enables meta-queries, relational composition, and context-sensitive retrieval, allowing users to express queries about the structure of data as well as the data itself.
Origin and terminology: The name combines 'hoc' for higher-order context or higher-order components with querying. The
Core concepts: Higher-order predicates—where relations themselves can be quantified or transformed; query combinators—operators that map, filter,
Implementation approaches vary. Some systems extend SQL-like languages with higher-order features; others embed hocquerying in logic
Applications include semantic search, data integration, and scientific literature analysis, where the ability to reason about
See also: higher-order logic, meta-queries, knowledge graphs, query rewriting, typed lambda calculus.