Skip to content

Commit f6b3bf5

Browse files
authored
Merge pull request #121 from wmetaw/master
Add NewDB to spanner.go
2 parents 2fc1610 + ca888b9 commit f6b3bf5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

database/spanner/spanner.go

+7
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,13 @@ type DB struct {
5555
data *spanner.Client
5656
}
5757

58+
func NewDB(admin sdb.DatabaseAdminClient, data spanner.Client) *DB {
59+
return &DB{
60+
admin: &admin,
61+
data: &data,
62+
}
63+
}
64+
5865
// WithInstance implements database.Driver
5966
func WithInstance(instance *DB, config *Config) (database.Driver, error) {
6067
if config == nil {

0 commit comments

Comments
 (0)