Ian Vink
Ian Vink

Reputation: 68790

MonoTouch: SQLite-net thread safety and SQLiteConfig.Serialized

I am trying to make SQLite default to be "more" thread-safe by calling something like this code:

SqliteConnection.SetConfig (SQLiteConfig.Serialized);

I think it's related to setting:

 DSQLITE_THREADSAFE=1

But how to do that is a mystery too.

Using the Awesome SQLite-NET ORM for MonoTouch, there doesn't seem to be a way to set SQLiteConfig.Serialized?

Ideas?

Upvotes: 1

Views: 1628

Answers (1)

poupou
poupou

Reputation: 43553

My (not really recent) copy of SQLite.cs has this method defined in SQLite3 type:

public static extern Result Config (ConfigOption option);

and ConfigOption is defined as:

public enum ConfigOption : int
{
    SingleThread = 1,
    MultiThread = 2,
    Serialized = 3
}

Upvotes: 2

Related Questions