pgjsonb

package module
v0.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 4, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

README

PostgreSQL jsonb type support for go

go workflow

This is a small package to support PostgreSQL jsonb data type.

Features

  1. Fully tested.
  2. Supports PostgreSQL jsonb type by sql Scanner and Valuer interfaces
  3. Supports go json Marshaller and Unmarshaller interfaces
  4. Supports go Stringer for json printing

Installation

To add the package to your project run -

go get -u github.com/asif-mahmud/pg-jsonb
Documentation

godoc: https://pkg.go.dev/github.com/asif-mahmud/pg-jsonb

Version history

Version 0.8.0

Initial version with tests for scanner and valuer interfaces.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSONB

type JSONB struct {
	// contains filtered or unexported fields
}

Type to support PostgreSQL jsonb data type.

func New

func New(value any) JSONB

func (*JSONB) Get

func (j *JSONB) Get() any

func (JSONB) MarshalJSON

func (j JSONB) MarshalJSON() ([]byte, error)

func (*JSONB) Scan

func (j *JSONB) Scan(value any) error

func (*JSONB) Set

func (j *JSONB) Set(value any)

func (JSONB) String

func (j JSONB) String() string

func (*JSONB) UnmarshalJSON

func (j *JSONB) UnmarshalJSON(data []byte) error

func (JSONB) Value

func (j JSONB) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL