Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A collection of null types for the sql package

License

NotificationsYou must be signed in to change notification settings

gobuffalo/nulls

Repository files navigation

This package should be used in place of the built-in null types in thesql package.

The real benefit of this packages comes in its implementation ofMarshalJSON andUnmarshalJSON to properly encode/decodenull values.

Installation

$ go get github.com/gobuffalo/nulls

Supported Datatypes

  • string (nulls.String) - Replacessql.NullString
  • int64 (nulls.Int64) - Replacessql.NullInt64
  • float64 (nulls.Float64) - Replacessql.NullFloat64
  • bool (nulls.Bool) - Replacessql.NullBool
  • []byte (nulls.ByteSlice)
  • float32 (nulls.Float32)
  • int (nulls.Int)
  • int32 (nulls.Int32)
  • uint32 (nulls.UInt32)
  • time.Time (nulls.Time)
  • uuid.UUID (nulls.UUID)

[8]ページ先頭

©2009-2025 Movatter.jp