...

Source file src/github.com/jackc/pgtype/generic_text.go

Documentation: github.com/jackc/pgtype

     1  package pgtype
     2  
     3  import (
     4  	"database/sql/driver"
     5  )
     6  
     7  // GenericText is a placeholder for text format values that no other type exists
     8  // to handle.
     9  type GenericText Text
    10  
    11  func (dst *GenericText) Set(src interface{}) error {
    12  	return (*Text)(dst).Set(src)
    13  }
    14  
    15  func (dst GenericText) Get() interface{} {
    16  	return (Text)(dst).Get()
    17  }
    18  
    19  func (src *GenericText) AssignTo(dst interface{}) error {
    20  	return (*Text)(src).AssignTo(dst)
    21  }
    22  
    23  func (dst *GenericText) DecodeText(ci *ConnInfo, src []byte) error {
    24  	return (*Text)(dst).DecodeText(ci, src)
    25  }
    26  
    27  func (src GenericText) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) {
    28  	return (Text)(src).EncodeText(ci, buf)
    29  }
    30  
    31  // Scan implements the database/sql Scanner interface.
    32  func (dst *GenericText) Scan(src interface{}) error {
    33  	return (*Text)(dst).Scan(src)
    34  }
    35  
    36  // Value implements the database/sql/driver Valuer interface.
    37  func (src GenericText) Value() (driver.Value, error) {
    38  	return (Text)(src).Value()
    39  }
    40  

View as plain text