22 lines
340 B
Go
22 lines
340 B
Go
|
package db
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"th7/data/core"
|
||
|
)
|
||
|
|
||
|
type DummyAdapter struct {
|
||
|
}
|
||
|
|
||
|
func NewDummyAdapter(dbInfo map[string]interface{}) (*DummyAdapter, error) {
|
||
|
return &DummyAdapter{}, nil
|
||
|
}
|
||
|
|
||
|
func (d *DummyAdapter) Close() {
|
||
|
fmt.Println("Closing DB ...")
|
||
|
}
|
||
|
|
||
|
func (d *DummyAdapter) Save(data core.Data) {
|
||
|
fmt.Println("Saving data to DB ...")
|
||
|
}
|