This project has moved and is read-only. For the latest updates, please go here.

Open existing RDF store

Oct 13, 2015 at 6:51 PM
This works if the store doesn't exist...

var client = BrightstarService.GetClient( "Type=embedded;StoresDirectory=c:\Brightstar\Bob");
        string storeName = "Store";
But fails if the store does exist...

There doesn't appear to be a client.OpenStore method...

What did I miss....
Oct 14, 2015 at 12:24 PM
There isn't an explicit OpenStore method. Instead you just pass the name of the store in as the first parameter to most of the client operations:
client.ExecuteTransaction(storeName, transactionData);
var sparqlResult = client.ExecuteQuery(storeName, sparqlQuery);
When using the embedded store, BrightstarDB will automatically open the store and start a background thread for processing writes. To exit cleanly you should ensure you call BrightstardService.Shutdown() when the application exits - this will just signal the background threads to terminate and block until they do (and if you aren't using the embedded store, it is basically a no-op).

There is more on the APIs here:

Hope this helps!