Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Catalog Queries

The catalog is a SQLite-based query system that provides SQL access to project metadata. It indexes all elements in your Mendix project – entities, microflows, pages, associations, attributes, and more – into queryable tables that support standard SQL syntax.

How It Works

The catalog builds an in-memory SQLite database from the project’s MPR file. This database is cached in .mxcli/catalog.db next to the MPR file for fast subsequent access.

There are two levels of catalog refresh:

CommandWhat It BuildsUse Case
REFRESH CATALOGBasic metadata tables (entities, microflows, pages, etc.)Quick queries about project structure
REFRESH CATALOG FULLMetadata + cross-references + source contentCode navigation, impact analysis, full-text search

Quick Start

-- Build the catalog
REFRESH CATALOG;

-- See what tables are available
SHOW CATALOG TABLES;

-- Query entities in a module
SELECT Name, EntityType FROM CATALOG.ENTITIES WHERE ModuleName = 'Sales';

-- Find microflows that reference an entity
SELECT Name, ModuleName FROM CATALOG.MICROFLOWS
WHERE Description LIKE '%Customer%' OR Name LIKE '%Customer%';

Key Features

  • Standard SQL syntax – SELECT, WHERE, JOIN, GROUP BY, ORDER BY, HAVING, UNION
  • Multiple tables – Entities, attributes, associations, microflows, pages, and more
  • Cross-reference data – Available after REFRESH CATALOG FULL
  • Cached for performance – Stored in .mxcli/catalog.db next to the MPR file
  • AI-friendly – Structured data that AI assistants can query programmatically

CLI Usage

# Refresh catalog
mxcli -p app.mpr -c "REFRESH CATALOG"
mxcli -p app.mpr -c "REFRESH CATALOG FULL"

# Query catalog
mxcli -p app.mpr -c "SELECT Name FROM CATALOG.MICROFLOWS LIMIT 10"
mxcli -p app.mpr -c "SHOW CATALOG TABLES"