 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Overview ¶
Package db defines the database types and functions.
Package db defines the database types and functions.
Index ¶
- func Int4ToInt32(pgInt4 pgtype.Int4) int32
- func ListMigrations() ([]string, error)
- func NewInt4(t int64) pgtype.Int4
- func NewString(s string) pgtype.Text
- func NewTimestamp(t time.Time) pgtype.Timestamp
- func TextToString(pgText pgtype.Text) string
- func ViewMigration(file string) []byte
- type MigrationHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Int4ToInt32 ¶ added in v0.3.0
Int4ToInt32 extracts a Go int32 from pgtype.Int4, returning 0 if null
func ListMigrations ¶ added in v0.0.9
ListMigrations returns a list of all migration files
func NewTimestamp ¶ added in v0.0.6
NewTimestamp returns a new pgtype.Timestamp
func TextToString ¶ added in v0.3.0
TextToString extracts a Go string from pgtype.Text, returning empty string if null
func ViewMigration ¶ added in v0.0.9
Types ¶
type MigrationHandler ¶
type MigrationHandler struct {
	*migrate.Migrate
}
    func NewMigrationHandler ¶
func NewMigrationHandler() (*MigrationHandler, error)
func (*MigrationHandler) ForceVersion ¶ added in v0.0.10
func (m *MigrationHandler) ForceVersion(version int)
func (*MigrationHandler) MigrationStep ¶
func (m *MigrationHandler) MigrationStep(step int)
func (*MigrationHandler) RunMigrations ¶
func (m *MigrationHandler) RunMigrations() error
 Click to show internal directories. 
   Click to hide internal directories.