{"id":"025338a249bd00b4","repo":"jackc/pgx","slug":"d-is-less-than-the-minimum-value-for-uint64","errorCode":null,"errorMessage":"%d is less than the minimum value for Uint64","messagePattern":"(.+?) is less than the minimum value for Uint64","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pgtype/uint64.go","lineNumber":49,"sourceCode":"\n// Uint64Value implements the [Uint64Valuer] interface.\nfunc (n Uint64) Uint64Value() (Uint64, error) {\n\treturn n, nil\n}\n\n// Scan implements the [database/sql.Scanner] interface.\nfunc (dst *Uint64) Scan(src any) error {\n\tif src == nil {\n\t\t*dst = Uint64{}\n\t\treturn nil\n\t}\n\n\tvar n uint64\n\n\tswitch src := src.(type) {\n\tcase int64:\n\t\tif src < 0 {\n\t\t\treturn fmt.Errorf(\"%d is less than the minimum value for Uint64\", src)\n\t\t}\n\t\tn = uint64(src)\n\tcase string:\n\t\tun, err := strconv.ParseUint(src, 10, 64)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tn = un\n\tdefault:\n\t\treturn fmt.Errorf(\"cannot scan %T\", src)\n\t}\n\n\t*dst = Uint64{Uint64: n, Valid: true}\n\n\treturn nil\n}\n\n// Value implements the [database/sql/driver.Valuer] interface.","sourceCodeStart":31,"sourceCodeEnd":67,"githubUrl":"https://github.com/jackc/pgx/blob/ec1a0befd22592cffffdeeb0a50311b506372f4c/pgtype/uint64.go#L31-L67","documentation":"Error \"%d is less than the minimum value for Uint64\" thrown in jackc/pgx.","triggerScenarios":"Thrown at pgtype/uint64.go:49 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"ec1a0befd22592cffffdeeb0a50311b506372f4c","analyzedAt":"2026-08-04T22:52:11.263Z","schemaVersion":2}