Skip to content

Commit

Permalink
#10 Build tool to write/update MassBank records to database
Browse files Browse the repository at this point in the history
- db connection
  • Loading branch information
David Rauh committed Jan 30, 2023
1 parent 3aac3d1 commit d75c80e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions cmd/mb3dbtool/main.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
package main

import "github.com/MassBank/MassBank3/pkg/database"

func main() {
database, err := database.NewMongoDB()
if err != nil {
panic(err)
}
database.Connect()

}
2 changes: 1 addition & 1 deletion pkg/database/mongodb.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func (self *Mb3MongoDB) UpdateRecord(record massbank.Massbank, add bool) error {
panic("implement me")
}

func newMongoDB() (*Mb3MongoDB, error) {
func NewMongoDB() (*Mb3MongoDB, error) {
return &Mb3MongoDB{
user: "massbank3",
pwd: "massbank3password",
Expand Down

0 comments on commit d75c80e

Please sign in to comment.