Which SQLite?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Which SQLite?

Edward Ned Harvey (mono)

For cross-platform compatibility with mono on mac/linux, and .NET on windows...  What is recommended SQLite?

 

When I add System.Data.SQLite.Core via NuGet in windows... it seems to be incompatible with mono...  It looks like there is SQLite built-in to mono via Mono.Data.SQLite, and I could easily enough do something like this:

#if UNIX

using Mono.Data.SQLite;

#else

using System.Data.SQLite;

#endif

 

But then there are some API incompatibilities, such as:

        private void InsertIntoSql(SqliteConnection dbConn)

        versus

        private void InsertIntoSql(SQLiteConnection dbConn)

 

I noticed the existence of "csharp-sqlite" project...  Which would probably work, but no updates in over a year...

 

I've found other people on the internet asking this same question, but nobody coming up with a good answer...

 


_______________________________________________
Mono-list maillist  -  [hidden email]
http://lists.ximian.com/mailman/listinfo/mono-list
Reply | Threaded
Open this post in threaded view
|

Re: Which SQLite?

luke
I will respond with what we're doing with Media Browser in case anyone can offer suggestions. We are using the nuget package for windows. There is only one single line of code that knows our data provider is Sqlite:


Then for mono we remap the references to a different assembly:


Finally, the mono build has native assemblies for different targets:



On Tue, Jul 15, 2014 at 2:58 PM, Edward Ned Harvey (mono) <[hidden email]> wrote:

For cross-platform compatibility with mono on mac/linux, and .NET on windows...  What is recommended SQLite?

 

When I add System.Data.SQLite.Core via NuGet in windows... it seems to be incompatible with mono...  It looks like there is SQLite built-in to mono via Mono.Data.SQLite, and I could easily enough do something like this:

#if UNIX

using Mono.Data.SQLite;

#else

using System.Data.SQLite;

#endif

 

But then there are some API incompatibilities, such as:

        private void InsertIntoSql(SqliteConnection dbConn)

        versus

        private void InsertIntoSql(SQLiteConnection dbConn)

 

I noticed the existence of "csharp-sqlite" project...  Which would probably work, but no updates in over a year...

 

I've found other people on the internet asking this same question, but nobody coming up with a good answer...

 


_______________________________________________
Mono-list maillist  -  [hidden email]
http://lists.ximian.com/mailman/listinfo/mono-list




--
Luke Pulverenti

_______________________________________________
Mono-list maillist  -  [hidden email]
http://lists.ximian.com/mailman/listinfo/mono-list