You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@shlatchz if you want to issue custom pragma statements, you need to do this every time you open a connection. Changing values via pragma statements do not persist across calls to sqlite_open_v2. At the moment, we don't have API in Microsoft.Data.Sqlite.SqlConnection to support executing something arbitrary (such as issuing pragma statements) everytime a connection opens.
Moving up a layer in the stack. EntityFramework Core has a class that wraps SqliteConnection. This wrapper handles opening/closing SqliteConnection and has its own logic for issuing pragma statements when connections open. See Microsoft.EntityFrameworkCore.Storage.Internal.SqliteRelationalConnection. EF lets you pass an connection object instead of a connection string if you want to manage the lifecycle of opening/closing a connection yourself. UseSqlite(DbConnection connection).
BTW just to make it explicit - we are not closing this because we aren't planning to implement it. We very much agree this is super useful, it's just already tracked as part of #626.
Activity
ErikEJ commentedon Apr 10, 2016
You need to do it in the same context as where you are doing the EF data access
shlatchz commentedon Apr 10, 2016
Can you please elaborate?
Are you saying that I have to do it each time I modify the DB?
rowanmiller commentedon Apr 15, 2016
@natemcmaster can you confirm?
rowanmiller commentedon May 11, 2016
@natemcmaster ping 😄
natemcmaster commentedon May 11, 2016
@shlatchz if you want to issue custom pragma statements, you need to do this every time you open a connection. Changing values via pragma statements do not persist across calls to
sqlite_open_v2. At the moment, we don't have API inMicrosoft.Data.Sqlite.SqlConnectionto support executing something arbitrary (such as issuing pragma statements) everytime a connection opens.Moving up a layer in the stack. EntityFramework Core has a class that wraps
SqliteConnection. This wrapper handles opening/closing SqliteConnection and has its own logic for issuing pragma statements when connections open. See Microsoft.EntityFrameworkCore.Storage.Internal.SqliteRelationalConnection. EF lets you pass an connection object instead of a connection string if you want to manage the lifecycle of opening/closing a connection yourself.UseSqlite(DbConnection connection).natemcmaster commentedon May 11, 2016
Remarking for triage: what is the work here? Add API to Microsoft.Data.Sqlite or EF?
5 remaining items
rowanmiller commentedon Jul 6, 2016
BTW just to make it explicit - we are not closing this because we aren't planning to implement it. We very much agree this is super useful, it's just already tracked as part of #626.
Allow journal mode configuration
Adds Benchmarks (#367)