System.Data.SQLite
Check-in [24b429ba4d]
Not logged in

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

Overview
Comment:In SQLiteDataReader.VerifyType method, remove duplicate 'if' statement for the DbType.SByte value and move the remaining 'if' to the Int64 affinity. Fix for [c5cc2fb334].
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 24b429ba4da82817be656cab0851f44b86edf2a0
User & Date: mistachkin 2014-09-22 20:09:44
References
2014-09-22
20:10 Closed ticket [c5cc2fb334]: Duplicate test for DbType.SByte in SQLiteDataReader.VerifyType() plus 4 other changes artifact: 8cc8e5440c user: mistachkin
Context
2014-09-23
01:21
Add test to make sure that the SQL statements generated for a DbUpdateCommandTree via the LINQ assembly are properly delimited (i.e. by a semi-colon). check-in: e0cbe7cc0d user: mistachkin tags: trunk
2014-09-22
20:09
In SQLiteDataReader.VerifyType method, remove duplicate 'if' statement for the DbType.SByte value and move the remaining 'if' to the Int64 affinity. Fix for [c5cc2fb334]. check-in: 24b429ba4d user: mistachkin tags: trunk
20:06
Fix syntax issue with LINQ UPDATE statement generation. Reported by Den Pakizh via the mailing list. check-in: e9c47a0ef5 user: mistachkin tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

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

383
384
385
386
387
388
389

390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
      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;
          if (typ == DbType.DateTime) return affinity;
          if (typ == DbType.Single) return affinity;
          if (typ == DbType.Double) return affinity;
          if (typ == DbType.Decimal) return affinity;
          break;
        case TypeAffinity.Double:
          if (typ == DbType.Single) return affinity;
          if (typ == DbType.Double) return affinity;
          if (typ == DbType.Decimal) return affinity;
          if (typ == DbType.DateTime) 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;
          if (typ == DbType.Decimal) return affinity;
          break;
        case TypeAffinity.Blob:
          if (typ == DbType.Guid) return affinity;
          if (typ == DbType.String) return affinity;







>













<

<







383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403

404

405
406
407
408
409
410
411
      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.SByte) return affinity;
          if (typ == DbType.Byte) return affinity;
          if (typ == DbType.DateTime) return affinity;
          if (typ == DbType.Single) return affinity;
          if (typ == DbType.Double) return affinity;
          if (typ == DbType.Decimal) return affinity;
          break;
        case TypeAffinity.Double:
          if (typ == DbType.Single) return affinity;
          if (typ == DbType.Double) return affinity;
          if (typ == DbType.Decimal) return affinity;
          if (typ == DbType.DateTime) return affinity;
          break;
        case TypeAffinity.Text:

          if (typ == DbType.String) return affinity;

          if (typ == DbType.Guid) return affinity;
          if (typ == DbType.DateTime) return affinity;
          if (typ == DbType.Decimal) return affinity;
          break;
        case TypeAffinity.Blob:
          if (typ == DbType.Guid) return affinity;
          if (typ == DbType.String) return affinity;