Documentation
¶
Index ¶
- Constants
- func Handle(command string, bundle SQLBundle) error
- func OpenDBWithDriver(driver string, dbstring string) (*sql.DB, error)
- func SetDialect(d string) error
- func SetLogWriter(writer io.Writer)
- func SetVersion(v string)
- type Argument
- type Command
- type DbHistory
- type DbVersion
- type MigrationSQL
- type MigrationScript
- type OracleDialect
- type PackageJSON
- type PostgresDialect
- type SQLBundle
- func (sb *SQLBundle) Clean() error
- func (sb *SQLBundle) Create() error
- func (sb *SQLBundle) Downgrade() error
- func (sb *SQLBundle) Init() error
- func (sb *SQLBundle) Install() error
- func (sb *SQLBundle) ListMigrations() error
- func (sb *SQLBundle) Pack() error
- func (sb *SQLBundle) Publish() error
- func (sb *SQLBundle) ReadVersion() string
- func (sb *SQLBundle) Upgrade() error
- type SQLDialect
- type SQLiteDialect
Constants ¶
View Source
const ( ParserStarted int = iota // 0 ParserUpBegin // 1 ParserDownBegin // 3 ParserClosed )
View Source
const PACKAGE_JSON = "package.json"
View Source
const TIME_FORMAT = "20060102150405"
Variables ¶
This section is empty.
Functions ¶
func OpenDBWithDriver ¶
OpenDBWithDriver creates a connection a database, and modifies goose internals to be compatible with the supplied driver by calling SetDialect.
func SetLogWriter ¶
func SetVersion ¶ added in v1.2.1
func SetVersion(v string)
Types ¶
type Command ¶
func ReadArgument ¶
type DbHistory ¶
type MigrationSQL ¶
type MigrationScript ¶
type MigrationScript struct {
AppVersion string
Group string
Artifact string
Version string
FilePath string
FileName string
NextScript *MigrationScript
Ignore bool
}
func (*MigrationScript) ForEach ¶ added in v1.3.0
func (ms *MigrationScript) ForEach(f func(m MigrationScript) error) error
func (*MigrationScript) ListAll ¶
func (ms *MigrationScript) ListAll()
type OracleDialect ¶
type OracleDialect struct{}
type PackageJSON ¶
type PackageJSON struct {
GroupId string `json:"group"`
ArtifactId string `json:"artifact"`
Version string `json:"version"`
Dependencies []string `json:"dependencies"`
}
func ReadPackageJSON ¶
func ReadPackageJSON(file string) (config PackageJSON, err error)
type PostgresDialect ¶
type PostgresDialect struct{}
type SQLBundle ¶
type SQLBundle struct {
Argument
Config *PackageJSON
WorkingDir string
SourceDir string
BuildDir string
DepsDir string
ConfigFile string
}
func NewSQLBundle ¶
func (*SQLBundle) ListMigrations ¶
func (*SQLBundle) ReadVersion ¶
type SQLDialect ¶
type SQLDialect interface {
// contains filtered or unexported methods
}
func GetDialect ¶
func GetDialect() SQLDialect
type SQLiteDialect ¶ added in v1.5.0
type SQLiteDialect struct{}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.