robertohuertasm / SQLite4Unity3d

SQLite made easy for Unity3d
MIT License
1.28k stars 265 forks source link

Feature/add time trace event #68

Closed TakuKobayashi closed 6 years ago

TakuKobayashi commented 7 years ago

Hello.

I want to receive to the traced execute sql time and output execution results to Unity Debug Log. Currently it is not possible to output execution results in the form of Unity Debug Log. So, I changed the way I receive it, like the 'TraceHandler'. And also it can be received with TimeSpan class instead of millisecond long.

robertohuertasm commented 7 years ago

@TakuKobayashi it seems that the sqlite.cs file included in the zip has more modifications.

TakuKobayashi commented 7 years ago

Yes, it is. Currently, There is not processing of "TraceHandler" to receive the result of SQL in sqlite.cs , but it is in zip. "TimeExecutionHandler" added this time is also the same as "TraceHandler", it is for Debug, so it was included in zip, but it was not included in sqlite.cs. Should I make it to sqlite.cs like zip?

robertohuertasm commented 7 years ago

I'm not sure of using this PR. I don't like the idea of having two separate scripts. They should be the same and if this is a debug feature then maybe it should be using some kind of compilation directives in order to opt out from this when in release mode.

TakuKobayashi commented 7 years ago

I also think the two separate scripts should be same. So, I will add a commit so that they have no differences.

TakuKobayashi commented 7 years ago

@robertohuertasm The integration of two separate scripts is complete. I fixed the Example/Assets/SQLite.cs to SQLite.cs in the SQLite4Unity3d.zip. And #60 have existed in the Example/Assets/SQLite.cs, but not in the SQLite4Unity3d.zip. So, I add #60 in the SQLite4Unity3d.zip too. I confirmed the two kind of scripts changes using the diff tool, and checked back past commits. Example/Assets/SQLite.cs did not seem to reflect the commit after #22.(#22, #30, #31, and so on) When I checked the new SQLite.cs on the Unity Editor, Android device and ipod touch 5th generation, it seemed to be working well.

robertohuertasm commented 7 years ago

Many thanks @TakuKobayashi! I'll try to have some during the weekend to review all this! 😄

robertohuertasm commented 6 years ago

@TakuKobayashi thanks for your great work! Sorry that my "weekend" lasted too much 😱