MCPcopy Index your code
hub / github.com/Tggl/pg-capture

github.com/Tggl/pg-capture @v0.5.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.5.0 ↗ · + Follow
56 symbols 124 edges 22 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

pg-capture

A lightweight and modular CDC (Change Data Capture) utility for PostgreSQL. Works on top of the logical replication feature to generate high level events from a schema.

pg-capture is like having WAL (Write Ahead Log) events but on an SQL view.

  • Aggregate low level events on tables (insert, update, and delete) into high level events on schemas (object upsert or delete)
  • Use PG as your single source of truth
  • Keep PG in sync with other storages such as Elasticsearch, Redis, etc...
  • Subscribe to schema changes in real-time

Documentation

Extension points exported contracts — how you extend this code

IdsSet (Interface)
(no doc) [4 implementers]
src/types.ts

Core symbols most depended-on inside this repo

getRootIdsFromEvent
called by 48
src/getRootIdsFromEvent.ts
expectQuery
called by 34
src/test/helpers.ts
buildSchemaQuery
called by 14
src/buildSchemaQuery.ts
getAlias
called by 8
src/TableAliasCache.ts
introspection
called by 5
src/introspection.ts
buildQuery
called by 4
src/buildSchemaQuery.ts
from
called by 4
src/QueryBuilder.ts
select
called by 4
src/QueryBuilder.ts

Shape

Method 27
Function 18
Class 10
Interface 1

Languages

TypeScript100%

Modules by API surface

src/QueryBuilder.ts14 symbols
src/RedisSet.ts6 symbols
src/InMemorySet.ts6 symbols
src/EventAggregator.ts5 symbols
src/types.ts4 symbols
src/getRootIdsFromEvent.ts4 symbols
src/buildSchemaQuery.ts4 symbols
src/TableAliasCache.ts3 symbols
website/src/pages/index.tsx2 symbols
website/src/components/HomepageFeatures/index.tsx2 symbols
src/test/helpers.ts2 symbols
src/introspection.ts2 symbols

For agents

$ claude mcp add pg-capture \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact