System.Data.SQLite
Check-in [eeebfe44be]
Not logged in

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

Overview
Comment:Fix compilation issue on the .NET Compact Framework.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: eeebfe44be2ad4ee2d090621a45ef36e0a0dcdb8
User & Date: mistachkin 2012-01-27 07:38:44
Context
2012-01-27
07:39
Modify release procedure doc to include testing of the built binaries. check-in: fc448fa649 user: mistachkin tags: trunk
07:38
Fix compilation issue on the .NET Compact Framework. check-in: eeebfe44be user: mistachkin tags: trunk
2012-01-26
08:21
Support global (per test run) connection flags in the unit test infrastructure to assist in debugging. check-in: 36579c6dfb user: mistachkin tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to System.Data.SQLite/SQLite3.cs.

1152
1153
1154
1155
1156
1157
1158

1159
1160
1161
1162
1163
1164
1165
1166
1167

1168
1169
1170
1171
1172
1173
1174
1175
1176
1177

1178
1179
1180
1181
1182

1183
1184
1185
1186
1187
1188
1189
    /// </summary>
    /// <returns>
    /// A boolean indicating whether or not the SQLite core library has been
    /// initialized for the current process.
    /// </returns>
    internal static bool StaticIsInitialized()
    {

        //
        // NOTE: Save the state of the logging class and then restore it
        //       after we are done to avoid logging too many false errors.
        //
        bool savedEnabled = SQLiteLog.Enabled;
        SQLiteLog.Enabled = false;

        try
        {

            //
            // NOTE: This method [ab]uses the fact that SQLite will always
            //       return SQLITE_ERROR for any unknown configuration option
            //       *unless* the SQLite library has already been initialized.
            //       In that case it will always return SQLITE_MISUSE.
            //
            int rc = UnsafeNativeMethods.sqlite3_config(
                (int)SQLiteConfigOpsEnum.SQLITE_CONFIG_NONE, null, (IntPtr)0);

            return (rc == /* SQLITE_MISUSE */ 21);

        }
        finally
        {
            SQLiteLog.Enabled = savedEnabled;
        }

    }

    /// <summary>
    /// Helper function to retrieve a column of data from an active statement.
    /// </summary>
    /// <param name="stmt">The statement being step()'d through</param>
    /// <param name="index">The column index to retrieve</param>







>









>










>





>







1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
    /// </summary>
    /// <returns>
    /// A boolean indicating whether or not the SQLite core library has been
    /// initialized for the current process.
    /// </returns>
    internal static bool StaticIsInitialized()
    {
#if !PLATFORM_COMPACTFRAMEWORK
        //
        // NOTE: Save the state of the logging class and then restore it
        //       after we are done to avoid logging too many false errors.
        //
        bool savedEnabled = SQLiteLog.Enabled;
        SQLiteLog.Enabled = false;

        try
        {
#endif
            //
            // NOTE: This method [ab]uses the fact that SQLite will always
            //       return SQLITE_ERROR for any unknown configuration option
            //       *unless* the SQLite library has already been initialized.
            //       In that case it will always return SQLITE_MISUSE.
            //
            int rc = UnsafeNativeMethods.sqlite3_config(
                (int)SQLiteConfigOpsEnum.SQLITE_CONFIG_NONE, null, (IntPtr)0);

            return (rc == /* SQLITE_MISUSE */ 21);
#if !PLATFORM_COMPACTFRAMEWORK
        }
        finally
        {
            SQLiteLog.Enabled = savedEnabled;
        }
#endif
    }

    /// <summary>
    /// Helper function to retrieve a column of data from an active statement.
    /// </summary>
    /// <param name="stmt">The statement being step()'d through</param>
    /// <param name="index">The column index to retrieve</param>