Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Minor adjustments to previous commit. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | virtualTables |
Files: | files | file ages | folders |
SHA1: |
a90041679540fb626c1640d32f5b4061 |
User & Date: | mistachkin 2013-06-07 08:50:15.195 |
Context
2013-06-07
| ||
19:14 | Implement the SQLiteContext helper class. check-in: 95425066e0 user: mistachkin tags: virtualTables | |
08:50 | Minor adjustments to previous commit. check-in: a900416795 user: mistachkin tags: virtualTables | |
08:32 | Some cleanup work. Implement the SQLiteValue helper class. check-in: 33b2470a68 user: mistachkin tags: virtualTables | |
Changes
Changes to System.Data.SQLite/SQLiteModuleBase.cs.
︙ | ︙ | |||
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 86 87 88 89 90 91 92 93 94 95 | #endregion /////////////////////////////////////////////////////////////////////// #region Public Methods public TypeAffinity GetTypeAffinity() { return UnsafeNativeMethods.sqlite3_value_type(pValue); } /////////////////////////////////////////////////////////////////////// public int GetBytes() { return UnsafeNativeMethods.sqlite3_value_bytes(pValue); } /////////////////////////////////////////////////////////////////////// public int GetInt() { return UnsafeNativeMethods.sqlite3_value_int(pValue); } /////////////////////////////////////////////////////////////////////// public long GetInt64() { return UnsafeNativeMethods.sqlite3_value_int64(pValue); } /////////////////////////////////////////////////////////////////////// public double GetDouble() { return UnsafeNativeMethods.sqlite3_value_double(pValue); } /////////////////////////////////////////////////////////////////////// public string GetString() { return SQLiteModuleBase.StringFromUtf8IntPtr(pValue, GetBytes()); } /////////////////////////////////////////////////////////////////////// public byte[] GetBlob() { return SQLiteModuleBase.BytesFromIntPtr(pValue, GetBytes()); } #endregion } /////////////////////////////////////////////////////////////////////////// | > > > > > > > | 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 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | #endregion /////////////////////////////////////////////////////////////////////// #region Public Methods public TypeAffinity GetTypeAffinity() { if (pValue == IntPtr.Zero) return TypeAffinity.None; return UnsafeNativeMethods.sqlite3_value_type(pValue); } /////////////////////////////////////////////////////////////////////// public int GetBytes() { if (pValue == IntPtr.Zero) return 0; return UnsafeNativeMethods.sqlite3_value_bytes(pValue); } /////////////////////////////////////////////////////////////////////// public int GetInt() { if (pValue == IntPtr.Zero) return default(int); return UnsafeNativeMethods.sqlite3_value_int(pValue); } /////////////////////////////////////////////////////////////////////// public long GetInt64() { if (pValue == IntPtr.Zero) return default(long); return UnsafeNativeMethods.sqlite3_value_int64(pValue); } /////////////////////////////////////////////////////////////////////// public double GetDouble() { if (pValue == IntPtr.Zero) return default(double); return UnsafeNativeMethods.sqlite3_value_double(pValue); } /////////////////////////////////////////////////////////////////////// public string GetString() { if (pValue == IntPtr.Zero) return null; return SQLiteModuleBase.StringFromUtf8IntPtr(pValue, GetBytes()); } /////////////////////////////////////////////////////////////////////// public byte[] GetBlob() { if (pValue == IntPtr.Zero) return null; return SQLiteModuleBase.BytesFromIntPtr(pValue, GetBytes()); } #endregion } /////////////////////////////////////////////////////////////////////////// |
︙ | ︙ | |||
575 576 577 578 579 580 581 | return length; } /////////////////////////////////////////////////////////////////////// internal static string StringFromUtf8IntPtr(IntPtr pValue) { | < < | > | 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 | return length; } /////////////////////////////////////////////////////////////////////// internal static string StringFromUtf8IntPtr(IntPtr pValue) { return StringFromUtf8IntPtr(pValue, ProbeForUtf8ByteLength(pValue, ThirtyBits)); } /////////////////////////////////////////////////////////////////////// internal static string StringFromUtf8IntPtr(IntPtr pValue, int length) { if (pValue == IntPtr.Zero) |
︙ | ︙ | |||
662 663 664 665 666 667 668 669 670 671 672 673 674 675 | #endregion /////////////////////////////////////////////////////////////////////// #region Public Constructors public SQLiteModuleBase() { } #endregion /////////////////////////////////////////////////////////////////////// #region Protected Members protected virtual IntPtr AllocateTable() | > | 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 | #endregion /////////////////////////////////////////////////////////////////////// #region Public Constructors public SQLiteModuleBase() { // do nothing. } #endregion /////////////////////////////////////////////////////////////////////// #region Protected Members protected virtual IntPtr AllocateTable() |
︙ | ︙ |