System.Data.SQLite

Check-in [1f44df4816]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix compilation issues when the 'UseSqliteStandard' MSBuild property is used.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 1f44df4816475ba31b077fb6f148fc53572c8b8b
User & Date: mistachkin 2018-07-07 05:29:16.573
Context
2018-07-07
16:10
Make sure the assembly built for .NET Core is strong named signed. check-in: 51270bcb44 user: mistachkin tags: trunk
05:29
Fix compilation issues when the 'UseSqliteStandard' MSBuild property is used. check-in: 1f44df4816 user: mistachkin tags: trunk
2018-07-06
02:19
Include the statically linked native SQLite interop assembly project in the MSBuild solution files. check-in: 1c43c79665 user: mistachkin tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to System.Data.SQLite/SQLiteSession.cs.
795
796
797
798
799
800
801


802

803
804
805
806



807










808
809
810
811
812
813
814
815
816
            try
            {
                int nSql = 0;

                pSql = SQLiteString.Utf8IntPtrFromString(LockNopSql, ref nSql);

                IntPtr pRemain = IntPtr.Zero;


                int nRemain = 0;


                SQLiteErrorCode rc = UnsafeNativeMethods.sqlite3_prepare_interop(
                    GetIntPtr(), pSql, nSql, ref statement, ref pRemain,
                    ref nRemain);














                if (rc != SQLiteErrorCode.Ok)
                    throw new SQLiteException(rc, "sqlite3_prepare_interop");
            }
            finally
            {
                if (pSql != IntPtr.Zero)
                {
                    SQLiteMemory.Free(pSql);
                    pSql = IntPtr.Zero;







>
>

>




>
>
>

>
>
>
>
>
>
>
>
>
>

|







795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
            try
            {
                int nSql = 0;

                pSql = SQLiteString.Utf8IntPtrFromString(LockNopSql, ref nSql);

                IntPtr pRemain = IntPtr.Zero;

#if !SQLITE_STANDARD
                int nRemain = 0;
                string functionName = "sqlite3_prepare_interop";

                SQLiteErrorCode rc = UnsafeNativeMethods.sqlite3_prepare_interop(
                    GetIntPtr(), pSql, nSql, ref statement, ref pRemain,
                    ref nRemain);
#else
#if USE_PREPARE_V2
                string functionName = "sqlite3_prepare_v2";

                SQLiteErrorCode rc = UnsafeNativeMethods.sqlite3_prepare_v2(
                    GetIntPtr(), pSql, nSql, ref statement, ref pRemain);
#else
                string functionName = "sqlite3_prepare";

                SQLiteErrorCode rc = UnsafeNativeMethods.sqlite3_prepare(
                    GetIntPtr(), pSql, nSql, ref statement, ref pRemain);
#endif
#endif

                if (rc != SQLiteErrorCode.Ok)
                    throw new SQLiteException(rc, functionName);
            }
            finally
            {
                if (pSql != IntPtr.Zero)
                {
                    SQLiteMemory.Free(pSql);
                    pSql = IntPtr.Zero;
829
830
831
832
833
834
835



836
837


838




839
840
841
842
843
844
845
846
847
        public void Unlock()
        {
            CheckDisposed();

            if (statement == IntPtr.Zero)
                return;




            SQLiteErrorCode rc = UnsafeNativeMethods.sqlite3_finalize_interop(
                statement);







            if (rc != SQLiteErrorCode.Ok)
                throw new SQLiteException(rc, "sqlite3_finalize_interop");

            statement = IntPtr.Zero;
        }
        #endregion

        ///////////////////////////////////////////////////////////////////////








>
>
>


>
>

>
>
>
>

|







845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
        public void Unlock()
        {
            CheckDisposed();

            if (statement == IntPtr.Zero)
                return;

#if !SQLITE_STANDARD
            string functionName = "sqlite3_finalize_interop";

            SQLiteErrorCode rc = UnsafeNativeMethods.sqlite3_finalize_interop(
                statement);
#else
            string functionName = "sqlite3_finalize";

            SQLiteErrorCode rc = UnsafeNativeMethods.sqlite3_finalize(
                statement);
#endif

            if (rc != SQLiteErrorCode.Ok)
                throw new SQLiteException(rc, functionName);

            statement = IntPtr.Zero;
        }
        #endregion

        ///////////////////////////////////////////////////////////////////////