Commit b6222954 authored by Levin Zimmermann's avatar Levin Zimmermann

zodb/storage: Delegate zurl opts extract to drivers

We can't extract storage client options in general-purpose zodburi
opener, because zodburi aren't standardized. Each storage may define its
own syntax, therefore it is better if this is done decentralized and
independent in each local storage driver.
parent 4c9414ea
...@@ -106,10 +106,6 @@ func OpenDriver(ctx context.Context, zurl string, opt *DriverOptions) (_ IStorag ...@@ -106,10 +106,6 @@ func OpenDriver(ctx context.Context, zurl string, opt *DriverOptions) (_ IStorag
return nil, InvalidTid, err return nil, InvalidTid, err
} }
// XXX commonly handle some options from url -> opt?
// (e.g. ?readonly=1 -> opt.ReadOnly=true + remove ?readonly=1 from URL)
// ----//---- nocache
opener, ok := driverRegistry[u.Scheme] opener, ok := driverRegistry[u.Scheme]
if !ok { if !ok {
return nil, InvalidTid, fmt.Errorf("zodb: URL scheme \"%s:\" not supported", u.Scheme) return nil, InvalidTid, fmt.Errorf("zodb: URL scheme \"%s:\" not supported", u.Scheme)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment