Merge pull request #121 from wmetaw/master

Add NewDB to spanner.go
This commit is contained in:
Dale Hui 2018-10-28 16:58:22 -07:00 committed by GitHub
commit f6b3bf548d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -55,6 +55,13 @@ type DB struct {
data *spanner.Client
}
func NewDB(admin sdb.DatabaseAdminClient, data spanner.Client) *DB {
return &DB{
admin: &admin,
data: &data,
}
}
// WithInstance implements database.Driver
func WithInstance(instance *DB, config *Config) (database.Driver, error) {
if config == nil {