Skip to content
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

Patch bonus #252

Open
wants to merge 48 commits into
base: master
Choose a base branch
from
Open

Patch bonus #252

wants to merge 48 commits into from

Conversation

tofutim
Copy link

@tofutim tofutim commented Nov 13, 2015

@oysteinkrog I re-forked your project, so here is a consolidated pull request. It is a separate thought, but I wonder if you should rename this project to PCLSQLite, to go with PCLCrypto and PCLStorage, etc.

This fat PR contains:

  • dynamic Query, for lazy people who just want to "SELECT * FROM ..." with no predetermined type or mapping
  • remove Platform.WindowsPhoneApp81 which is not even used in nuget
  • switch Platform.WinRT to portable library covering Win8.1 and WP8.1
  • added tests for WinRT.Phone and UWP (based on Platform.WinRT)
  • added ability to have multiple queries in same CommandText, separated by ';', added tests
  • added named binding support, still need to add test
  • fix StressTest by using 'wal' and adding _locker to PreparedSQLiteInsertCommand and Task.Factory.CreateNew -> Task.Run
  • consolidate common test code and platform code into Shared Projects
  • fix broken CallsOnUnsupportedTypes as DateTimeOffset is now supported, use DivideByZeroException and Newtonsoft.Json serializer
  • get appveyor to work!

…in appveyor to allow 32-bit - maybe "platform:")
…ported type, instead of DateTimeOffset (which is supported), add Newtonsoft.Json to handle serialization
Conflicts:
	src/SQLite.Net.Platform.Generic/SQLiteApiGeneric.cs
	src/SQLite.Net.Platform.Generic/SQLiteApiGenericInternal.cs
	src/SQLite.Net.Platform.OSX/SQLiteApiOSX.cs
	src/SQLite.Net.Platform.OSX/SQliteApiOSXInternal.cs
	src/SQLite.Net.Platform.Win32/SQLiteApiWin32.cs
	src/SQLite.Net.Platform.Win32/SQliteApiWin32Internal.cs
	src/SQLite.Net.Platform.WinRT/SQLiteApiWinRT.cs
	src/SQLite.Net.Platform.XamarinAndroid/SQLiteApiAndroid.cs
	src/SQLite.Net.Platform.XamarinAndroid/SQLiteApiAndroidInternal.cs
	src/SQLite.Net.Platform.XamarinIOS.Unified/SQLiteApiIOS.cs
	src/SQLite.Net.Platform.XamarinIOS.Unified/SQLiteApiIOSInternal.cs
	src/SQLite.Net.Platform.XamarinIOS/SQLiteApiIOS.cs
	src/SQLite.Net.Platform.XamarinIOS/SQLiteApiIOSInternal.cs
…, adding locks to PreparedSqlLiteInsertCommand, delay before final count
@tofutim
Copy link
Author

tofutim commented Nov 13, 2015

apparently dynamic is not supported in Android and iOS, so I need to back that out.

@tofutim
Copy link
Author

tofutim commented Nov 14, 2015

I probably should switch the appveyor back to OSS for now, but it fails on a couple of the platform builds and never gets to the tests. There is an issue compiling Android and complains about two mscorlibs, however, it is an issue with Xamarin needing an update on appveyor.

@oysteinkrog
Copy link
Owner

This is really good work, but it's very messy :P
I'm going to go through it and clean up the commits a bit.
It's really awesome that we now have appveyor w/tests running, thank you so much:)

@oysteinkrog
Copy link
Owner

The generic platform is meant to use any local sqlite3 libraries available on the platform, adding binaries for appveyor goes against the purpose of it. An alternative might be to use appveyor to install sqlite before the tests are run.
I'm going to just make appveyor run the Win32 tests (as that platform nuget includes the necessary sqlite binaries).

@oysteinkrog
Copy link
Owner

I am not sure I want to merge the shared project stuff, as it feels like a move back to #define-based code (which I really don't like).
The multiquery stuff is nice I think, but needs a separate PR.

@tofutim
Copy link
Author

tofutim commented Nov 14, 2015

The shared project stuff is actually not so bad if you look at it. There is
almost no defined codes if you drop Windows Phone 8.

On Sat, Nov 14, 2015 at 4:25 AM, Øystein Krog [email protected]
wrote:

I am not sure I want to merge the shared project stuff, as it feels like a
move back to #define-based code (which I really don't like).
The multiquery stuff is nice I think, but needs a separate PR.


Reply to this email directly or view it on GitHub
#252 (comment)
.

@tofutim
Copy link
Author

tofutim commented Nov 14, 2015

To do the multi-query stuff, you have to copy and paste the same change for
each Platform. It is madness.

If you look at the shared code, there are only a handful of #if defines.
And I think some of those don't even have to be there. I think you can
close and initialize in WinRT

On Sat, Nov 14, 2015 at 8:27 AM, Tim Uy [email protected] wrote:

The shared project stuff is actually not so bad if you look at it. There
is almost no defined codes if you drop Windows Phone 8.

On Sat, Nov 14, 2015 at 4:25 AM, Øystein Krog [email protected]
wrote:

I am not sure I want to merge the shared project stuff, as it feels like
a move back to #define-based code (which I really don't like).
The multiquery stuff is nice I think, but needs a separate PR.


Reply to this email directly or view it on GitHub
#252 (comment)
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants