Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Thor-x86/nullable
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: tee8z/nullable
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Able to merge. These branches can be automatically merged.
  • 7 commits
  • 24 files changed
  • 2 contributors

Commits on Dec 15, 2022

  1. changed to numeric

    tee8z committed Dec 15, 2022
    Copy the full SHA
    1b81494 View commit details
  2. update mod file

    tee8z committed Dec 15, 2022
    Copy the full SHA
    5591ac9 View commit details
  3. changed imports

    tee8z committed Dec 15, 2022
    Copy the full SHA
    0687f25 View commit details
  4. remove conversion to binary

    tee8z committed Dec 15, 2022
    Copy the full SHA
    6c3da86 View commit details

Commits on Feb 2, 2023

  1. Copy the full SHA
    fa12996 View commit details
  2. added check

    tee8z committed Feb 2, 2023
    Copy the full SHA
    adf2185 View commit details
  3. Merge pull request #1 from tee8z/non-utf8-string

    [APP-266] nullable strings to always yield utf8 string
    tee8z authored Feb 2, 2023
    Copy the full SHA
    46c7603 View commit details
Showing with 62 additions and 137 deletions.
  1. +11 −11 README.md
  2. +1 −1 bool_test.go
  3. +1 −1 byte_test.go
  4. +1 −1 bytes_test.go
  5. +1 −1 float32_test.go
  6. +1 −1 float64_test.go
  7. +1 −1 go.mod
  8. +1 −63 go.sum
  9. +1 −1 int16_test.go
  10. +1 −1 int32_test.go
  11. +1 −1 int64_test.go
  12. +1 −1 int8_test.go
  13. +1 −1 int_test.go
  14. +1 −1 json_test.go
  15. +7 −0 string.go
  16. +20 −1 string_test.go
  17. +1 −1 time_test.go
  18. +1 −1 uint16_test.go
  19. +2 −8 uint32.go
  20. +1 −13 uint32_test.go
  21. +3 −8 uint64.go
  22. +1 −17 uint64_test.go
  23. +1 −1 uint8_test.go
  24. +1 −1 uint_test.go
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Nullable SQL Data Types for Golang (GO)

[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/Thor-x86/nullable/blob/master/LICENSE)
[![Open Issues](https://img.shields.io/github/issues-raw/Thor-x86/nullable)](https://github.com/Thor-x86/nullable/issues)
[![Open Pull Request](https://img.shields.io/github/issues-pr-raw/Thor-x86/nullable)](https://github.com/Thor-x86/nullable/pulls)
[![Unit Test Result](https://travis-ci.org/Thor-x86/nullable.svg?branch=master)](https://travis-ci.org/Thor-x86/nullable)
[![Unit Test Coverage](https://codecov.io/gh/Thor-x86/nullable/branch/master/graph/badge.svg)](https://codecov.io/gh/Thor-x86/nullable)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/tee8z/nullable/blob/master/LICENSE)
[![Open Issues](https://img.shields.io/github/issues-raw/tee8z/nullable)](https://github.com/tee8z/nullable/issues)
[![Open Pull Request](https://img.shields.io/github/issues-pr-raw/tee8z/nullable)](https://github.com/tee8z/nullable/pulls)
[![Unit Test Result](https://travis-ci.org/tee8z/nullable.svg?branch=master)](https://travis-ci.org/tee8z/nullable)
[![Unit Test Coverage](https://codecov.io/gh/tee8z/nullable/branch/master/graph/badge.svg)](https://codecov.io/gh/tee8z/nullable)

Helps you convert every SQL [nullable](https://www.w3schools.com/sql/sql_null_values.asp) data types into Golang's supported types. So you don't have to create your own [scanner](https://www.geeksforgeeks.org/fmt-scan-function-in-golang-with-examples/) and [valuer](https://documentation.help/Golang/database_sql_drive.htm#Valuer) only for.. let's say... `BIGINT UNSIGNED NULL`

@@ -45,7 +45,7 @@ Helps you convert every SQL [nullable](https://www.w3schools.com/sql/sql_null_va
Very easy! first of all, let's install like normal Go packages

```bash
go get github.com/Thor-x86/nullable
go get github.com/tee8z/nullable
```

## Create a new variable
@@ -56,7 +56,7 @@ Remember, all you need to have is a basic variable and a nullable variable creat
import (
"fmt"
"gorm.io/gorm"
"github.com/Thor-x86/nullable"
"github.com/tee8z/nullable"
)

func main() {
@@ -81,7 +81,7 @@ You'll use `.Set(&anotherBasicVar)` to change existing variable. Example:
import (
"fmt"
"gorm.io/gorm"
"github.com/Thor-x86/nullable"
"github.com/tee8z/nullable"
)

func main() {
@@ -107,7 +107,7 @@ Also another example for uint64:
import (
"fmt"
"gorm.io/gorm"
"github.com/Thor-x86/nullable"
"github.com/tee8z/nullable"
)

func main() {
@@ -135,7 +135,7 @@ If you thinking it's not really convenient to create a basic variable first, the
import (
"fmt"
"gorm.io/gorm"
"github.com/Thor-x86/nullable"
"github.com/tee8z/nullable"
)

func main() {
@@ -191,4 +191,4 @@ Q: I found security issue, can I open issue for this?
A: Please don't. You risking another users' security. Email me instead at athaariqa@gmail.com

Q: This FAQ section didn't answer my problem.
A: Feel free to [find issue](https://github.com/Thor-x86/nullable/issues) regarding the problem. If you found nothing, you are allowed to open a new issue.
A: Feel free to [find issue](https://github.com/tee8z/nullable/issues) regarding the problem. If you found nothing, you are allowed to open a new issue.
2 changes: 1 addition & 1 deletion bool_test.go
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ import (

"gorm.io/gorm/utils/tests"

"github.com/Thor-x86/nullable"
"github.com/tee8z/nullable"
)

func TestScanBool(t *testing.T) {
2 changes: 1 addition & 1 deletion byte_test.go
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ package nullable_test
import (
"testing"

"github.com/Thor-x86/nullable"
"github.com/tee8z/nullable"
"gorm.io/gorm/utils/tests"
)

2 changes: 1 addition & 1 deletion bytes_test.go
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ package nullable_test
import (
"testing"

"github.com/Thor-x86/nullable"
"github.com/tee8z/nullable"
"gorm.io/gorm/utils/tests"
)

2 changes: 1 addition & 1 deletion float32_test.go
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ package nullable_test
import (
"testing"

"github.com/Thor-x86/nullable"
"github.com/tee8z/nullable"
"gorm.io/gorm/utils/tests"
)

2 changes: 1 addition & 1 deletion float64_test.go
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ package nullable_test
import (
"testing"

"github.com/Thor-x86/nullable"
"github.com/tee8z/nullable"
"gorm.io/gorm/utils/tests"
)

2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/Thor-x86/nullable
module github.com/tee8z/nullable

go 1.15

Loading