Skip to content

API Reference parrot_formdesigner.services._db_utils

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot_formdesigner.services._db_utils

View source

Shared database utilities for parrot-formdesigner services.

Function is_undefined_table

True when exc is a Postgres undefined-table error (driver-agnostic, FEAT-731).

Mirrors :func:is_unique_violation: matches the asyncpg UndefinedTableError type name, SQLSTATE 42P01, or the relation ... does not exist message.

is_undefined_table(exc: Exception) -> bool

Parameter Type Default Description
exc Exception

Returns: bool

Function is_unique_violation

Return True when exc is a Postgres UNIQUE constraint violation.

Works for asyncpg (UniqueViolationError), psycopg2/3, and drivers that wrap the original error — without importing driver-specific types.

is_unique_violation(exc: Exception) -> bool

Parameter Type Default Description
exc Exception

Returns: bool

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally