{"id":27381474,"url":"https://github.com/mauserzjeh/null","last_synced_at":"2026-05-20T07:35:49.819Z","repository":{"id":65726950,"uuid":"590205204","full_name":"mauserzjeh/null","owner":"mauserzjeh","description":"Nullable field for Go","archived":false,"fork":false,"pushed_at":"2023-02-06T20:53:18.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-23T18:06:37.898Z","etag":null,"topics":["generics","go","golang","json","null","nullable","sql"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mauserzjeh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2023-01-17T21:57:23.000Z","updated_at":"2023-01-24T19:05:50.000Z","dependencies_parsed_at":"2023-02-19T12:00:22.246Z","dependency_job_id":null,"html_url":"https://github.com/mauserzjeh/null","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/mauserzjeh/null","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mauserzjeh%2Fnull","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mauserzjeh%2Fnull/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mauserzjeh%2Fnull/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mauserzjeh%2Fnull/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mauserzjeh","download_url":"https://codeload.github.com/mauserzjeh/null/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mauserzjeh%2Fnull/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265934208,"owners_count":23852089,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["generics","go","golang","json","null","nullable","sql"],"created_at":"2025-04-13T14:56:52.766Z","updated_at":"2026-05-20T07:35:44.781Z","avatar_url":"https://github.com/mauserzjeh.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"![GitHub release (latest by date)](https://img.shields.io/github/v/release/mauserzjeh/null?style=flat-square)\n\n# Null\n\nNull is a package that provides a generic nullable variable that can be used for both `JSON` and `SQL` operations.\n\n## Features\n- Uses a generic type for the underlying value\n- Provides an easy way to test if certain struct fields were set after unmarshalling a `JSON` message\n- Makes it easier to update only those fields in the database which were set previously. Especially in `NoSQL` databases using `JSON` documents\n- Compatible with the standard `database/sql` package\n    - If the underlying type is a custom type that the standard `database/sql` package can't handle, then it is possible to implement the `sql.Scanner` and `driver.Valuer` interfaces for that given type to be compatible\n- Possible to control how the underlying value is handled during json marshalling and unmarshalling by implementing the `json.Marshaler` and `json.Unmarshaler` interfaces for the underlying type\n- Helper functions provide methods to easily filter unset fields in structs and maps\n\n## Installation\n```\ngo get -u github.com/mauserzjeh/null\n```\n\n## Usage \u0026 Examples\nBelow you can see how to use the package in general and also in a more complex scenario. There are a few examples in `test_null.go` as well.\n\n## General usage\n```go\nvar nullableStr null.Var[string]\n\n// IsSet returns if the value was set\nnullableStr.IsSet() // false\n\n// Valid returns if the value is NULL\nnullableStr.Valid() // false\n\n// Val returns the value\nnullableStr.Val() // \"\"\n\n// ------------------------------------------------------------------\n\nnullableStr.Set(\"foo\")\nnullableStr.IsSet() // true\nnullableStr.Valid() // true\nnullableStr.Val() // \"foo\"\n\n// ------------------------------------------------------------------\n\nnullableStr.SetNil()\nnullableStr.IsSet() // true\nnullableStr.Valid() // false\nnullableStr.Val() // \"\"\n\n// ------------------------------------------------------------------\n\nnullableStr.Unset()\nnullableStr.IsSet() // false\nnullableStr.Valid() // false\nnullableStr.Val() // \"\"\n```\n\n## Complex usage\n\n### 1. Let's have the following types\n```go\n// custom integer type\ntype SiblingType int64\n\nconst (\n    Sister SiblingType = iota\n    Brother\n)\n\n// custom slice type\ntype CustomSlice []string\n\n// custom generic map\ntype CustomMap[K, V comparable] map[K]V\n\n// custom struct\ntype Sibling struct {\n    Name null.Var[string]      `json:\"name\"`\n    Age  null.Var[int64]       `json:\"age\"`\n    Type null.Var[SiblingType] `json:\"type\"`\n}\n\n// another custom struct\ntype Person struct {\n    Name       null.Var[string]                   `json:\"name\"`\n    Age        null.Var[int64]                    `json:\"age\"`\n    BirthDate  null.Var[time.Time]                `json:\"birth_date\"`\n    Books      null.Var[CustomSlice]              `json:\"books\"`\n    ExamScores null.Var[CustomMap[string, int64]] `json:\"exam_scores\"`\n    Sibling    null.Var[Sibling]                  `json:\"sibling\"`\n}\n```\n\n### 2. Default `JSON` marshaling\n```go\nvar p Person\nlog.Printf(\"%+v\", p)\n// {\n//     Name:       {set:false valid:false value:} \n//     Age:        {set:false valid:false value:0} \n//     BirthDate:  {set:false valid:false value:{wall:0 ext:0 loc:\u003cnil\u003e}} \n//     Books:      {set:false valid:false value:[]} \n//     ExamScores: {set:false valid:false value:map[]} \n//     Sibling:    {set:false valid:false value:{\n//             Name:   {set:false valid:false value:} \n//             Age:    {set:false valid:false value:0} \n//             Type:   {set:false valid:false value:0}\n//         }\n//     }\n// }\n\nj, _ := json.Marshal(p)\nlog.Printf(\"%s\", j)\n// {\n// \t\"name\":null,\n// \t\"age\":null,\n// \t\"birth_date\":null,\n// \t\"books\":null,\n// \t\"exam_scores\":null,\n// \t\"sibling\":null\n// }\n\np.Name.Set(\"Peter\")\np.Age.Set(25)\n\nvar s Sibling\nlog.Printf(\"%+v\", s)\n// {\n//     Name:   {set:false valid:false value:} \n//     Age:    {set:false valid:false value:0} \n//     Type:   {set:false valid:false value:0}\n// }\n\ns.Name.Set(\"Anna\")\ns.Age.Set(20)\ns.Type.Set(Sister)\n\np.Sibling.Set(s)\n\nj, _ = json.Marshal(p)\nlog.Printf(\"%s\", j)\n// {\n// \t\"name\":\"Peter\",\n// \t\"age\":25,\n// \t\"birth_date\":null,\n// \t\"books\":null,\n// \t\"exam_scores\":null,\n// \t\"sibling\":{\n// \t\t\"name\":\"Anna\",\n// \t\t\"age\":20,\n// \t\t\"type\":0\n// \t}\n// }\n\np.BirthDate.Set(time.Unix(852073200, 0))\np.Books.Set([]string{\"George Orwell - 1984\", \"Stephen E. Ambrose - Band of Brothers\"})\np.ExamScores.Set(CustomMap[string, int64]{\n    \"math\":    80,\n    \"physics\": 90,\n})\n\nj, _ = json.Marshal(p)\nlog.Printf(\"%s\", j)\n// {\n// \t\"name\":\"Peter\",\n// \t\"age\":25,\n// \t\"birth_date\":\"1997-01-01T00:00:00+01:00\",\n// \t\"books\":[\n// \t\t\"George Orwell - 1984\",\n// \t\t\"Stephen E. Ambrose - Band of Brothers\"\n// \t],\n// \t\"exam_scores\":{\n// \t\t\"math\":80,\n// \t\t\"physics\":90\n// \t},\n// \t\"sibling\":{\n// \t\t\"name\":\"Anna\",\n// \t\t\"age\":20,\n// \t\t\"type\":0\n// \t}\n// }\n```\n\n### 3. Implement `JSON` marshaler for `Person` and `Sibling`\n```go\n// MarshalJSON implements the json.Marshaler interface\nfunc (s Sibling) MarshalJSON() ([]byte, error) {\n    m := map[string]any{}\n    if s.Name.IsSet() {\n        m[\"name\"] = s.Name\n    }\n\n    if s.Age.IsSet() {\n        m[\"age\"] = s.Age\n    }\n\n    if s.Type.IsSet() {\n        m[\"type\"] = s.Type\n    }\n\n    return json.Marshal(m)\n}\n\n// MarshalJSON implements the json.Marshaler interface\nfunc (p Person) MarshalJSON() ([]byte, error) {\n    m := map[string]any{}\n    if p.Name.IsSet() {\n        m[\"name\"] = p.Name\n    }\n\n    if p.Age.IsSet() {\n        m[\"age\"] = p.Age\n    }\n\n    if p.BirthDate.IsSet() {\n        m[\"birth_date\"] = p.BirthDate\n    }\n\n    if p.Books.IsSet() {\n        m[\"books\"] = p.Books\n    }\n\n    if p.ExamScores.IsSet() {\n        m[\"exam_scores\"] = p.ExamScores\n    }\n\n    if p.Sibling.IsSet() {\n        m[\"sibling\"] = p.Sibling\n    }\n\n    return json.Marshal(m)\n}\n\nvar p Person\nlog.Printf(\"%+v\", p)\n// {\n//     Name:       {set:false valid:false value:} \n//     Age:        {set:false valid:false value:0} \n//     BirthDate:  {set:false valid:false value:{wall:0 ext:0 loc:\u003cnil\u003e}} \n//     Books:      {set:false valid:false value:[]} \n//     ExamScores: {set:false valid:false value:map[]} \n//     Sibling:    {set:false valid:false value:{\n//             Name:   {set:false valid:false value:} \n//             Age:    {set:false valid:false value:0} \n//             Type:   {set:false valid:false value:0}\n//         }\n//     }\n// }\n\nj, _ := json.Marshal(p)\nlog.Printf(\"%s\", j)\n// {}\n\np.Name.Set(\"Peter\")\np.Age.Set(25)\n\nvar s Sibling\nlog.Printf(\"%+v\", s)\n// {\n//     Name:   {set:false valid:false value:} \n//     Age:    {set:false valid:false value:0} \n//     Type:   {set:false valid:false value:0}\n// }\n\ns.Name.Set(\"Anna\")\ns.Age.Set(20)\ns.Type.Set(Sister)\n\np.Sibling.Set(s)\n\nj, _ = json.Marshal(p)\nlog.Printf(\"%s\", j)\n// {\n//     \"age\":25,\n//     \"name\":\"Peter\",\n//     \"sibling\":{\n//         \"age\":20,\n//         \"name\":\"Anna\",\n//         \"type\":0\n//     }\n// }\n\np.BirthDate.Set(time.Unix(852073200, 0))\np.Books.Set([]string{\"George Orwell - 1984\", \"Stephen E. Ambrose - Band of Brothers\"})\np.ExamScores.Set(CustomMap[string, int64]{\n    \"math\":    80,\n    \"physics\": 90,\n})\n\nj, _ = json.Marshal(p)\nlog.Printf(\"%s\", j)\n// {\n//     \"age\":25,\n//     \"birth_date\":\"1997-01-01T00:00:00+01:00\",\n//     \"books\":[\n//         \"George Orwell - 1984\",\n//         \"Stephen E. Ambrose - Band of Brothers\"\n//     ],\n//     \"exam_scores\":{\n//         \"math\":80,\n//         \"physics\":90\n//     },\n//     \"name\":\"Peter\",\n//     \"sibling\":{\n//         \"age\":20,\n//         \"name\":\"Anna\",\n//         \"type\":0\n//     }\n// }\n\np.Books.SetNil()     // will be null\np.ExamScores.Unset() // will be unset\np.Sibling.Unset()    // will be unset\n\nj, _ = json.Marshal(p)\nlog.Printf(\"%s\", j)\n// {\n//     \"age\":25,\n//     \"birth_date\":\"1997-01-01T00:00:00+01:00\",\n//     \"books\":null,\n//     \"name\":\"Peter\"\n// }\n```\n\n### 4. Use `FilterStruct` and `FilterMap`\n\n`FilterStruct` and `FilterMap` are helper functions that can filter either a struct or a map from unset nullable variables. They provide an easy way to implement `json.Marshaller` interface without having to check each field in a struct. These helper functions both return a map without the unset fields.\n\nHowever there are a few requirements:\n- All fields should be tagged with either a `json` or custom tag\n- To be able to recursively filter custom structs the `Filterable` interface should be embedded into the given structs\n- Custom structs can be embedded without having them to be tagged as long as they have `Filterable` interface embedded inside them and their fields are tagged. In this case the fields of the embedded struct will be on the same level as the struct that embeds it. If a tag is set for this embedded field, then the embedded struct fields will be presented under the given tag.\n\nSimiliarly to `FilterStruct`, `FilterMap` can be used to filter maps containing nullable variables. \nIt will also recursively filter map keys which are `map[string]any` type.\n\nThe `JSON` marshaler example looks like this using the `FilterStruct` helper function. More examples in `filter_test.go`\n    \n```go\n// custom struct\ntype Sibling struct {\n    // Signal for FilterStruct that if this struct type is used\n    // for another struct's field type, then it can recursively\n    // filter it.\n    null.Filterable\n\n    Name null.Var[string]      `json:\"name\"`\n    Age  null.Var[int64]       `json:\"age\"`\n    Type null.Var[SiblingType] `json:\"type\"`\n}\n\n// another custom struct\ntype Person struct {\n    // Signal for FilterStruct that if this struct type is used\n    // for another struct's field type, then it can recursively\n    // filter it.\n    null.Filterable \n\n    Name       null.Var[string]                   `json:\"name\"`\n    Age        null.Var[int64]                    `json:\"age\"`\n    BirthDate  null.Var[time.Time]                `json:\"birth_date\"`\n    Books      null.Var[CustomSlice]              `json:\"books\"`\n    ExamScores null.Var[CustomMap[string, int64]] `json:\"exam_scores\"`\n\n    // Sibling is also filterable\n    Sibling    Sibling                            `json:\"sibling\"`\n}\n\n\n// MarshalJSON implements the json.Marshaler interface\nfunc (s Sibling) MarshalJSON() ([]byte, error) {\n    m, err := null.FilterStruct(s)\n    if err != nil {\n        return nil, err\n    }\n\n    return json.Marshal(m)\n}\n\n// MarshalJSON implements the json.Marshaler interface\nfunc (p Person) MarshalJSON() ([]byte, error) {\n    m, err := null.FilterStruct(p)\n    if err != nil {\n        return nil, err\n    }\n\n    return json.Marshal(m)\n}\n```\n\n`FilterStruct` has an additional option to use custom tags when determining the keys for the filtered map that it will produce. \nBy default the `json` tag is used.\n```go\nm, err := null.FilterStruct(s, null.UseTag(\"custom_tag\"))\n```\n\nAn example using `FilterMap`.\n```go\na := null.Var[string]\nb := null.Var[string]\nc := null.Var[string]\n\na.Set(\"A\")\nb.SetNil()\n\nm := map[string]any{\n    \"a\": a,\n    \"b\": b,\n    \"c\": c,\n}\n\nmf, err := null.FilterMap(m)\nif err != nil {\n    log.Fatal(err)\n}\n\nlog.Printf(\"%+v\", mf)\n// map[a:A b:\u003cnil\u003e]\n\n```\n\n### 5. Default `JSON` unmarshal\n```go\nvar p Person\nlog.Printf(\"%+v\", p)\n// {\n//     Name:       {set:false valid:false value:} \n//     Age:        {set:false valid:false value:0} \n//     BirthDate:  {set:false valid:false value:{wall:0 ext:0 loc:\u003cnil\u003e}} \n//     Books:      {set:false valid:false value:[]} \n//     ExamScores: {set:false valid:false value:map[]} \n//     Sibling:    {set:false valid:false value:{\n//             Name:   {set:false valid:false value:} \n//             Age:    {set:false valid:false value:0} \n//             Type:   {set:false valid:false value:0}\n//         }\n//     }\n// }\n\njsonStr1 := []byte(`{}`)\n_ = json.Unmarshal(jsonStr1, \u0026p)\nlog.Printf(\"%+v\", p)\n// {\n//     Name:       {set:false valid:false value:} \n//     Age:        {set:false valid:false value:0} \n//     BirthDate:  {set:false valid:false value:{wall:0 ext:0 loc:\u003cnil\u003e}} \n//     Books:      {set:false valid:false value:[]} \n//     ExamScores: {set:false valid:false value:map[]} \n//     Sibling:    {set:false valid:false value:{\n//             Name:   {set:false valid:false value:} \n//             Age:    {set:false valid:false value:0} \n//             Type:   {set:false valid:false value:0}\n//         }\n//     }\n// }\n\np = Person{} // reset variale\njsonStr2 := []byte(`{\"age\":25,\"name\":\"Peter\",\"sibling\":{\"age\":20,\"name\":\"Anna\",\"type\":0}}`)\n_ = json.Unmarshal(jsonStr2, \u0026p)\nlog.Printf(\"%+v\", p)\n// {\n//     Name:       {set:true valid:true value:Peter} \n//     Age:        {set:true valid:true value:25} \n//     BirthDate:  {set:false valid:false value:{wall:0 ext:0 loc:\u003cnil\u003e}} \n//     Books:      {set:false valid:false value:[]} \n//     ExamScores: {set:false valid:false value:map[]} \n//     Sibling:    {set:true valid:true value:{\n//             Name:   {set:true valid:true value:Anna} \n//             Age:    {set:true valid:true value:20} \n//             Type:   {set:true valid:true value:0}\n//         }\n//     }\n// }\n\n\np = Person{} // reset variale\njsonStr3 := []byte(`{\"age\":25,\"birth_date\":\"1997-01-01T00:00:00+01:00\",\"books\":[\"George Orwell - 1984\",\"Stephen E. Ambrose - Band of Brothers\"],\"exam_scores\":{\"math\":80,\"physics\":90},\"name\":\"Peter\",\"sibling\":{\"age\":20,\"name\":\"Anna\",\"type\":0}}`)\n_ = json.Unmarshal(jsonStr3, \u0026p)\nlog.Printf(\"%+v\", p)\n// {\n//     Name:       {set:true valid:true value:Peter} \n//     Age:        {set:true valid:true value:25} \n//     BirthDate:  {set:true valid:true value:{wall:0 ext:62987670000 loc:0x2ca260}} \n//     Books:      {set:true valid:true value:[George Orwell - 1984 Stephen E. Ambrose - Band of Brothers]} \n//     ExamScores: {set:true valid:true value:map[math:80 physics:90]} \n//     Sibling:    {set:true valid:true value:{\n//             Name:   {set:true valid:true value:Anna} \n//             Age:    {set:true valid:true value:20} \n//             Type:   {set:true valid:true value:0}\n//         }\n//     }\n// }\n\np = Person{} // reset variale\njsonStr4 := []byte(`{\"age\":25,\"birth_date\":\"1997-01-01T00:00:00+01:00\",\"books\":null,\"name\":\"Peter\"}`)\n_ = json.Unmarshal(jsonStr4, \u0026p)\nlog.Printf(\"%+v\", p)\n// {\n//     Name:       {set:true valid:true value:Peter} \n//     Age:        {set:true valid:true value:25} \n//     BirthDate:  {set:true valid:true value:{wall:0 ext:62987670000 loc:0x2ca260}} \n//     Books:      {set:true valid:false value:[]} \n//     ExamScores: {set:false valid:false value:map[]} \n//     Sibling:    {set:false valid:false value:{\n//             Name:   {set:false valid:false value:} \n//             Age:    {set:false valid:false value:0} \n//             Type:   {set:false valid:false value:0}\n//         }\n//     }\n// }\n```\n\n### 6. Implement `JSON` unmarshaler for `SiblingType`\n```go\n// UnmarshalJSON implements the json.Unmarshaler interface\nfunc (st *SiblingType) UnmarshalJSON(data []byte) error {\n    // null value already handled by null.Var, \n    // so we don't need to check for that here\n\n\tstr := string(data)\n\tif str == \"brother\" {\n\t\t*st = Brother\n\t} else if str == \"sister\" {\n\t\t*st = Sister\n\t} else {\n\t\treturn fmt.Errorf(\"invalid type for %T\", st)\n\t}\n\n\treturn nil\n}\n\nvar p Person\nlog.Printf(\"%+v\", p)\n// {\n//     Name:       {set:false valid:false value:} \n//     Age:        {set:false valid:false value:0} \n//     BirthDate:  {set:false valid:false value:{wall:0 ext:0 loc:\u003cnil\u003e}} \n//     Books:      {set:false valid:false value:[]} \n//     ExamScores: {set:false valid:false value:map[]} \n//     Sibling:    {set:false valid:false value:{\n//             Name:   {set:false valid:false value:} \n//             Age:    {set:false valid:false value:0} \n//             Type:   {set:false valid:false value:0}\n//         }\n//     }\n// }\n\njsonStr1 := []byte(`{\"age\":25,\"name\":\"Peter\",\"sibling\":{\"age\":20,\"name\":\"Anna\",\"type\":\"sister\"}}`)\n_ = json.Unmarshal(jsonStr1, \u0026p)\nlog.Printf(\"%+v\", p)\n// {\n//     Name:       {set:true valid:true value:Peter} \n//     Age:        {set:true valid:true value:25} \n//     BirthDate:  {set:false valid:false value:{wall:0 ext:0 loc:\u003cnil\u003e}} \n//     Books:      {set:false valid:false value:[]} \n//     ExamScores: {set:false valid:false value:map[]} \n//     Sibling:    {set:true valid:true value:{\n//             Name:   {set:true valid:true value:Anna} \n//             Age:    {set:true valid:true value:20} \n//             Type:   {set:true valid:true value:0}\n//         }\n//     }\n// }\n\np = Person{}\njsonStr2 := []byte(`{\"age\":25,\"name\":\"Peter\",\"sibling\":{\"age\":20,\"name\":\"Anna\",\"type\":\"foo\"}}`)\nerr := json.Unmarshal(jsonStr2, \u0026p)\nlog.Printf(\"%v\", err)\n// invalid type for *SiblingType\n\np = Person{}\njsonStr3 := []byte(`{\"age\":25,\"name\":\"Peter\",\"sibling\":null}`)\n_ = json.Unmarshal(jsonStr3, \u0026p)\nlog.Printf(\"%+v\", p)\n// {\n//     Name:       {set:true valid:true value:Peter} \n//     Age:        {set:true valid:true value:25} \n//     BirthDate:  {set:false valid:false value:{wall:0 ext:0 loc:\u003cnil\u003e}} \n//     Books:      {set:false valid:false value:[]} \n//     ExamScores: {set:false valid:false value:map[]} \n//     Sibling:    {set:true valid:false value:{\n//             Name:   {set:false valid:false value:} \n//             Age:    {set:false valid:false value:0} \n//             Type:   {set:false valid:false value:0}\n//         }\n//     }\n// }\n```\n\n\n### 7. Use with the `database/sql` package\n```go\n// NOTE:\n// If the underlying value is not compatible with the database/sql package by default, \n// then implement sql.Scanner and driver.Valuer interfaces for the underlying type\n\nvar p Person\n\n// Exec\n// If any of the variables are not set or set to NULL, then NULL will be inserted\n_ = db.Exec(/* query */, p.Age, p.Name)\n\n// Scan\n// If any of the values scanned will be NULL, then the IsValid() will return false. \n// IsSet() will return true for every field used in the scan.\n_ = db.QueryRow(/* query */).Scan(\u0026p.Age, \u0026p.Name)\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmauserzjeh%2Fnull","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmauserzjeh%2Fnull","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmauserzjeh%2Fnull/lists"}