{"modulePath":"github.com/ModelRocket/hiro","version":"v0.1.5","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package null\n\nPackage null provides some clean helpers for sql NULL value handling\n\n## Functions\n\n```go\nfunc Bool(b interface{}) sql.NullBool\n```\nBool safely converts b to a sql.NullBool\n\n```go\nfunc Int64(i interface{}) sql.NullInt64\n```\nInt64 safely converts i to a sql.NullInt64\n\n```go\nfunc JSON(j interface{}) types.NullJSONText\n```\nJSON safely convers or marshals to a sql.NullJSONText Failure to marshal results in an error object\n\n```go\nfunc String(s interface{}) sql.NullString\n```\nString safely converts s to a sql.NullString\n\n```go\nfunc Time(tm interface{}) sql.NullTime\n```\nTime safely converts tm to a sql.NullTime\n\n## Types\n\n```go\ntype Timer interface {\n\tTime() time.Time\n}\n```\nTimer is time interface\n\n```go\ntype UUID struct {\n\tUUID  uuid.UUID\n\tValid bool // Valid is true if UUID is not NULL\n}\n```\nUUID represents a uuid that may be null.\n\n```go\nfunc MakeUUID(u interface{}) UUID\n```\nMakeUUID safely converts s to a null.UUID\n\n```go\nfunc (u *UUID) Scan(value interface{}) error\n```\nScan implements the Scanner interface.\n\n```go\nfunc (u UUID) Value() (driver.Value, error)\n```\nValue implements the driver Valuer interface.\n\n","path":"github.com/ModelRocket/hiro/pkg/null","name":"null","synopsis":"Package null provides some clean helpers for sql NULL value handling","isRedistributable":true}
