Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var SavePoint = sqlitex.Save
Functions ¶
func GenerateInValues ¶
GenerateInValues generates type safe values for IN ( ... )
func GenerateMultiLikes ¶
GenerateMultiLikes genrates segments of sql for using same files but with diffrent LIKE value
Types ¶
type Conn ¶
Reason behind this is that I don't want to import two packages that starts with sqlite into my project I can use the type alias in my project
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
Database struct which holds pool of connection
type MigrationRunner ¶
type MigrationRunner struct {
// contains filtered or unexported fields
}
func NewMigrationRunner ¶
func NewMigrationRunner(db *Database, migrations ...Migration) (*MigrationRunner, error)
NewMigrationRunner creates a runner that facilitates up and down migration
func (*MigrationRunner) Down ¶
func (m *MigrationRunner) Down(ctx context.Context) error
Down goes through all migration in downward direction, if any of the migration step fails, it returns an error. The whole down is protected by transaction. So all need to be success in order for down to be success
Click to show internal directories.
Click to hide internal directories.