-
Notifications
You must be signed in to change notification settings - Fork 533
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement GetLatestVersion for all natively supported dialects (#758)
- Loading branch information
Showing
15 changed files
with
135 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,27 @@ | ||
package dialectquery | ||
|
||
// Querier is the interface that wraps the basic methods to create a dialect | ||
// specific query. | ||
// Querier is the interface that wraps the basic methods to create a dialect specific query. | ||
type Querier interface { | ||
// CreateTable returns the SQL query string to create the db version table. | ||
CreateTable(tableName string) string | ||
|
||
// InsertVersion returns the SQL query string to insert a new version into | ||
// the db version table. | ||
// InsertVersion returns the SQL query string to insert a new version into the db version table. | ||
InsertVersion(tableName string) string | ||
|
||
// DeleteVersion returns the SQL query string to delete a version from | ||
// the db version table. | ||
// DeleteVersion returns the SQL query string to delete a version from the db version table. | ||
DeleteVersion(tableName string) string | ||
|
||
// GetMigrationByVersion returns the SQL query string to get a single | ||
// migration by version. | ||
// GetMigrationByVersion returns the SQL query string to get a single migration by version. | ||
// | ||
// The query should return the timestamp and is_applied columns. | ||
GetMigrationByVersion(tableName string) string | ||
|
||
// ListMigrations returns the SQL query string to list all migrations in | ||
// descending order by id. | ||
// ListMigrations returns the SQL query string to list all migrations in descending order by id. | ||
// | ||
// The query should return the version_id and is_applied columns. | ||
ListMigrations(tableName string) string | ||
|
||
// GetLatestVersion returns the SQL query string to get the last version_id from the db version | ||
// table. Returns a nullable int64 value. | ||
GetLatestVersion(tableName string) string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters