-------------------------------------------------------- OpenStoreCollection returns collection based on a persisted store in a directory. Updates to the collection will be persisted. An empty directory starts an empty collection. Both the store and collection should be closed by the caller when
(dir string, options StoreOptions, persistOptions StorePersistOptions)
| 333 | // empty directory starts an empty collection. Both the store and |
| 334 | // collection should be closed by the caller when done. |
| 335 | func OpenStoreCollection(dir string, options StoreOptions, |
| 336 | persistOptions StorePersistOptions) (*Store, Collection, error) { |
| 337 | store, err := OpenStore(dir, options) |
| 338 | if err != nil { |
| 339 | return nil, nil, err |
| 340 | } |
| 341 | |
| 342 | coll, err := store.OpenCollection(options, persistOptions) |
| 343 | if err != nil { |
| 344 | store.Close() |
| 345 | return nil, nil, err |
| 346 | } |
| 347 | |
| 348 | return store, coll, nil |
| 349 | } |
| 350 | |
| 351 | // -------------------------------------------------------- |
| 352 |
searching dependent graphs…