Skip to content

Commit f6394ab

Browse files
committed
2 parents 5897db9 + 75ca8f0 commit f6394ab

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

adapter.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func NewAdapter(connectionString string, options ...Option) persist.Adapter {
5454
option(a)
5555
}
5656

57-
db := client.Database(a.databaseName)
57+
db := a.client.Database(a.databaseName)
5858
a.createDatabaseIfNotExist(db)
5959
a.db = db
6060

@@ -377,3 +377,9 @@ func Collection(coll string) Option {
377377
a.collectionName = coll
378378
}
379379
}
380+
381+
func CosmosClient(client *cosmos.Client) Option {
382+
return func(a *adapter) {
383+
a.client = client
384+
}
385+
}

0 commit comments

Comments
 (0)