{"modulePath":"github.com/viant/datly","version":"v1.1.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package validation\n\nPackage validation combines native Go and SQL constraint checks for one invocation-scoped typed entity. It owns validation policy, not transactions.\n\n## Constants\n\n```go\nconst ConnectorDSNCheck = \"datly_connector_dsn\"\n```\n\n## Types\n\n```go\ntype Connection struct {\n\tDB *sql.DB\n\tTx *sql.Tx\n\t// Dialect is existing source authority, not inferred from identifier syntax.\n\tDialect *info.Dialect\n}\n```\nConnection is an internal implementation carrier. Public handler capabilities receive Validator only, never this database/transaction pair.\n\n```go\ntype Service struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc New(source Source) *Service\n```\n\n```go\nfunc (s *Service) MatchReference(ctx context.Context, child, parent any, expected xhandler.ValidationReference) (*xhandler.ValidationReference, error)\n```\nMatchReference resolves an exact native constraint and compares SQL-bound values in the active default transaction. The generated caller separately proves parent INSERT policy, captured edge authority and execution order. This method neither queries the database nor issues a receipt for that proof.\n\n```go\nfunc (s *Service) Validate(ctx context.Context, value any, options ...any) (*xhandler.Validation, error)\n```\n\n```go\ntype Source interface {\n\tValidationConnection(context.Context, string) (Connection, error)\n}\n```\n\n","path":"github.com/viant/datly/sql/validation","name":"validation","synopsis":"Package validation combines native Go and SQL constraint checks for one invocation-scoped typed entity.","isRedistributable":true}
