Skip to content

Commit 38168fb

Browse files
jfontankuba--
authored andcommitted
server: make gitbase the current database (#593)
Signed-off-by: Javi Fontan <[email protected]>
1 parent 901821e commit 38168fb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmd/gitbase/command/server.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,9 @@ func (c *Server) buildDatabase() error {
206206
return err
207207
}
208208

209-
c.engine.AddDatabase(sql.NewInformationSchemaDatabase(c.engine.Catalog))
210209
c.engine.AddDatabase(gitbase.NewDatabase(c.Name))
210+
c.engine.AddDatabase(sql.NewInformationSchemaDatabase(c.engine.Catalog))
211+
c.engine.Catalog.SetCurrentDatabase(c.Name)
211212
logrus.WithField("db", c.Name).Debug("registered database to catalog")
212213

213214
c.engine.Catalog.RegisterFunctions(function.Functions)

0 commit comments

Comments
 (0)