https://github.com/nktmys/sqlnull
sqlnull is utilities for working with sql.Null types in Go.
https://github.com/nktmys/sqlnull
go golang null sql
Last synced: 9 months ago
JSON representation
sqlnull is utilities for working with sql.Null types in Go.
- Host: GitHub
- URL: https://github.com/nktmys/sqlnull
- Owner: nktmys
- License: mit
- Created: 2025-06-27T18:46:09.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-06-28T02:07:30.000Z (9 months ago)
- Last Synced: 2025-06-28T02:26:12.388Z (9 months ago)
- Topics: go, golang, null, sql
- Language: Go
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sqlnull
[](https://github.com/nktmys/sqlnull/releases) [](https://godoc.org/github.com/nktmys/sqlnull) [](https://goreportcard.com/report/github.com/nktmys/sqlnull)
`sqlnull` is utilities for working with sql.Null types in Go.
## Installation
1. Get the package
```sh
go get github.com/nktmys/sqlnull
```
2. Import the package
```go
import "github.com/nktmys/sqlnull"
```
## Examples
This code:
```go
str := "hello"
v1 := sqlnull.From(str)
v2 := sqlnull.FromStr(&str)
p1 := sqlnull.Prt(str)
p2 := sqlnull.PrtOrNil(&str)
```
## Contributing
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.
## License
This project is licensed under the MIT License. See the [LICENSE](https://github.com/nktmys/sqlnull/blob/main/LICENSE) file for details.