Skip to content

Commit

Permalink
fix for maxresults being reset on adapter.Open()
Browse files Browse the repository at this point in the history
  • Loading branch information
or-else committed Mar 21, 2019
1 parent 8a9f103 commit 0a77e8e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion server/db/mysql/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ func (a *adapter) Open(jsonconfig string) error {
a.dbName = defaultDatabase
}

a.maxResults = defaultMaxResults
if a.maxResults <= 0 {
a.maxResults = defaultMaxResults
}

// This just initializes the driver but does not open the network connection.
a.db, err = sqlx.Open("mysql", a.dsn)
Expand Down
4 changes: 3 additions & 1 deletion server/db/rethinkdb/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ func (a *adapter) Open(jsonconfig string) error {
a.dbName = config.Database
}

a.maxResults = defaultMaxResults
if a.maxResults <= 0 {
a.maxResults = defaultMaxResults
}

opts.Database = a.dbName
opts.Username = config.Username
Expand Down

0 comments on commit 0a77e8e

Please sign in to comment.