1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-19 13:19:43 +02:00

Make storage providers generate row limit clause

This commit is contained in:
Harvey Kandola 2019-04-04 12:08:57 +01:00
parent 8515a77403
commit 2ddd7ada9b
5 changed files with 36 additions and 0 deletions

View file

@ -364,6 +364,11 @@ func (p MySQLProvider) IsFalse() string {
return "0"
}
// RowLimit returns SQL for limiting number of rows returned.
func (p MySQLProvider) RowLimit(max int) string {
return fmt.Sprintf("LIMIT %d", max)
}
// convertDatabaseVersion turns database version string as major,minor,patch numerics.
func convertDatabaseVersion(v string) (ints []int, err error) {
ints = []int{0, 0, 0}