Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | 1.0.32.0 |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | sourceforge |
Files: | files | file ages | folders |
SHA1: |
6b4fd5077c6ffb6dcc0d78b1301bcbaf |
User & Date: | rmsimpson 2006-08-06 17:55:29.000 |
Context
2006-08-06
| ||
18:17 | 1.0.32.0 check-in: 71293812a7 user: rmsimpson tags: sourceforge | |
17:55 | 1.0.32.0 check-in: 6b4fd5077c user: rmsimpson tags: sourceforge | |
2006-07-16
| ||
21:25 | 1.0.31.0 check-in: 6273b49d89 user: rmsimpson tags: sourceforge | |
Changes
Changes to SQLite.Interop/SQLite.Interop.rc.
︙ | ︙ | |||
49 50 51 52 53 54 55 | ///////////////////////////////////////////////////////////////////////////// // // Version // VS_VERSION_INFO VERSIONINFO | | | | 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | ///////////////////////////////////////////////////////////////////////////// // // Version // VS_VERSION_INFO VERSIONINFO FILEVERSION 1,0,32,0 PRODUCTVERSION 1,0,0,0 FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L #else FILEFLAGS 0x0L #endif FILEOS 0x4L FILETYPE 0x2L FILESUBTYPE 0x0L BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "040904b0" BEGIN VALUE "Comments", "http://sqlite.phxsoftware.com" VALUE "FileDescription", "SQLite.NET Interop Library" VALUE "FileVersion", "1.0.32.0" VALUE "InternalName", "SQLite.Interop.DLL" VALUE "LegalCopyright", "Released to the public domain" VALUE "OriginalFilename", "SQLite3.DLL 3.3.6" VALUE "ProductName", "SQLite.NET" VALUE "ProductVersion", "1.0" END END |
︙ | ︙ |
Changes to SQLite.Interop/merge.h.
1 2 3 4 5 6 7 | // This code was automatically generated from assembly // C:\Src\SQLite.NET\System.Data.SQLite\bin\CompactFramework\System.Data.SQLite.dll #include <windef.h> #pragma data_seg(".clr") #pragma comment(linker, "/SECTION:.clr,ER") | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | // This code was automatically generated from assembly // C:\Src\SQLite.NET\System.Data.SQLite\bin\CompactFramework\System.Data.SQLite.dll #include <windef.h> #pragma data_seg(".clr") #pragma comment(linker, "/SECTION:.clr,ER") char __ph[117132] = {0}; // The number of bytes to reserve #pragma data_seg() typedef BOOL (WINAPI *DLLMAIN)(HANDLE, DWORD, LPVOID); typedef struct EXTRA_STUFF { DWORD dwNativeEntryPoint; } EXTRA_STUFF, *LPEXTRA_STUFF; |
︙ | ︙ |
Changes to SQLite.Interop/merge_full.h.
1 2 3 4 5 6 7 | // This code was automatically generated from assembly // C:\Src\SQLite.NET\System.Data.SQLite\bin\System.Data.SQLite.dll #include <windef.h> #pragma data_seg(".clr") #pragma comment(linker, "/SECTION:.clr,ER") | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | // This code was automatically generated from assembly // C:\Src\SQLite.NET\System.Data.SQLite\bin\System.Data.SQLite.dll #include <windef.h> #pragma data_seg(".clr") #pragma comment(linker, "/SECTION:.clr,ER") char __ph[126092] = {0}; // The number of bytes to reserve #pragma data_seg() typedef BOOL (WINAPI *DLLMAIN)(HANDLE, DWORD, LPVOID); typedef struct EXTRA_STUFF { DWORD dwNativeEntryPoint; } EXTRA_STUFF, *LPEXTRA_STUFF; |
︙ | ︙ |
Changes to System.Data.SQLite/AssemblyInfo.cs.
1 2 3 4 5 6 7 8 9 10 11 12 | using System; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Security.Permissions; #if !PLATFORM_COMPACTFRAMEWORK using System.Runtime.ConstrainedExecution; #endif // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information | > | 1 2 3 4 5 6 7 8 9 10 11 12 13 | using System; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Security.Permissions; using System.Security; #if !PLATFORM_COMPACTFRAMEWORK using System.Runtime.ConstrainedExecution; #endif // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information |
︙ | ︙ | |||
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | // to COM componenets. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] [assembly: CLSCompliant(true)] #if !PLATFORM_COMPACTFRAMEWORK [assembly: ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] #endif // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: | > | | | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | // to COM componenets. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] [assembly: CLSCompliant(true)] #if !PLATFORM_COMPACTFRAMEWORK [assembly: AllowPartiallyTrustedCallers] [assembly: ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] #endif // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.32.0")] #if !PLATFORM_COMPACTFRAMEWORK [assembly: AssemblyFileVersion("1.0.32.0")] #endif |
Changes to System.Data.SQLite/DataTypes.xml.
︙ | ︙ | |||
575 576 577 578 579 580 581 582 583 584 585 586 587 588 | <IsSearchableWithLike>true</IsSearchableWithLike> <LiteralPrefix>'</LiteralPrefix> <LiteralSuffix>'</LiteralSuffix> <IsBestMatch>false</IsBestMatch> </DataTypes> <DataTypes> <TypeName>char</TypeName> <ProviderDbType>16</ProviderDbType> <ColumnSize>2147483647</ColumnSize> <CreateParameters>max length</CreateParameters> <DataType>System.String</DataType> <CreateFormat>char({0})</CreateFormat> <IsAutoIncrementable>false</IsAutoIncrementable> <IsCaseSensitive>false</IsCaseSensitive> | > > > > > > > > > > > > > > > > > > > | 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 | <IsSearchableWithLike>true</IsSearchableWithLike> <LiteralPrefix>'</LiteralPrefix> <LiteralSuffix>'</LiteralSuffix> <IsBestMatch>false</IsBestMatch> </DataTypes> <DataTypes> <TypeName>char</TypeName> <ProviderDbType>16</ProviderDbType> <ColumnSize>2147483647</ColumnSize> <CreateParameters>max length</CreateParameters> <DataType>System.String</DataType> <CreateFormat>char({0})</CreateFormat> <IsAutoIncrementable>false</IsAutoIncrementable> <IsCaseSensitive>false</IsCaseSensitive> <IsFixedLength>false</IsFixedLength> <IsFixedPrecisionScale>false</IsFixedPrecisionScale> <IsLong>false</IsLong> <IsNullable>true</IsNullable> <IsSearchable>true</IsSearchable> <IsSearchableWithLike>true</IsSearchableWithLike> <LiteralPrefix>'</LiteralPrefix> <LiteralSuffix>'</LiteralSuffix> <IsBestMatch>false</IsBestMatch> </DataTypes> <DataTypes> <TypeName>nchar</TypeName> <ProviderDbType>16</ProviderDbType> <ColumnSize>2147483647</ColumnSize> <CreateParameters>max length</CreateParameters> <DataType>System.String</DataType> <CreateFormat>char({0})</CreateFormat> <IsAutoIncrementable>false</IsAutoIncrementable> <IsCaseSensitive>false</IsCaseSensitive> |
︙ | ︙ |
Changes to System.Data.SQLite/SQLite3.cs.
︙ | ︙ | |||
205 206 207 208 209 210 211 | int len = 0; int n = 17; int retries = 0; byte[] b = ToUTF8(strSql); unsafe { | | | 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 | int len = 0; int n = 17; int retries = 0; byte[] b = ToUTF8(strSql); unsafe { fixed (byte* psql = &b[0]) { while (n == 17 && retries < 3) { n = UnsafeNativeMethods.sqlite3_prepare_interop(_sql, (IntPtr)psql, b.Length - 1, out stmt, out ptr, out len); retries++; } |
︙ | ︙ |
Changes to System.Data.SQLite/SQLiteBase.cs.
︙ | ︙ | |||
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | if (IsNull(stmt, index)) return DBNull.Value; Type t = SQLiteConvert.SQLiteTypeToType(typ); switch (TypeToAffinity(t)) { case TypeAffinity.Blob: int n = (int)GetBytes(stmt, index, 0, null, 0, 0); byte[] b = new byte[n]; GetBytes(stmt, index, 0, b, 0, n); return b; case TypeAffinity.DateTime: return GetDateTime(stmt, index); case TypeAffinity.Double: return Convert.ChangeType(GetDouble(stmt, index), t, null); case TypeAffinity.Int64: return Convert.ChangeType(GetInt64(stmt, index), t, null); default: | > > > > > > > < < < | 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 | if (IsNull(stmt, index)) return DBNull.Value; Type t = SQLiteConvert.SQLiteTypeToType(typ); switch (TypeToAffinity(t)) { case TypeAffinity.Blob: if (typ.Type == DbType.Guid && typ.Affinity == TypeAffinity.Text) return new Guid(GetText(stmt, index)); int n = (int)GetBytes(stmt, index, 0, null, 0, 0); byte[] b = new byte[n]; GetBytes(stmt, index, 0, b, 0, n); if (typ.Type == DbType.Guid && n == 16) return new Guid(b); return b; case TypeAffinity.DateTime: return GetDateTime(stmt, index); case TypeAffinity.Double: return Convert.ChangeType(GetDouble(stmt, index), t, null); case TypeAffinity.Int64: return Convert.ChangeType(GetInt64(stmt, index), t, null); default: return GetText(stmt, index); } } internal abstract IntPtr CreateCollation(string strCollation, SQLiteCollation func); internal abstract IntPtr CreateFunction(string strFunction, int nArgs, SQLiteCallback func, SQLiteCallback funcstep, SQLiteCallback funcfinal); internal abstract void FreeFunction(IntPtr cookie); |
︙ | ︙ |
Changes to System.Data.SQLite/SQLiteCommandBuilder.cs.
︙ | ︙ | |||
35 36 37 38 39 40 41 | { QuotePrefix = "["; QuoteSuffix = "]"; DataAdapter = adp; } /// <summary> | | < < < | | | | 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | { QuotePrefix = "["; QuoteSuffix = "]"; DataAdapter = adp; } /// <summary> /// Minimal amount of parameter processing. Primarily sets the DbType for the parameter equal to the provider type in the schema /// </summary> /// <param name="parameter">The parameter to use in applying custom behaviors to a row</param> /// <param name="row">The row to apply the parameter to</param> /// <param name="statementType">The type of statement</param> /// <param name="whereClause">Whether the application of the parameter is part of a WHERE clause</param> protected override void ApplyParameterInfo(DbParameter parameter, DataRow row, StatementType statementType, bool whereClause) { SQLiteParameter param = (SQLiteParameter)parameter; param.DbType = (DbType)row[SchemaTableColumn.ProviderType]; } /// <summary> /// Returns a valid named parameter /// </summary> /// <param name="parameterName">The name of the parameter</param> /// <returns>Error</returns> protected override string GetParameterName(string parameterName) { return String.Format(CultureInfo.InvariantCulture, "@{0}", parameterName); } /// <summary> /// Returns a named parameter for the given ordinal /// </summary> /// <param name="parameterOrdinal">The i of the parameter</param> /// <returns>Error</returns> protected override string GetParameterName(int parameterOrdinal) { return String.Format(CultureInfo.InvariantCulture, "@param{0}", parameterOrdinal); } /// <summary> /// Returns a placeholder character for the specified parameter i. /// </summary> /// <param name="parameterOrdinal">The index of the parameter to provide a placeholder for</param> /// <returns>Returns a named parameter</returns> protected override string GetParameterPlaceholder(int parameterOrdinal) { return GetParameterName(parameterOrdinal); } /// <summary> /// Sets the handler for receiving row updating events. Used by the DbCommandBuilder to autogenerate SQL |
︙ | ︙ |
Changes to System.Data.SQLite/SQLiteConnection.cs.
︙ | ︙ | |||
92 93 94 95 96 97 98 99 100 101 | /// The connection string /// </summary> private string _connectionString; /// <summary> /// Nesting level of the transactions open on the connection /// </summary> internal int _transactionLevel; /// <summary> /// Whether or not the connection is enlisted in a distrubuted transaction /// </summary> | > | > | 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | /// The connection string /// </summary> private string _connectionString; /// <summary> /// Nesting level of the transactions open on the connection /// </summary> internal int _transactionLevel; #if !PLATFORM_COMPACTFRAMEWORK /// <summary> /// Whether or not the connection is enlisted in a distrubuted transaction /// </summary> internal System.Transactions.Transaction _enlistment; #endif /// <summary> /// The base SQLite object to interop with /// </summary> internal SQLiteBase _sql; /// <summary> /// Commands associated with this connection /// </summary> |
︙ | ︙ | |||
246 247 248 249 250 251 252 | /// <param name="connectionString">The connection string to use on the connection</param> public SQLiteConnection(string connectionString) { _sql = null; _connectionState = ConnectionState.Closed; _connectionString = ""; _transactionLevel = 0; | < | 248 249 250 251 252 253 254 255 256 257 258 259 260 261 | /// <param name="connectionString">The connection string to use on the connection</param> public SQLiteConnection(string connectionString) { _sql = null; _connectionState = ConnectionState.Closed; _connectionString = ""; _transactionLevel = 0; _commandList = new List<SQLiteCommand>(); if (connectionString != null) ConnectionString = connectionString; } /// <summary> |
︙ | ︙ | |||
398 399 400 401 402 403 404 | return new SQLiteTransaction(this, deferredLock); } /// <summary> /// Creates a new SQLiteTransaction if one isn't already active on the connection. /// </summary> | | | 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 | return new SQLiteTransaction(this, deferredLock); } /// <summary> /// Creates a new SQLiteTransaction if one isn't already active on the connection. /// </summary> /// <param name="isolationLevel">SQLite supports only serializable transactions.</param> /// <returns>Returns a SQLiteTransaction object.</returns> public new SQLiteTransaction BeginTransaction(IsolationLevel isolationLevel) { return BeginTransaction(false); } /// <summary> |
︙ | ︙ | |||
445 446 447 448 449 450 451 | if (_sql != null) { int x = _commandList.Count; for (int n = 0; n < x; n++) { _commandList[n].ClearCommands(); } | | | | | | > | 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 | if (_sql != null) { int x = _commandList.Count; for (int n = 0; n < x; n++) { _commandList[n].ClearCommands(); } _commandList.Clear(); _sql.Close(); _sql = null; } OnStateChange(ConnectionState.Closed); } /// <summary> /// The connection string containing the parameters for the connection /// </summary> /// <remarks> |
︙ | ︙ | |||
631 632 633 634 635 636 637 | /// </summary> /// <param name="transaction">The distributed transaction to enlist in</param> public override void EnlistTransaction(System.Transactions.Transaction transaction) { if (_transactionLevel > 0 && transaction != null) throw new ArgumentException("Unable to enlist in transaction, a local transaction already exists"); | | > > | 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 | /// </summary> /// <param name="transaction">The distributed transaction to enlist in</param> public override void EnlistTransaction(System.Transactions.Transaction transaction) { if (_transactionLevel > 0 && transaction != null) throw new ArgumentException("Unable to enlist in transaction, a local transaction already exists"); if (_enlistment != null && transaction != _enlistment) throw new ArgumentException("Already enlisted in a transaction"); transaction.EnlistVolatile(new SQLiteEnlistment(this), System.Transactions.EnlistmentOptions.None); _enlistment = transaction; } #endif /// <summary> /// Looks for a key in the array of key/values of the parameter string. If not found, return the specified default value /// </summary> /// <param name="opts">The Key/Value pair array to look in</param> |
︙ | ︙ |
Changes to System.Data.SQLite/SQLiteConnectionStringBuilder.cs.
︙ | ︙ | |||
158 159 160 161 162 163 164 165 166 167 168 169 170 171 | this["Enlist"] = (value == true) ? "Y" : "N"; } } /// <summary> /// Gets/sets the database encryption password /// </summary> [Browsable(true)] public string Password { get { if (ContainsKey("Password") == false) return ""; return this["Password"].ToString(); | > | 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 | this["Enlist"] = (value == true) ? "Y" : "N"; } } /// <summary> /// Gets/sets the database encryption password /// </summary> [Browsable(true)] [PasswordPropertyText(true)] public string Password { get { if (ContainsKey("Password") == false) return ""; return this["Password"].ToString(); |
︙ | ︙ |
Changes to System.Data.SQLite/SQLiteConvert.cs.
︙ | ︙ | |||
503 504 505 506 507 508 509 | /// <param name="typ">The type to evaluate</param> /// <returns>The SQLite type affinity for that type.</returns> internal static TypeAffinity TypeToAffinity(Type typ) { TypeCode tc = Type.GetTypeCode(typ); if (tc == TypeCode.Object) { | | | 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 | /// <param name="typ">The type to evaluate</param> /// <returns>The SQLite type affinity for that type.</returns> internal static TypeAffinity TypeToAffinity(Type typ) { TypeCode tc = Type.GetTypeCode(typ); if (tc == TypeCode.Object) { if (typ == typeof(byte[]) || typ == typeof(Guid)) return TypeAffinity.Blob; else return TypeAffinity.Text; } return _typecodeAffinities[(int)tc]; } |
︙ | ︙ | |||
565 566 567 568 569 570 571 572 573 574 575 576 577 578 | new SQLiteTypeNames("LONG", DbType.Int64), new SQLiteTypeNames("TINYINT", DbType.Byte), new SQLiteTypeNames("INTEGER", DbType.Int64), new SQLiteTypeNames("INT", DbType.Int32), new SQLiteTypeNames("VARCHAR", DbType.String), new SQLiteTypeNames("NVARCHAR", DbType.String), new SQLiteTypeNames("CHAR", DbType.String), new SQLiteTypeNames("TEXT", DbType.String), new SQLiteTypeNames("NTEXT", DbType.String), new SQLiteTypeNames("STRING", DbType.String), new SQLiteTypeNames("DOUBLE", DbType.Double), new SQLiteTypeNames("FLOAT", DbType.Double), new SQLiteTypeNames("REAL", DbType.Single), new SQLiteTypeNames("BIT", DbType.Boolean), | > | 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 | new SQLiteTypeNames("LONG", DbType.Int64), new SQLiteTypeNames("TINYINT", DbType.Byte), new SQLiteTypeNames("INTEGER", DbType.Int64), new SQLiteTypeNames("INT", DbType.Int32), new SQLiteTypeNames("VARCHAR", DbType.String), new SQLiteTypeNames("NVARCHAR", DbType.String), new SQLiteTypeNames("CHAR", DbType.String), new SQLiteTypeNames("NCHAR", DbType.String), new SQLiteTypeNames("TEXT", DbType.String), new SQLiteTypeNames("NTEXT", DbType.String), new SQLiteTypeNames("STRING", DbType.String), new SQLiteTypeNames("DOUBLE", DbType.Double), new SQLiteTypeNames("FLOAT", DbType.Double), new SQLiteTypeNames("REAL", DbType.Single), new SQLiteTypeNames("BIT", DbType.Boolean), |
︙ | ︙ |
Changes to System.Data.SQLite/SQLiteDataReader.cs.
︙ | ︙ | |||
174 175 176 177 178 179 180 | /// to a set of known types that closely match that affinity. It's not an exact science, but its the best we can do. /// </summary> /// <returns> /// This function throws an InvalidTypeCast() exception if the requested type doesn't match the column's definition or affinity. /// </returns> /// <param name="i">The index of the column to type-check</param> /// <param name="typ">The type we want to get out of the column</param> | | | | | | | | | | | | | | | > | | | 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 | /// to a set of known types that closely match that affinity. It's not an exact science, but its the best we can do. /// </summary> /// <returns> /// This function throws an InvalidTypeCast() exception if the requested type doesn't match the column's definition or affinity. /// </returns> /// <param name="i">The index of the column to type-check</param> /// <param name="typ">The type we want to get out of the column</param> private TypeAffinity VerifyType(int i, DbType typ) { CheckClosed(); CheckValidRow(); TypeAffinity affinity = _activeStatement._sql.ColumnAffinity(_activeStatement, i); switch (affinity) { case TypeAffinity.Int64: if (typ == DbType.Int16) return affinity; if (typ == DbType.Int32) return affinity; if (typ == DbType.Int64) return affinity; if (typ == DbType.Boolean) return affinity; if (typ == DbType.Byte) return affinity; break; case TypeAffinity.Double: if (typ == DbType.Single) return affinity; if (typ == DbType.Double) return affinity; if (typ == DbType.Decimal) return affinity; break; case TypeAffinity.Text: if (typ == DbType.SByte) return affinity; if (typ == DbType.String) return affinity; if (typ == DbType.SByte) return affinity; if (typ == DbType.Guid) return affinity; if (typ == DbType.DateTime) return affinity; break; case TypeAffinity.Blob: if (typ == DbType.Guid) return affinity; if (typ == DbType.String) return affinity; if (typ == DbType.Binary) return affinity; break; } throw new InvalidCastException(); } /// <summary> |
︙ | ︙ | |||
356 357 358 359 360 361 362 | /// <summary> /// Returns the column as a Guid /// </summary> /// <param name="i">The index of the column to retrieve</param> /// <returns>Guid</returns> public override Guid GetGuid(int i) { | | > > > > > > > | | 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 | /// <summary> /// Returns the column as a Guid /// </summary> /// <param name="i">The index of the column to retrieve</param> /// <returns>Guid</returns> public override Guid GetGuid(int i) { TypeAffinity affinity = VerifyType(i, DbType.Guid); if (affinity == TypeAffinity.Blob) { byte[] buffer = new byte[16]; _activeStatement._sql.GetBytes(_activeStatement, i, 0, buffer, 0, 16); return new Guid(buffer); } else return new Guid(_activeStatement._sql.GetText(_activeStatement, i)); } /// <summary> /// Returns the column as a short /// </summary> /// <param name="i">The index of the column to retrieve</param> /// <returns>Int16</returns> |
︙ | ︙ |
Changes to System.Data.SQLite/SQLiteEnlistment.cs.
︙ | ︙ | |||
16 17 18 19 20 21 22 | internal class SQLiteEnlistment : IEnlistmentNotification { private SQLiteTransaction _transaction; internal SQLiteEnlistment(SQLiteConnection cnn) { _transaction = cnn.BeginTransaction(); | < > < | | | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | internal class SQLiteEnlistment : IEnlistmentNotification { private SQLiteTransaction _transaction; internal SQLiteEnlistment(SQLiteConnection cnn) { _transaction = cnn.BeginTransaction(); } #region IEnlistmentNotification Members public void Commit(Enlistment enlistment) { _transaction.Connection._enlistment = null; try { _transaction.IsValid(); _transaction.Connection._transactionLevel = 1; _transaction.Commit(); enlistment.Done(); } finally { _transaction = null; } } public void InDoubt(Enlistment enlistment) { enlistment.Done(); } public void Prepare(PreparingEnlistment preparingEnlistment) { try { _transaction.IsValid(); } catch(Exception e) { preparingEnlistment.ForceRollback(e); return; } preparingEnlistment.Prepared(); } public void Rollback(Enlistment enlistment) { _transaction.Connection._enlistment = null; try { _transaction.Rollback(); enlistment.Done(); } finally { |
︙ | ︙ |
Changes to System.Data.SQLite/SQLiteStatement.cs.
︙ | ︙ | |||
92 93 94 95 96 97 98 99 100 101 102 | /// this statement, and if so, keeps a reference to the parameter so it can be bound later. /// </summary> /// <param name="s">The parameter name to map</param> /// <param name="p">The parameter to assign it</param> internal bool MapParameter(string s, SQLiteParameter p) { if (_paramNames == null) return false; int x = _paramNames.Length; for (int n = 0; n < x; n++) { | > > > > > > > | | 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 | /// this statement, and if so, keeps a reference to the parameter so it can be bound later. /// </summary> /// <param name="s">The parameter name to map</param> /// <param name="p">The parameter to assign it</param> internal bool MapParameter(string s, SQLiteParameter p) { if (_paramNames == null) return false; int startAt = 0; if (s.Length > 0) { if (":$@;".IndexOf(s[0]) == -1) startAt = 1; } int x = _paramNames.Length; for (int n = 0; n < x; n++) { if (String.Compare(_paramNames[n], startAt, s, 0, Math.Max(_paramNames[n].Length - startAt, s.Length), true, CultureInfo.InvariantCulture) == 0) { _paramValues[n] = p; return true; } } return false; } |
︙ | ︙ | |||
147 148 149 150 151 152 153 154 155 156 157 158 159 160 | /// <param name="param">The parameter we're binding</param> private void BindParameter(int index, SQLiteParameter param) { if (param == null) throw new SQLiteException((int)SQLiteErrorCode.Error, "Insufficient parameters supplied to the command"); object obj = param.Value; if (Convert.IsDBNull(obj) || obj == null) { _sql.Bind_Null(this, index); return; } | > > > > | | 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 | /// <param name="param">The parameter we're binding</param> private void BindParameter(int index, SQLiteParameter param) { if (param == null) throw new SQLiteException((int)SQLiteErrorCode.Error, "Insufficient parameters supplied to the command"); object obj = param.Value; DbType objType = param.DbType; if (Convert.IsDBNull(obj) || obj == null) { _sql.Bind_Null(this, index); return; } if (objType == DbType.Object) objType = SQLiteConvert.TypeToDbType(obj.GetType()); switch (objType) { case DbType.Date: case DbType.Time: case DbType.DateTime: _sql.Bind_DateTime(this, index, Convert.ToDateTime(obj, CultureInfo.CurrentCulture)); break; case DbType.Int64: |
︙ | ︙ | |||
183 184 185 186 187 188 189 190 191 192 193 194 195 196 | case DbType.Currency: case DbType.Decimal: _sql.Bind_Double(this, index, Convert.ToDouble(obj, CultureInfo.CurrentCulture)); break; case DbType.Binary: _sql.Bind_Blob(this, index, (byte[])obj); break; default: _sql.Bind_Text(this, index, obj.ToString()); break; } } } } | > > > | 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 | case DbType.Currency: case DbType.Decimal: _sql.Bind_Double(this, index, Convert.ToDouble(obj, CultureInfo.CurrentCulture)); break; case DbType.Binary: _sql.Bind_Blob(this, index, (byte[])obj); break; case DbType.Guid: _sql.Bind_Blob(this, index, ((Guid)obj).ToByteArray()); break; default: _sql.Bind_Text(this, index, obj.ToString()); break; } } } } |
Changes to System.Data.SQLite/SQLiteTransaction.cs.
︙ | ︙ | |||
104 105 106 107 108 109 110 | if (_cnn != null) Rollback(); base.Dispose(disposing); } /// <summary> | | | | 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | if (_cnn != null) Rollback(); base.Dispose(disposing); } /// <summary> /// Gets the isolation level of the transaction. SQLite only supports Serializable transactions. /// </summary> public override IsolationLevel IsolationLevel { get { return IsolationLevel.Serializable; } } /// <summary> /// Rolls back the active transaction. /// </summary> public override void Rollback() { |
︙ | ︙ |
Changes to bin/CompactFramework/System.Data.SQLite.DLL.
cannot compute difference between binary files
Changes to bin/CompactFramework/testce.exe.
cannot compute difference between binary files
Changes to bin/System.Data.SQLite.XML.
︙ | ︙ | |||
371 372 373 374 375 376 377 | <member name="P:System.Data.SQLite.SQLiteTransaction.DbConnection"> <summary> Forwards to the local Connection property </summary> </member> <member name="P:System.Data.SQLite.SQLiteTransaction.IsolationLevel"> <summary> | | | 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 | <member name="P:System.Data.SQLite.SQLiteTransaction.DbConnection"> <summary> Forwards to the local Connection property </summary> </member> <member name="P:System.Data.SQLite.SQLiteTransaction.IsolationLevel"> <summary> Gets the isolation level of the transaction. SQLite only supports Serializable transactions. </summary> </member> <member name="T:System.Data.SQLite.FunctionType"> <summary> The type of user-defined function to declare </summary> </member> |
︙ | ︙ | |||
2261 2262 2263 2264 2265 2266 2267 | </summary> </member> <member name="F:System.Data.SQLite.SQLiteConnection._transactionLevel"> <summary> Nesting level of the transactions open on the connection </summary> </member> | | | 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 | </summary> </member> <member name="F:System.Data.SQLite.SQLiteConnection._transactionLevel"> <summary> Nesting level of the transactions open on the connection </summary> </member> <member name="F:System.Data.SQLite.SQLiteConnection._enlistment"> <summary> Whether or not the connection is enlisted in a distrubuted transaction </summary> </member> <member name="F:System.Data.SQLite.SQLiteConnection._sql"> <summary> The base SQLite object to interop with |
︙ | ︙ | |||
2371 2372 2373 2374 2375 2376 2377 | environment, one may instead choose to lock the database immediately to avoid any possible writer deadlock.</param> <returns>Returns a SQLiteTransaction object.</returns> </member> <member name="M:System.Data.SQLite.SQLiteConnection.BeginTransaction(System.Data.IsolationLevel)"> <summary> Creates a new SQLiteTransaction if one isn't already active on the connection. </summary> | | | 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 | environment, one may instead choose to lock the database immediately to avoid any possible writer deadlock.</param> <returns>Returns a SQLiteTransaction object.</returns> </member> <member name="M:System.Data.SQLite.SQLiteConnection.BeginTransaction(System.Data.IsolationLevel)"> <summary> Creates a new SQLiteTransaction if one isn't already active on the connection. </summary> <param name="isolationLevel">SQLite supports only serializable transactions.</param> <returns>Returns a SQLiteTransaction object.</returns> </member> <member name="M:System.Data.SQLite.SQLiteConnection.BeginTransaction"> <summary> Creates a new SQLiteTransaction if one isn't already active on the connection. </summary> <returns>Returns a SQLiteTransaction object.</returns> |
︙ | ︙ | |||
2983 2984 2985 2986 2987 2988 2989 | <summary> Initializes the command builder and associates it with the specified data adapter. </summary> <param name="adp"></param> </member> <member name="M:System.Data.SQLite.SQLiteCommandBuilder.ApplyParameterInfo(System.Data.Common.DbParameter,System.Data.DataRow,System.Data.StatementType,System.Boolean)"> <summary> | | < < < < > | | | 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 | <summary> Initializes the command builder and associates it with the specified data adapter. </summary> <param name="adp"></param> </member> <member name="M:System.Data.SQLite.SQLiteCommandBuilder.ApplyParameterInfo(System.Data.Common.DbParameter,System.Data.DataRow,System.Data.StatementType,System.Boolean)"> <summary> Minimal amount of parameter processing. Primarily sets the DbType for the parameter equal to the provider type in the schema </summary> <param name="parameter">The parameter to use in applying custom behaviors to a row</param> <param name="row">The row to apply the parameter to</param> <param name="statementType">The type of statement</param> <param name="whereClause">Whether the application of the parameter is part of a WHERE clause</param> </member> <member name="M:System.Data.SQLite.SQLiteCommandBuilder.GetParameterName(System.String)"> <summary> Returns a valid named parameter </summary> <param name="parameterName">The name of the parameter</param> <returns>Error</returns> </member> <member name="M:System.Data.SQLite.SQLiteCommandBuilder.GetParameterName(System.Int32)"> <summary> Returns a named parameter for the given ordinal </summary> <param name="parameterOrdinal">The i of the parameter</param> <returns>Error</returns> </member> <member name="M:System.Data.SQLite.SQLiteCommandBuilder.GetParameterPlaceholder(System.Int32)"> <summary> Returns a placeholder character for the specified parameter i. </summary> <param name="parameterOrdinal">The index of the parameter to provide a placeholder for</param> <returns>Returns a named parameter</returns> </member> <member name="M:System.Data.SQLite.SQLiteCommandBuilder.SetRowUpdatingHandler(System.Data.Common.DbDataAdapter)"> <summary> Sets the handler for receiving row updating events. Used by the DbCommandBuilder to autogenerate SQL statements that may not have previously been generated. </summary> <param name="adapter">A data adapter to receive events on.</param> |
︙ | ︙ |
Changes to bin/System.Data.SQLite.dll.
cannot compute difference between binary files
Changes to bin/itanium/System.Data.SQLite.DLL.
cannot compute difference between binary files
Changes to bin/test.exe.
cannot compute difference between binary files
Changes to bin/x64/System.Data.SQLite.DLL.
cannot compute difference between binary files
Changes to readme.htm.
1 2 3 4 5 6 7 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title></title> </head> <body> ADO.NET 2.0 SQLite Data Provider<br> | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title></title> </head> <body> ADO.NET 2.0 SQLite Data Provider<br> Version 1.0.32.0 August 6, 2006<br> Using SQLite 3.3.6<br> Written by Robert Simpson (<a href="mailto:robert@blackcastlesoft.com">robert@blackcastlesoft.com</a>)<br> Released to the public domain, use at your own risk!<br> <br> The latest version can be downloaded <a href="http://sourceforge.net/projects/sqlite-dotnet2"> here</a> <br> |
︙ | ︙ | |||
115 116 117 118 119 120 121 122 123 124 125 126 127 128 | The SQLite3 source code is compiled directly from the SQLite.org release sources. All builds of sqlite after 3.2.8 have included support for Windows CE. Additionally, just one minor modification is made to pager.c, that modification is made automatically by the fixsource.vbs file when the VS2005 solution is compiled.</p> <p></p> <p> <b>Version History</b></p> <p><b>1.0.31.0 - July 16, 2006</b></p> <ul> <li>Re-applied the view parsing bugfix in 1.0.29.0 that was accidentally reverted out of the 30 build.</li><li>Fixed SQLiteCommand.ExecuteScalar() to return null instead of DbNull.Value when no rows were returned.</li> <li>Design-time installer now installs the package-based designer on full Visual Studio versions. Express editions continue to use the packageless designer.</li> | > > > > > > > > > | 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 | The SQLite3 source code is compiled directly from the SQLite.org release sources. All builds of sqlite after 3.2.8 have included support for Windows CE. Additionally, just one minor modification is made to pager.c, that modification is made automatically by the fixsource.vbs file when the VS2005 solution is compiled.</p> <p></p> <p> <b>Version History</b></p> <p><b>1.0.32.0 - August 6, 2006</b></p> <ul> <li>Added AllowPartiallyTrustedCallers attribute to the assembly</li><li>Added the missing "nchar" type</li> <li>Added support for binary Guid's. Guids are now stored as binary by default when using parameterized queries. Text guids are still fully supported.</li> <li>Fixed a TransactionScope() error that caused the transaction not to be completed.</li> <li>Enhanced parameter names so that if they are added to the Parameters collection without their prefix character (@ : or $) they are still properly mapped. </li> </ul> <p><b>1.0.31.0 - July 16, 2006</b></p> <ul> <li>Re-applied the view parsing bugfix in 1.0.29.0 that was accidentally reverted out of the 30 build.</li><li>Fixed SQLiteCommand.ExecuteScalar() to return null instead of DbNull.Value when no rows were returned.</li> <li>Design-time installer now installs the package-based designer on full Visual Studio versions. Express editions continue to use the packageless designer.</li> |
︙ | ︙ |
Changes to test/TestCases.cs.
︙ | ︙ | |||
84 85 86 87 88 89 90 91 92 93 94 95 96 97 | { Console.WriteLine("\r\nBeginning Test on " + cnn.GetType().ToString()); try { CreateTable(cnn); Console.WriteLine("SUCCESS - CreateTable"); } catch (Exception) { Console.WriteLine("FAIL - CreateTable"); } try { TransactionTest(cnn); Console.WriteLine("SUCCESS - Transaction Enlistment"); } catch (Exception) { Console.WriteLine("FAIL - Transaction Enlistment"); } try { InsertTable(cnn); Console.WriteLine("SUCCESS - InsertTable"); } catch (Exception) { Console.WriteLine("FAIL - InsertTable"); } try { VerifyInsert(cnn); Console.WriteLine("SUCCESS - VerifyInsert"); } catch (Exception) { Console.WriteLine("FAIL - VerifyInsert"); } | > > > | 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | { Console.WriteLine("\r\nBeginning Test on " + cnn.GetType().ToString()); try { CreateTable(cnn); Console.WriteLine("SUCCESS - CreateTable"); } catch (Exception) { Console.WriteLine("FAIL - CreateTable"); } try { TransactionTest(cnn); Console.WriteLine("SUCCESS - Transaction Enlistment"); } catch (Exception) { Console.WriteLine("FAIL - Transaction Enlistment"); } try { GuidTest(cnn); Console.WriteLine("SUCCESS - Guid Test"); } catch (Exception) { Console.WriteLine("FAIL - Guid Test"); } try { InsertTable(cnn); Console.WriteLine("SUCCESS - InsertTable"); } catch (Exception) { Console.WriteLine("FAIL - InsertTable"); } try { VerifyInsert(cnn); Console.WriteLine("SUCCESS - VerifyInsert"); } catch (Exception) { Console.WriteLine("FAIL - VerifyInsert"); } |
︙ | ︙ | |||
203 204 205 206 207 208 209 210 211 212 213 214 215 216 | using (DbCommand cmd = cnn.CreateCommand()) { cmd.CommandText = "INSERT INTO TestCase(Field1, Field2, Field3, Field4, Field5) VALUES(1, 3.14159, 'Field3', 'Field4', '2005-01-01 13:49:00')"; cmd.ExecuteNonQuery(); } } internal static void VerifyInsert(DbConnection cnn) { using (DbCommand cmd = cnn.CreateCommand()) { cmd.CommandText = "SELECT Field1, Field2, Field3, Field4, Field5 FROM TestCase"; cmd.Prepare(); using (DbDataReader rd = cmd.ExecuteReader()) | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 | using (DbCommand cmd = cnn.CreateCommand()) { cmd.CommandText = "INSERT INTO TestCase(Field1, Field2, Field3, Field4, Field5) VALUES(1, 3.14159, 'Field3', 'Field4', '2005-01-01 13:49:00')"; cmd.ExecuteNonQuery(); } } internal static void GuidTest(DbConnection cnn) { using (DbCommand cmd = cnn.CreateCommand()) { Guid guid = Guid.NewGuid(); cmd.CommandText = "CREATE TABLE GuidTest(MyGuid GUID)"; cmd.ExecuteNonQuery(); // Insert a guid as a default binary representation cmd.CommandText = "INSERT INTO GuidTest(MyGuid) VALUES(@b)"; ((SQLiteParameterCollection)cmd.Parameters).AddWithValue("@b", guid); // Insert a guid as text cmd.ExecuteNonQuery(); cmd.Parameters[0].Value = guid.ToString(); cmd.Parameters[0].DbType = DbType.String; cmd.ExecuteNonQuery(); cmd.CommandText = "SELECT MyGuid FROM GuidTest"; using (DbDataReader reader = cmd.ExecuteReader()) { reader.Read(); if (reader.GetFieldType(0) != typeof(Guid)) throw new ArgumentException("Column is not a Guid"); if (reader.GetGuid(0) != guid) throw new ArgumentException("Guids don't match!"); reader.Read(); if (reader.GetFieldType(0) != typeof(Guid)) throw new ArgumentException("Column is not a Guid"); if (reader.GetGuid(0) != guid) throw new ArgumentException("Guids don't match!"); } } } internal static void VerifyInsert(DbConnection cnn) { using (DbCommand cmd = cnn.CreateCommand()) { cmd.CommandText = "SELECT Field1, Field2, Field3, Field4, Field5 FROM TestCase"; cmd.Prepare(); using (DbDataReader rd = cmd.ExecuteReader()) |
︙ | ︙ |