{"modulePath":"github.com/ModelRocket/hiro","version":"v0.1.5","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package ptr\n\nPackage ptr provides a set of SQL compatible pointer helpers\n\n## Variables\n\n```go\nvar (\n\t// False is the false pointer\n\tFalse = Bool(false)\n\n\t// True is the true pointer\n\tTrue = Bool(true)\n)\n```\n\n## Functions\n\n```go\nfunc Bool(s interface{}) *bool\n```\nBool returns s safely as \\*bool\n\n```go\nfunc Duration(t interface{}) *time.Duration\n```\nDuration converts t to a \\*time.Duration\n\n```go\nfunc First(ptrs ...interface{}) interface{}\n```\nFirst returns the first non-nil ptr\n\n```go\nfunc Int(i interface{}) *int\n```\nInt returns i safely as \\*int\n\n```go\nfunc Int64(i interface{}) *int64\n```\nInt64 returns i safely as \\*int64\n\n```go\nfunc NilString(s interface{}) *string\n```\nNilString returns s safely as \\*string If string is empty \"\", nil is returned\n\n```go\nfunc String(s interface{}) *string\n```\nString returns s safely as \\*string\n\n```go\nfunc Time(t interface{}) *time.Time\n```\nTime converts t to a \\*time.Time\n\n```go\nfunc Uint64(u interface{}) *uint64\n```\nInt64 returns i safely as \\*int64\n\n## Types\n\n```go\ntype JSON struct {\n\tjson.RawMessage\n\t// contains filtered or unexported fields\n}\n```\nJSON is json pointer\n\n```go\nfunc (j JSON) MarshalJSON() ([]byte, error)\n```\nMarshalJSON marshals the object to json\n\n```go\nfunc (j *JSON) Scan(value interface{}) error\n```\nScan reads a json value from the database into a Map\n\n```go\nfunc (j JSON) Value() (driver.Value, error)\n```\nValue returns Map as a value that can be stored as json in the database\n\n```go\ntype Pointers interface {\n\tInt() *int\n\tInt64() *int64\n\tUint64() *uint64\n\tBool() *bool\n\tString() *string\n\tNilString() *string\n\tTime() *time.Time\n\tDuration() *time.Duration\n}\n```\nPointers provides casting and de-referencing support for scalar values\n\n```go\nfunc Pointer(v interface{}) Pointers\n```\nPointer returns a new Pointers for the value\n\n","path":"github.com/ModelRocket/hiro/pkg/ptr","name":"ptr","synopsis":"Package ptr provides a set of SQL compatible pointer helpers","isRedistributable":true}
