-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Your platform does not support FileStream.Lock #23
Comments
Hello @akucheck, looks like you are running tabula-rasa project. Setting the connection string happens in here in case you using the local database, which uses the absolute file name of the databse as the connection string. You can override that and use the following instead: let createDatabaseUsing store =
let mapper = FSharpBsonMapper()
match store with
| Store.InMemory ->
let memoryStream = new System.IO.MemoryStream()
new LiteDatabase(memoryStream, mapper)
| Store.LocalDatabase ->
let dbFile = Environment.databaseFilePath
// extend the connection string here
let connectionString = sprintf "Filename=%s; Mode=Exclusive" dbFile
new LiteDatabase(connectionString , mapper) Can you check whether this fixes the problem for you? |
It does indeed fix the problem. Thanks much!
On to playing with this puppy to learn more about SAFE-stack.
ak
…On Sun, Feb 17, 2019 at 5:20 PM Zaid Ajaj ***@***.***> wrote:
Hello @akucheck <https://github.com/akucheck>, looks like you are running
tabula-rasa project. Setting the connection string happens in here
<https://github.com/Zaid-Ajaj/tabula-rasa/blob/master/Server/Storage.fs#L31-L33>
in case you using the local database, which uses the absolute file name of
the databse as the connection string.
You can override that and use the following instead:
let createDatabaseUsing store =
let mapper = FSharpBsonMapper()
match store with
| Store.InMemory ->
let memoryStream = new System.IO.MemoryStream()
new LiteDatabase(memoryStream, mapper)
| Store.LocalDatabase ->
let dbFile = Environment.databaseFilePath
// extend the connection string here
let connectionString = sprintf "Filename=%s; Mode=Exclusive" dbFile
new LiteDatabase(connectionString , mapper)
Can you check whether this fixes the problem for you?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#23 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADvyvC_vxILuknk7cRgiaJKv8HuKEbPks5vOf_AgaJpZM4a_6tx>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It appears that LiteDB now needs a config setting for mode=exclusive on MacOS. I cannot find a way to do this. On initial load, once compile has finished I'm getting this:
The text was updated successfully, but these errors were encountered: