Versions in this module Expand all Collapse all v0 v0.0.1 Sep 21, 2026 Changes in this version + func CheckRequires(ctx context.Context, db *sql.DB, req *domain.Requires, ...) error + type RequiresError struct + MissingColumns []string + MissingRelations []string + MissingTables []string + TypeMismatches []string + func (e *RequiresError) Error() string + func (e *RequiresError) HasIssues() bool + type ResultWriter interface + WriteResult func(ctx context.Context, result *domain.Result) error + WriteResults func(ctx context.Context, results []*domain.Result) error + type RuleLoader interface + LoadRuleByID func(ctx context.Context, ruleID string) (*domain.Rule, error) + LoadRules func(ctx context.Context) ([]*domain.Rule, error) + LoadRulesForTable func(ctx context.Context, tableName string) ([]*domain.Rule, error) + type SchemaMapper interface + GetFieldName func(tableName, logicalName string) string + GetPrimaryKeyField func(tableName string) string + GetTableName func(logicalName string) string + LoadAllRecords func(ctx context.Context, db *sql.DB, tableName string) ([]map[string]interface{}, error) + LoadRecord func(ctx context.Context, db *sql.DB, tableName, id string) (map[string]interface{}, error) + LoadRelatedRecords func(ctx context.Context, db *sql.DB, tableName, foreignKey, id string) ([]map[string]interface{}, error) + type ValidateRecordUseCase struct + func NewValidateRecordUseCase(db *sql.DB, ruleLoader RuleLoader, schemaMapper SchemaMapper, ...) *ValidateRecordUseCase + func (uc *ValidateRecordUseCase) Execute(ctx context.Context, tableName, recordID string) ([]*domain.Result, error) + func (uc *ValidateRecordUseCase) Neighborhoods(ctx context.Context, tableName, recordID string) ([]validator.NeighborRef, error) + func (uc *ValidateRecordUseCase) NeighborhoodsFromRecord(ctx context.Context, tableName, recordID string, record map[string]interface{}) ([]validator.NeighborRef, error) + func (uc *ValidateRecordUseCase) SetRelationResolver(r domain.ConditionResolver) + type ValidateTableUseCase struct + func NewValidateTableUseCase(db *sql.DB, ruleLoader RuleLoader, schemaMapper SchemaMapper, ...) *ValidateTableUseCase + func (uc *ValidateTableUseCase) Execute(ctx context.Context, tableName string) (*ValidationReport, error) + type ValidationReport struct + DatabasePath string + FailedCount int + HardErrors int + PassedCount int + Results []*domain.Result + SoftWarnings int + TableName string + TotalRecords int + TotalRules int