PrimeBrickPrimeBrick
  • Docs
  • Contact
  • MIT License
  • Documentation
  • MCP Server
  • API Catalog
  • Services
  • Libraries
PrimeBrickPrimeBrick

© 2026 PrimeBrick. MIT License. v3.8.0

github
DAL Library
    Getting startedArchitectureEntities & decoratorsQuery DSLRepositoryConnections & transactionsAudit trailOptimistic Locking & ConcurrencyCloneChangelogAPI reference
SDK Library
powered by Zudoku
DAL Library

Changelog

What's new

Audit trail entities

A new @AuditTrailEntity() decorator and AuditLogEntity class let you read and write generic audit trail tables (customers_audit, organizations_audit, etc.) through the same Repository API. Write operations (upsert, update, delete, restore, hardDelete) now emit field-level audit deltas automatically when an AuditPort is injected.

See Audit trail.

Clone

Repository.clone() copies a record by UUID — excluding the PK and unique columns, resetting audit/deletable fields, and stamping a @CloneField column with the source UUID.

See Clone.

Breaking changes in 0.1.9

If you are upgrading from 0.1.8, review these changes:

ChangeBeforeAfter
Join.on() argument orderJoin.on(right, left, type?, options?)Join.on(left, right, type?, options?)
Repository.count() return typenumberbigint
PaginatedEntity.total_recordsnumberbigint
Repository.findById() id paramnumber | stringbigint | string
AuditParams.entityIdnumberbigint

The Join.on() swap corrects a confusing argument order — the left (joined) table is now the first argument, matching standard SQL JOIN ... ON left = right reading order. Update any existing Join.on() calls accordingly.

The bigint changes align the DAL with PostgreSQL's native bigint type (parsed via INT8_OID). count() and total_records now return native bigint values instead of number. Use Number(result) or BigInt arithmetic as appropriate.

Next steps

  • Overview — high-level introduction and Hello World example.
  • Getting started — install, configure, and run your first query.
  • Audit trail — automatic field-level audit logging.
  • Clone — copy entity records by UUID.
  • Optimistic locking — concurrency control for auditable entities.
Last modified on July 26, 2026
CloneAPI reference
On this page
  • What's new
    • Audit trail entities
    • Clone
  • Breaking changes in 0.1.9
  • Next steps