Skip to content

Latest commit

 

History

History
22 lines (13 loc) · 688 Bytes

README.md

File metadata and controls

22 lines (13 loc) · 688 Bytes

Golang (Go) SQL+JSON+Validator Support for Null Database/SQL Types

SQL Null Field Types

  • sql.NullString
  • sql.NullBool
  • sql.NullInt64
  • sql.NullFloat64

Adds support to Null* field types for database/sql.

Validator library is:

Allows simultaneous use of validator validations, null sql values in struct fields for database/sql, and still support JSON Marshal and Unmarshal for those Null* fields.

Usage

Please see integration test files, in particular those for validation.

You need to register custom types for validator. See how it is done in integration tests too.