0000: 2f 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a /***************
0010: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ****************
0020: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ****************
0030: 2a 2a 2a 2a 2a 2a 2a 2a 2a 0d 0a 20 2a 20 41 44 *********.. * AD
0040: 4f 2e 4e 45 54 20 32 2e 30 20 44 61 74 61 20 50 O.NET 2.0 Data P
0050: 72 6f 76 69 64 65 72 20 66 6f 72 20 53 51 4c 69 rovider for SQLi
0060: 74 65 20 56 65 72 73 69 6f 6e 20 33 2e 58 0d 0a te Version 3.X..
0070: 20 2a 20 57 72 69 74 74 65 6e 20 62 79 20 52 6f * Written by Ro
0080: 62 65 72 74 20 53 69 6d 70 73 6f 6e 20 28 72 6f bert Simpson (ro
0090: 62 65 72 74 40 62 6c 61 63 6b 63 61 73 74 6c 65 bert@blackcastle
00a0: 73 6f 66 74 2e 63 6f 6d 29 0d 0a 20 2a 0d 0a 20 soft.com).. *..
00b0: 2a 20 52 65 6c 65 61 73 65 64 20 74 6f 20 74 68 * Released to th
00c0: 65 20 70 75 62 6c 69 63 20 64 6f 6d 61 69 6e 2c e public domain,
00d0: 20 75 73 65 20 61 74 20 79 6f 75 72 20 6f 77 6e use at your own
00e0: 20 72 69 73 6b 21 0d 0a 20 2a 2a 2a 2a 2a 2a 2a risk!.. *******
00f0: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ****************
0100: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ****************
0110: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ****************
0120: 2a 2f 0d 0a 0d 0a 6e 61 6d 65 73 70 61 63 65 20 */....namespace
0130: 53 79 73 74 65 6d 2e 44 61 74 61 2e 53 51 4c 69 System.Data.SQLi
0140: 74 65 0d 0a 7b 0d 0a 20 20 75 73 69 6e 67 20 53 te..{.. using S
0150: 79 73 74 65 6d 3b 0d 0a 20 20 75 73 69 6e 67 20 ystem;.. using
0160: 53 79 73 74 65 6d 2e 43 6f 6c 6c 65 63 74 69 6f System.Collectio
0170: 6e 73 2e 47 65 6e 65 72 69 63 3b 0d 0a 0d 0a 23 ns.Generic;....#
0180: 69 66 20 21 50 4c 41 54 46 4f 52 4d 5f 43 4f 4d if !PLATFORM_COM
0190: 50 41 43 54 46 52 41 4d 45 57 4f 52 4b 0d 0a 20 PACTFRAMEWORK..
01a0: 20 75 73 69 6e 67 20 53 79 73 74 65 6d 2e 52 75 using System.Ru
01b0: 6e 74 69 6d 65 2e 49 6e 74 65 72 6f 70 53 65 72 ntime.InteropSer
01c0: 76 69 63 65 73 3b 0d 0a 23 65 6e 64 69 66 0d 0a vices;..#endif..
01d0: 0d 0a 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 .. /// <summary
01e0: 3e 0d 0a 20 20 2f 2f 2f 20 54 68 69 73 20 69 6e >.. /// This in
01f0: 74 65 72 6e 61 6c 20 63 6c 61 73 73 20 70 72 6f ternal class pro
0200: 76 69 64 65 73 20 74 68 65 20 66 6f 75 6e 64 61 vides the founda
0210: 74 69 6f 6e 20 6f 66 20 53 51 4c 69 74 65 20 73 tion of SQLite s
0220: 75 70 70 6f 72 74 2e 20 20 49 74 20 64 65 66 69 upport. It defi
0230: 6e 65 73 20 61 6c 6c 20 74 68 65 20 61 62 73 74 nes all the abst
0240: 72 61 63 74 20 6d 65 6d 62 65 72 73 20 6e 65 65 ract members nee
0250: 64 65 64 20 74 6f 20 69 6d 70 6c 65 6d 65 6e 74 ded to implement
0260: 0d 0a 20 20 2f 2f 2f 20 61 20 53 51 4c 69 74 65 .. /// a SQLite
0270: 20 64 61 74 61 20 70 72 6f 76 69 64 65 72 2c 20 data provider,
0280: 61 6e 64 20 69 6e 68 65 72 69 74 73 20 66 72 6f and inherits fro
0290: 6d 20 53 51 4c 69 74 65 43 6f 6e 76 65 72 74 20 m SQLiteConvert
02a0: 77 68 69 63 68 20 61 6c 6c 6f 77 73 20 66 6f 72 which allows for
02b0: 20 73 69 6d 70 6c 65 20 74 72 61 6e 73 6c 61 74 simple translat
02c0: 69 6f 6e 73 20 6f 66 20 73 74 72 69 6e 67 20 74 ions of string t
02d0: 6f 20 61 6e 64 20 66 72 6f 6d 20 53 51 4c 69 74 o and from SQLit
02e0: 65 2e 0d 0a 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d e... /// </summ
02f0: 61 72 79 3e 0d 0a 20 20 69 6e 74 65 72 6e 61 6c ary>.. internal
0300: 20 61 62 73 74 72 61 63 74 20 63 6c 61 73 73 20 abstract class
0310: 53 51 4c 69 74 65 42 61 73 65 20 3a 20 53 51 4c SQLiteBase : SQL
0320: 69 74 65 43 6f 6e 76 65 72 74 2c 20 49 44 69 73 iteConvert, IDis
0330: 70 6f 73 61 62 6c 65 0d 0a 20 20 7b 0d 0a 20 20 posable.. {..
0340: 20 20 23 72 65 67 69 6f 6e 20 50 72 69 76 61 74 #region Privat
0350: 65 20 43 6f 6e 73 74 61 6e 74 73 0d 0a 20 20 20 e Constants..
0360: 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a /// <summary>..
0370: 20 20 20 20 2f 2f 2f 20 54 68 65 20 65 72 72 6f /// The erro
0380: 72 20 63 6f 64 65 20 75 73 65 64 20 66 6f 72 20 r code used for
0390: 6c 6f 67 67 69 6e 67 20 65 78 63 65 70 74 69 6f logging exceptio
03a0: 6e 73 20 63 61 75 67 68 74 20 69 6e 20 75 73 65 ns caught in use
03b0: 72 2d 70 72 6f 76 69 64 65 64 0d 0a 20 20 20 20 r-provided..
03c0: 2f 2f 2f 20 63 6f 64 65 2e 0d 0a 20 20 20 20 2f /// code... /
03d0: 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 // </summary>..
03e0: 20 20 20 69 6e 74 65 72 6e 61 6c 20 63 6f 6e 73 internal cons
03f0: 74 20 69 6e 74 20 43 4f 52 5f 45 5f 45 58 43 45 t int COR_E_EXCE
0400: 50 54 49 4f 4e 20 3d 20 75 6e 63 68 65 63 6b 65 PTION = unchecke
0410: 64 28 28 69 6e 74 29 30 78 38 30 31 33 31 35 30 d((int)0x8013150
0420: 30 29 3b 0d 0a 20 20 20 20 23 65 6e 64 72 65 67 0);.. #endreg
0430: 69 6f 6e 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 2f 2f ion.... /////
0440: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
0450: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
0460: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
0470: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
0480: 2f 2f 2f 2f 0d 0a 0d 0a 20 20 20 20 69 6e 74 65 ////.... inte
0490: 72 6e 61 6c 20 53 51 4c 69 74 65 42 61 73 65 28 rnal SQLiteBase(
04a0: 53 51 4c 69 74 65 44 61 74 65 46 6f 72 6d 61 74 SQLiteDateFormat
04b0: 73 20 66 6d 74 2c 20 44 61 74 65 54 69 6d 65 4b s fmt, DateTimeK
04c0: 69 6e 64 20 6b 69 6e 64 2c 20 73 74 72 69 6e 67 ind kind, string
04d0: 20 66 6d 74 53 74 72 69 6e 67 29 0d 0a 20 20 20 fmtString)..
04e0: 20 20 20 3a 20 62 61 73 65 28 66 6d 74 2c 20 6b : base(fmt, k
04f0: 69 6e 64 2c 20 66 6d 74 53 74 72 69 6e 67 29 20 ind, fmtString)
0500: 7b 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c { }.... /// <
0510: 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f summary>.. //
0520: 2f 20 52 65 74 75 72 6e 73 20 61 20 73 74 72 69 / Returns a stri
0530: 6e 67 20 72 65 70 72 65 73 65 6e 74 69 6e 67 20 ng representing
0540: 74 68 65 20 61 63 74 69 76 65 20 76 65 72 73 69 the active versi
0550: 6f 6e 20 6f 66 20 53 51 4c 69 74 65 0d 0a 20 20 on of SQLite..
0560: 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e /// </summary>
0570: 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 .. internal a
0580: 62 73 74 72 61 63 74 20 73 74 72 69 6e 67 20 56 bstract string V
0590: 65 72 73 69 6f 6e 20 7b 20 67 65 74 3b 20 7d 0d ersion { get; }.
05a0: 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 . /// <summar
05b0: 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 y>.. /// Retu
05c0: 72 6e 73 20 61 6e 20 69 6e 74 65 67 65 72 20 72 rns an integer r
05d0: 65 70 72 65 73 65 6e 74 69 6e 67 20 74 68 65 20 epresenting the
05e0: 61 63 74 69 76 65 20 76 65 72 73 69 6f 6e 20 6f active version o
05f0: 66 20 53 51 4c 69 74 65 0d 0a 20 20 20 20 2f 2f f SQLite.. //
0600: 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 / </summary>..
0610: 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 internal abstr
0620: 61 63 74 20 69 6e 74 20 56 65 72 73 69 6f 6e 4e act int VersionN
0630: 75 6d 62 65 72 20 7b 20 67 65 74 3b 20 7d 0d 0a umber { get; }..
0640: 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 /// <summary
0650: 3e 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 >.. /// Retur
0660: 6e 73 20 74 68 65 20 72 6f 77 69 64 20 6f 66 20 ns the rowid of
0670: 74 68 65 20 6d 6f 73 74 20 72 65 63 65 6e 74 20 the most recent
0680: 73 75 63 63 65 73 73 66 75 6c 20 49 4e 53 45 52 successful INSER
0690: 54 20 69 6e 74 6f 20 74 68 65 20 64 61 74 61 62 T into the datab
06a0: 61 73 65 20 66 72 6f 6d 20 74 68 69 73 20 63 6f ase from this co
06b0: 6e 6e 65 63 74 69 6f 6e 2e 0d 0a 20 20 20 20 2f nnection... /
06c0: 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 // </summary>..
06d0: 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 internal abst
06e0: 72 61 63 74 20 6c 6f 6e 67 20 4c 61 73 74 49 6e ract long LastIn
06f0: 73 65 72 74 52 6f 77 49 64 20 7b 20 67 65 74 3b sertRowId { get;
0700: 20 7d 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d }.. /// <sum
0710: 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 52 mary>.. /// R
0720: 65 74 75 72 6e 73 20 74 68 65 20 6e 75 6d 62 65 eturns the numbe
0730: 72 20 6f 66 20 63 68 61 6e 67 65 73 20 74 68 65 r of changes the
0740: 20 6c 61 73 74 20 65 78 65 63 75 74 69 6e 67 20 last executing
0750: 69 6e 73 65 72 74 2f 75 70 64 61 74 65 20 63 61 insert/update ca
0760: 75 73 65 64 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c used... /// <
0770: 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 69 /summary>.. i
0780: 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 61 63 74 nternal abstract
0790: 20 69 6e 74 20 43 68 61 6e 67 65 73 20 7b 20 67 int Changes { g
07a0: 65 74 3b 20 7d 0d 0a 20 20 20 20 2f 2f 2f 20 3c et; }.. /// <
07b0: 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f summary>.. //
07c0: 2f 20 52 65 74 75 72 6e 73 20 74 68 65 20 61 6d / Returns the am
07d0: 6f 75 6e 74 20 6f 66 20 6d 65 6d 6f 72 79 20 28 ount of memory (
07e0: 69 6e 20 62 79 74 65 73 29 20 63 75 72 72 65 6e in bytes) curren
07f0: 74 6c 79 20 69 6e 20 75 73 65 20 62 79 20 74 68 tly in use by th
0800: 65 20 53 51 4c 69 74 65 20 63 6f 72 65 20 6c 69 e SQLite core li
0810: 62 72 61 72 79 2e 20 20 54 68 69 73 20 69 73 20 brary. This is
0820: 6e 6f 74 20 72 65 61 6c 6c 79 20 61 20 70 65 72 not really a per
0830: 2d 63 6f 6e 6e 65 63 74 69 6f 6e 0d 0a 20 20 20 -connection..
0840: 20 2f 2f 2f 20 76 61 6c 75 65 2c 20 69 74 20 69 /// value, it i
0850: 73 20 67 6c 6f 62 61 6c 20 74 6f 20 74 68 65 20 s global to the
0860: 70 72 6f 63 65 73 73 2e 0d 0a 20 20 20 20 2f 2f process... //
0870: 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 / </summary>..
0880: 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 internal abstr
0890: 61 63 74 20 6c 6f 6e 67 20 4d 65 6d 6f 72 79 55 act long MemoryU
08a0: 73 65 64 20 7b 20 67 65 74 3b 20 7d 0d 0a 20 20 sed { get; }..
08b0: 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d /// <summary>.
08c0: 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 6e 73 . /// Returns
08d0: 20 74 68 65 20 6d 61 78 69 6d 75 6d 20 61 6d 6f the maximum amo
08e0: 75 6e 74 20 6f 66 20 6d 65 6d 6f 72 79 20 28 69 unt of memory (i
08f0: 6e 20 62 79 74 65 73 29 20 75 73 65 64 20 62 79 n bytes) used by
0900: 20 74 68 65 20 53 51 4c 69 74 65 20 63 6f 72 65 the SQLite core
0910: 20 6c 69 62 72 61 72 79 20 73 69 6e 63 65 20 74 library since t
0920: 68 65 20 68 69 67 68 2d 77 61 74 65 72 20 6d 61 he high-water ma
0930: 72 6b 20 77 61 73 20 6c 61 73 74 20 72 65 73 65 rk was last rese
0940: 74 2e 0d 0a 20 20 20 20 2f 2f 2f 20 54 68 69 73 t... /// This
0950: 20 69 73 20 6e 6f 74 20 72 65 61 6c 6c 79 20 61 is not really a
0960: 20 70 65 72 2d 63 6f 6e 6e 65 63 74 69 6f 6e 20 per-connection
0970: 76 61 6c 75 65 2c 20 69 74 20 69 73 20 67 6c 6f value, it is glo
0980: 62 61 6c 20 74 6f 20 74 68 65 20 70 72 6f 63 65 bal to the proce
0990: 73 73 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 ss... /// </s
09a0: 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 69 6e 74 ummary>.. int
09b0: 65 72 6e 61 6c 20 61 62 73 74 72 61 63 74 20 6c ernal abstract l
09c0: 6f 6e 67 20 4d 65 6d 6f 72 79 48 69 67 68 77 61 ong MemoryHighwa
09d0: 74 65 72 20 7b 20 67 65 74 3b 20 7d 0d 0a 20 20 ter { get; }..
09e0: 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d /// <summary>.
09f0: 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 6e 73 . /// Returns
0a00: 20 6e 6f 6e 2d 7a 65 72 6f 20 69 66 20 74 68 65 non-zero if the
0a10: 20 75 6e 64 65 72 6c 79 69 6e 67 20 6e 61 74 69 underlying nati
0a20: 76 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 68 61 ve connection ha
0a30: 6e 64 6c 65 20 69 73 20 6f 77 6e 65 64 20 62 79 ndle is owned by
0a40: 20 74 68 69 73 20 69 6e 73 74 61 6e 63 65 2e 0d this instance..
0a50: 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 . /// </summa
0a60: 72 79 3e 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 ry>.. interna
0a70: 6c 20 61 62 73 74 72 61 63 74 20 62 6f 6f 6c 20 l abstract bool
0a80: 4f 77 6e 48 61 6e 64 6c 65 20 7b 20 67 65 74 3b OwnHandle { get;
0a90: 20 7d 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d }.. /// <sum
0aa0: 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 52 mary>.. /// R
0ab0: 65 74 75 72 6e 73 20 74 68 65 20 6c 6f 67 69 63 eturns the logic
0ac0: 61 6c 20 6c 69 73 74 20 6f 66 20 66 75 6e 63 74 al list of funct
0ad0: 69 6f 6e 73 20 61 73 73 6f 63 69 61 74 65 64 20 ions associated
0ae0: 77 69 74 68 20 74 68 69 73 20 63 6f 6e 6e 65 63 with this connec
0af0: 74 69 6f 6e 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c tion... /// <
0b00: 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 69 /summary>.. i
0b10: 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 61 63 74 nternal abstract
0b20: 20 49 44 69 63 74 69 6f 6e 61 72 79 3c 53 51 4c IDictionary<SQL
0b30: 69 74 65 46 75 6e 63 74 69 6f 6e 41 74 74 72 69 iteFunctionAttri
0b40: 62 75 74 65 2c 20 53 51 4c 69 74 65 46 75 6e 63 bute, SQLiteFunc
0b50: 74 69 6f 6e 3e 20 46 75 6e 63 74 69 6f 6e 73 20 tion> Functions
0b60: 7b 20 67 65 74 3b 20 7d 0d 0a 20 20 20 20 2f 2f { get; }.. //
0b70: 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 / <summary>..
0b80: 20 2f 2f 2f 20 53 65 74 73 20 74 68 65 20 73 74 /// Sets the st
0b90: 61 74 75 73 20 6f 66 20 74 68 65 20 6d 65 6d 6f atus of the memo
0ba0: 72 79 20 75 73 61 67 65 20 74 72 61 63 6b 69 6e ry usage trackin
0bb0: 67 20 73 75 62 73 79 73 74 65 6d 20 69 6e 20 74 g subsystem in t
0bc0: 68 65 20 53 51 4c 69 74 65 20 63 6f 72 65 20 6c he SQLite core l
0bd0: 69 62 72 61 72 79 2e 20 20 42 79 20 64 65 66 61 ibrary. By defa
0be0: 75 6c 74 2c 20 74 68 69 73 20 69 73 20 65 6e 61 ult, this is ena
0bf0: 62 6c 65 64 2e 0d 0a 20 20 20 20 2f 2f 2f 20 49 bled... /// I
0c00: 66 20 74 68 69 73 20 69 73 20 64 69 73 61 62 6c f this is disabl
0c10: 65 64 2c 20 6d 65 6d 6f 72 79 20 75 73 61 67 65 ed, memory usage
0c20: 20 74 72 61 63 6b 69 6e 67 20 77 69 6c 6c 20 6e tracking will n
0c30: 6f 74 20 62 65 20 70 65 72 66 6f 72 6d 65 64 2e ot be performed.
0c40: 20 20 54 68 69 73 20 69 73 20 6e 6f 74 20 72 65 This is not re
0c50: 61 6c 6c 79 20 61 20 70 65 72 2d 63 6f 6e 6e 65 ally a per-conne
0c60: 63 74 69 6f 6e 20 76 61 6c 75 65 2c 20 69 74 20 ction value, it
0c70: 69 73 0d 0a 20 20 20 20 2f 2f 2f 20 67 6c 6f 62 is.. /// glob
0c80: 61 6c 20 74 6f 20 74 68 65 20 70 72 6f 63 65 73 al to the proces
0c90: 73 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 s... /// </su
0ca0: 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 mmary>.. ///
0cb0: 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 76 61 6c <param name="val
0cc0: 75 65 22 3e 4e 6f 6e 2d 7a 65 72 6f 20 74 6f 20 ue">Non-zero to
0cd0: 65 6e 61 62 6c 65 20 6d 65 6d 6f 72 79 20 75 73 enable memory us
0ce0: 61 67 65 20 74 72 61 63 6b 69 6e 67 2c 20 7a 65 age tracking, ze
0cf0: 72 6f 20 6f 74 68 65 72 77 69 73 65 2e 3c 2f 70 ro otherwise.</p
0d00: 61 72 61 6d 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c aram>.. /// <
0d10: 72 65 74 75 72 6e 73 3e 41 20 73 74 61 6e 64 61 returns>A standa
0d20: 72 64 20 53 51 4c 69 74 65 20 72 65 74 75 72 6e rd SQLite return
0d30: 20 63 6f 64 65 20 28 69 2e 65 2e 20 7a 65 72 6f code (i.e. zero
0d40: 20 66 6f 72 20 73 75 63 63 65 73 73 20 61 6e 64 for success and
0d50: 20 6e 6f 6e 2d 7a 65 72 6f 20 66 6f 72 20 66 61 non-zero for fa
0d60: 69 6c 75 72 65 29 2e 3c 2f 72 65 74 75 72 6e 73 ilure).</returns
0d70: 3e 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 >.. internal
0d80: 61 62 73 74 72 61 63 74 20 53 51 4c 69 74 65 45 abstract SQLiteE
0d90: 72 72 6f 72 43 6f 64 65 20 53 65 74 4d 65 6d 6f rrorCode SetMemo
0da0: 72 79 53 74 61 74 75 73 28 62 6f 6f 6c 20 76 61 ryStatus(bool va
0db0: 6c 75 65 29 3b 0d 0a 20 20 20 20 2f 2f 2f 20 3c lue);.. /// <
0dc0: 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f summary>.. //
0dd0: 2f 20 41 74 74 65 6d 70 74 73 20 74 6f 20 66 72 / Attempts to fr
0de0: 65 65 20 61 73 20 6d 75 63 68 20 68 65 61 70 20 ee as much heap
0df0: 6d 65 6d 6f 72 79 20 61 73 20 70 6f 73 73 69 62 memory as possib
0e00: 6c 65 20 66 6f 72 20 74 68 65 20 64 61 74 61 62 le for the datab
0e10: 61 73 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 2e 0d ase connection..
0e20: 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 . /// </summa
0e30: 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 72 65 ry>.. /// <re
0e40: 74 75 72 6e 73 3e 41 20 73 74 61 6e 64 61 72 64 turns>A standard
0e50: 20 53 51 4c 69 74 65 20 72 65 74 75 72 6e 20 63 SQLite return c
0e60: 6f 64 65 20 28 69 2e 65 2e 20 7a 65 72 6f 20 66 ode (i.e. zero f
0e70: 6f 72 20 73 75 63 63 65 73 73 20 61 6e 64 20 6e or success and n
0e80: 6f 6e 2d 7a 65 72 6f 20 66 6f 72 20 66 61 69 6c on-zero for fail
0e90: 75 72 65 29 2e 3c 2f 72 65 74 75 72 6e 73 3e 0d ure).</returns>.
0ea0: 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 . internal ab
0eb0: 73 74 72 61 63 74 20 53 51 4c 69 74 65 45 72 72 stract SQLiteErr
0ec0: 6f 72 43 6f 64 65 20 52 65 6c 65 61 73 65 4d 65 orCode ReleaseMe
0ed0: 6d 6f 72 79 28 29 3b 0d 0a 20 20 20 20 2f 2f 2f mory();.. ///
0ee0: 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 <summary>..
0ef0: 2f 2f 2f 20 53 68 75 74 64 6f 77 6e 20 74 68 65 /// Shutdown the
0f00: 20 53 51 4c 69 74 65 20 65 6e 67 69 6e 65 20 73 SQLite engine s
0f10: 6f 20 74 68 61 74 20 69 74 20 63 61 6e 20 62 65 o that it can be
0f20: 20 72 65 73 74 61 72 74 65 64 20 77 69 74 68 20 restarted with
0f30: 64 69 66 66 65 72 65 6e 74 20 63 6f 6e 66 69 67 different config
0f40: 20 6f 70 74 69 6f 6e 73 2e 0d 0a 20 20 20 20 2f options... /
0f50: 2f 2f 20 57 65 20 64 65 70 65 6e 64 20 6f 6e 20 // We depend on
0f60: 61 75 74 6f 20 69 6e 69 74 69 61 6c 69 7a 61 74 auto initializat
0f70: 69 6f 6e 20 74 6f 20 72 65 63 6f 76 65 72 2e 0d ion to recover..
0f80: 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 . /// </summa
0f90: 72 79 3e 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 ry>.. interna
0fa0: 6c 20 61 62 73 74 72 61 63 74 20 53 51 4c 69 74 l abstract SQLit
0fb0: 65 45 72 72 6f 72 43 6f 64 65 20 53 68 75 74 64 eErrorCode Shutd
0fc0: 6f 77 6e 28 29 3b 0d 0a 20 20 20 20 2f 2f 2f 20 own();.. ///
0fd0: 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f <summary>.. /
0fe0: 2f 2f 20 44 65 74 65 72 6d 69 6e 65 73 20 69 66 // Determines if
0ff0: 20 74 68 65 20 61 73 73 6f 63 69 61 74 65 64 20 the associated
1000: 6e 61 74 69 76 65 20 63 6f 6e 6e 65 63 74 69 6f native connectio
1010: 6e 20 68 61 6e 64 6c 65 20 69 73 20 6f 70 65 6e n handle is open
1020: 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d ... /// </sum
1030: 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c mary>.. /// <
1040: 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 2f 2f returns>.. //
1050: 2f 20 4e 6f 6e 2d 7a 65 72 6f 20 69 66 20 61 20 / Non-zero if a
1060: 64 61 74 61 62 61 73 65 20 63 6f 6e 6e 65 63 74 database connect
1070: 69 6f 6e 20 69 73 20 6f 70 65 6e 2e 0d 0a 20 20 ion is open...
1080: 20 20 2f 2f 2f 20 3c 2f 72 65 74 75 72 6e 73 3e /// </returns>
1090: 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 .. internal a
10a0: 62 73 74 72 61 63 74 20 62 6f 6f 6c 20 49 73 4f bstract bool IsO
10b0: 70 65 6e 28 29 3b 0d 0a 20 20 20 20 2f 2f 2f 20 pen();.. ///
10c0: 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f <summary>.. /
10d0: 2f 2f 20 52 65 74 75 72 6e 73 20 74 68 65 20 66 // Returns the f
10e0: 75 6c 6c 79 20 71 75 61 6c 69 66 69 65 64 20 70 ully qualified p
10f0: 61 74 68 20 61 6e 64 20 66 69 6c 65 20 6e 61 6d ath and file nam
1100: 65 20 66 6f 72 20 74 68 65 20 63 75 72 72 65 6e e for the curren
1110: 74 6c 79 20 6f 70 65 6e 0d 0a 20 20 20 20 2f 2f tly open.. //
1120: 2f 20 64 61 74 61 62 61 73 65 2c 20 69 66 20 61 / database, if a
1130: 6e 79 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 ny... /// </s
1140: 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f ummary>.. ///
1150: 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 64 62 <param name="db
1160: 4e 61 6d 65 22 3e 0d 0a 20 20 20 20 2f 2f 2f 20 Name">.. ///
1170: 54 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 The name of the
1180: 61 74 74 61 63 68 65 64 20 64 61 74 61 62 61 73 attached databas
1190: 65 20 74 6f 20 71 75 65 72 79 2e 0d 0a 20 20 20 e to query...
11a0: 20 2f 2f 2f 20 3c 2f 70 61 72 61 6d 3e 0d 0a 20 /// </param>..
11b0: 20 20 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 3e /// <returns>
11c0: 0d 0a 20 20 20 20 2f 2f 2f 20 54 68 65 20 66 75 .. /// The fu
11d0: 6c 6c 79 20 71 75 61 6c 69 66 69 65 64 20 70 61 lly qualified pa
11e0: 74 68 20 61 6e 64 20 66 69 6c 65 20 6e 61 6d 65 th and file name
11f0: 20 66 6f 72 20 74 68 65 20 63 75 72 72 65 6e 74 for the current
1200: 6c 79 20 6f 70 65 6e 20 64 61 74 61 62 61 73 65 ly open database
1210: 2c 0d 0a 20 20 20 20 2f 2f 2f 20 69 66 20 61 6e ,.. /// if an
1220: 79 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 y... /// </re
1230: 74 75 72 6e 73 3e 0d 0a 20 20 20 20 69 6e 74 65 turns>.. inte
1240: 72 6e 61 6c 20 61 62 73 74 72 61 63 74 20 73 74 rnal abstract st
1250: 72 69 6e 67 20 47 65 74 46 69 6c 65 4e 61 6d 65 ring GetFileName
1260: 28 73 74 72 69 6e 67 20 64 62 4e 61 6d 65 29 3b (string dbName);
1270: 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 .. /// <summa
1280: 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 4f 70 65 ry>.. /// Ope
1290: 6e 73 20 61 20 64 61 74 61 62 61 73 65 2e 0d 0a ns a database...
12a0: 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 /// </summar
12b0: 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 72 65 6d y>.. /// <rem
12c0: 61 72 6b 73 3e 0d 0a 20 20 20 20 2f 2f 2f 20 49 arks>.. /// I
12d0: 6d 70 6c 65 6d 65 6e 74 65 72 73 20 73 68 6f 75 mplementers shou
12e0: 6c 64 20 63 61 6c 6c 20 53 51 4c 69 74 65 46 75 ld call SQLiteFu
12f0: 6e 63 74 69 6f 6e 2e 42 69 6e 64 46 75 6e 63 74 nction.BindFunct
1300: 69 6f 6e 73 28 29 20 61 6e 64 20 73 61 76 65 20 ions() and save
1310: 74 68 65 20 61 72 72 61 79 20 61 66 74 65 72 20 the array after
1320: 6f 70 65 6e 69 6e 67 20 61 20 63 6f 6e 6e 65 63 opening a connec
1330: 74 69 6f 6e 0d 0a 20 20 20 20 2f 2f 2f 20 74 6f tion.. /// to
1340: 20 62 69 6e 64 20 61 6c 6c 20 61 74 74 72 69 62 bind all attrib
1350: 75 74 65 64 20 75 73 65 72 2d 64 65 66 69 6e 65 uted user-define
1360: 64 20 66 75 6e 63 74 69 6f 6e 73 20 61 6e 64 20 d functions and
1370: 63 6f 6c 6c 61 74 69 6e 67 20 73 65 71 75 65 6e collating sequen
1380: 63 65 73 20 74 6f 20 74 68 65 20 6e 65 77 20 63 ces to the new c
1390: 6f 6e 6e 65 63 74 69 6f 6e 2e 0d 0a 20 20 20 20 onnection...
13a0: 2f 2f 2f 20 3c 2f 72 65 6d 61 72 6b 73 3e 0d 0a /// </remarks>..
13b0: 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e /// <param n
13c0: 61 6d 65 3d 22 73 74 72 46 69 6c 65 6e 61 6d 65 ame="strFilename
13d0: 22 3e 54 68 65 20 66 69 6c 65 6e 61 6d 65 20 6f ">The filename o
13e0: 66 20 74 68 65 20 64 61 74 61 62 61 73 65 20 74 f the database t
13f0: 6f 20 6f 70 65 6e 2e 20 20 53 51 4c 69 74 65 20 o open. SQLite
1400: 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 20 63 72 automatically cr
1410: 65 61 74 65 73 20 69 74 20 69 66 20 69 74 20 64 eates it if it d
1420: 6f 65 73 6e 27 74 20 65 78 69 73 74 2e 3c 2f 70 oesn't exist.</p
1430: 61 72 61 6d 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c aram>.. /// <
1440: 70 61 72 61 6d 20 6e 61 6d 65 3d 22 76 66 73 4e param name="vfsN
1450: 61 6d 65 22 3e 54 68 65 20 6e 61 6d 65 20 6f 66 ame">The name of
1460: 20 74 68 65 20 56 46 53 20 74 6f 20 75 73 65 20 the VFS to use
1470: 2d 4f 52 2d 20 6e 75 6c 6c 20 74 6f 20 75 73 65 -OR- null to use
1480: 20 74 68 65 20 64 65 66 61 75 6c 74 20 56 46 53 the default VFS
1490: 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 2f .</param>.. /
14a0: 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 // <param name="
14b0: 63 6f 6e 6e 65 63 74 69 6f 6e 46 6c 61 67 73 22 connectionFlags"
14c0: 3e 54 68 65 20 66 6c 61 67 73 20 61 73 73 6f 63 >The flags assoc
14d0: 69 61 74 65 64 20 77 69 74 68 20 74 68 65 20 70 iated with the p
14e0: 61 72 65 6e 74 20 63 6f 6e 6e 65 63 74 69 6f 6e arent connection
14f0: 20 6f 62 6a 65 63 74 3c 2f 70 61 72 61 6d 3e 0d object</param>.
1500: 0a 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 . /// <param
1510: 6e 61 6d 65 3d 22 6f 70 65 6e 46 6c 61 67 73 22 name="openFlags"
1520: 3e 54 68 65 20 6f 70 65 6e 20 66 6c 61 67 73 20 >The open flags
1530: 74 6f 20 75 73 65 20 77 68 65 6e 20 63 72 65 61 to use when crea
1540: 74 69 6e 67 20 74 68 65 20 63 6f 6e 6e 65 63 74 ting the connect
1550: 69 6f 6e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 ion</param>..
1560: 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 /// <param name
1570: 3d 22 6d 61 78 50 6f 6f 6c 53 69 7a 65 22 3e 54 ="maxPoolSize">T
1580: 68 65 20 6d 61 78 69 6d 75 6d 20 73 69 7a 65 20 he maximum size
1590: 6f 66 20 74 68 65 20 70 6f 6f 6c 20 66 6f 72 20 of the pool for
15a0: 74 68 65 20 67 69 76 65 6e 20 66 69 6c 65 6e 61 the given filena
15b0: 6d 65 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 me</param>..
15c0: 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d /// <param name=
15d0: 22 75 73 65 50 6f 6f 6c 22 3e 49 66 20 74 72 75 "usePool">If tru
15e0: 65 2c 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f e, the connectio
15f0: 6e 20 63 61 6e 20 62 65 20 70 75 6c 6c 65 64 20 n can be pulled
1600: 66 72 6f 6d 20 74 68 65 20 63 6f 6e 6e 65 63 74 from the connect
1610: 69 6f 6e 20 70 6f 6f 6c 3c 2f 70 61 72 61 6d 3e ion pool</param>
1620: 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 .. internal a
1630: 62 73 74 72 61 63 74 20 76 6f 69 64 20 4f 70 65 bstract void Ope
1640: 6e 28 73 74 72 69 6e 67 20 73 74 72 46 69 6c 65 n(string strFile
1650: 6e 61 6d 65 2c 20 73 74 72 69 6e 67 20 76 66 73 name, string vfs
1660: 4e 61 6d 65 2c 20 53 51 4c 69 74 65 43 6f 6e 6e Name, SQLiteConn
1670: 65 63 74 69 6f 6e 46 6c 61 67 73 20 63 6f 6e 6e ectionFlags conn
1680: 65 63 74 69 6f 6e 46 6c 61 67 73 2c 20 53 51 4c ectionFlags, SQL
1690: 69 74 65 4f 70 65 6e 46 6c 61 67 73 45 6e 75 6d iteOpenFlagsEnum
16a0: 20 6f 70 65 6e 46 6c 61 67 73 2c 20 69 6e 74 20 openFlags, int
16b0: 6d 61 78 50 6f 6f 6c 53 69 7a 65 2c 20 62 6f 6f maxPoolSize, boo
16c0: 6c 20 75 73 65 50 6f 6f 6c 29 3b 0d 0a 20 20 20 l usePool);..
16d0: 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a /// <summary>..
16e0: 20 20 20 20 2f 2f 2f 20 43 6c 6f 73 65 73 20 74 /// Closes t
16f0: 68 65 20 63 75 72 72 65 6e 74 6c 79 2d 6f 70 65 he currently-ope
1700: 6e 20 64 61 74 61 62 61 73 65 2e 0d 0a 20 20 20 n database...
1710: 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d /// </summary>.
1720: 0a 20 20 20 20 2f 2f 2f 20 3c 72 65 6d 61 72 6b . /// <remark
1730: 73 3e 0d 0a 20 20 20 20 2f 2f 2f 20 41 66 74 65 s>.. /// Afte
1740: 72 20 74 68 65 20 64 61 74 61 62 61 73 65 20 68 r the database h
1750: 61 73 20 62 65 65 6e 20 63 6c 6f 73 65 64 20 69 as been closed i
1760: 6d 70 6c 65 6d 65 74 65 72 73 20 73 68 6f 75 6c mplemeters shoul
1770: 64 20 63 61 6c 6c 20 53 51 4c 69 74 65 46 75 6e d call SQLiteFun
1780: 63 74 69 6f 6e 2e 55 6e 62 69 6e 64 46 75 6e 63 ction.UnbindFunc
1790: 74 69 6f 6e 73 28 29 20 74 6f 20 64 65 61 6c 6c tions() to deall
17a0: 6f 63 61 74 65 20 61 6c 6c 20 69 6e 74 65 72 6f ocate all intero
17b0: 70 20 61 6c 6c 6f 63 61 74 65 64 0d 0a 20 20 20 p allocated..
17c0: 20 2f 2f 2f 20 6d 65 6d 6f 72 79 20 61 73 73 6f /// memory asso
17d0: 63 69 61 74 65 64 20 77 69 74 68 20 74 68 65 20 ciated with the
17e0: 75 73 65 72 2d 64 65 66 69 6e 65 64 20 66 75 6e user-defined fun
17f0: 63 74 69 6f 6e 73 20 61 6e 64 20 63 6f 6c 6c 61 ctions and colla
1800: 74 69 6e 67 20 73 65 71 75 65 6e 63 65 73 20 74 ting sequences t
1810: 69 65 64 20 74 6f 20 74 68 65 20 63 6c 6f 73 65 ied to the close
1820: 64 20 63 6f 6e 6e 65 63 74 69 6f 6e 2e 0d 0a 20 d connection...
1830: 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 72 6b 73 /// </remarks
1840: 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 >.. /// <para
1850: 6d 20 6e 61 6d 65 3d 22 63 61 6e 54 68 72 6f 77 m name="canThrow
1860: 22 3e 4e 6f 6e 2d 7a 65 72 6f 20 69 66 20 74 68 ">Non-zero if th
1870: 65 20 6f 70 65 72 61 74 69 6f 6e 20 69 73 20 61 e operation is a
1880: 6c 6c 6f 77 65 64 20 74 6f 20 74 68 72 6f 77 20 llowed to throw
1890: 65 78 63 65 70 74 69 6f 6e 73 2c 20 7a 65 72 6f exceptions, zero
18a0: 20 6f 74 68 65 72 77 69 73 65 2e 3c 2f 70 61 72 otherwise.</par
18b0: 61 6d 3e 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 am>.. interna
18c0: 6c 20 61 62 73 74 72 61 63 74 20 76 6f 69 64 20 l abstract void
18d0: 43 6c 6f 73 65 28 62 6f 6f 6c 20 63 61 6e 54 68 Close(bool canTh
18e0: 72 6f 77 29 3b 0d 0a 20 20 20 20 2f 2f 2f 20 3c row);.. /// <
18f0: 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f summary>.. //
1900: 2f 20 53 65 74 73 20 74 68 65 20 62 75 73 79 20 / Sets the busy
1910: 74 69 6d 65 6f 75 74 20 6f 6e 20 74 68 65 20 63 timeout on the c
1920: 6f 6e 6e 65 63 74 69 6f 6e 2e 20 20 53 51 4c 69 onnection. SQLi
1930: 74 65 43 6f 6d 6d 61 6e 64 20 77 69 6c 6c 20 63 teCommand will c
1940: 61 6c 6c 20 74 68 69 73 20 62 65 66 6f 72 65 20 all this before
1950: 65 78 65 63 75 74 69 6e 67 20 61 6e 79 20 63 6f executing any co
1960: 6d 6d 61 6e 64 2e 0d 0a 20 20 20 20 2f 2f 2f 20 mmand... ///
1970: 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 </summary>..
1980: 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d /// <param name=
1990: 22 6e 54 69 6d 65 6f 75 74 4d 53 22 3e 54 68 65 "nTimeoutMS">The
19a0: 20 6e 75 6d 62 65 72 20 6f 66 20 6d 69 6c 6c 69 number of milli
19b0: 73 65 63 6f 6e 64 73 20 74 6f 20 77 61 69 74 20 seconds to wait
19c0: 62 65 66 6f 72 65 20 72 65 74 75 72 6e 69 6e 67 before returning
19d0: 20 53 51 4c 49 54 45 5f 42 55 53 59 3c 2f 70 61 SQLITE_BUSY</pa
19e0: 72 61 6d 3e 0d 0a 20 20 20 20 69 6e 74 65 72 6e ram>.. intern
19f0: 61 6c 20 61 62 73 74 72 61 63 74 20 76 6f 69 64 al abstract void
1a00: 20 53 65 74 54 69 6d 65 6f 75 74 28 69 6e 74 20 SetTimeout(int
1a10: 6e 54 69 6d 65 6f 75 74 4d 53 29 3b 0d 0a 20 20 nTimeoutMS);..
1a20: 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d /// <summary>.
1a30: 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 6e 73 . /// Returns
1a40: 20 74 68 65 20 74 65 78 74 20 6f 66 20 74 68 65 the text of the
1a50: 20 6c 61 73 74 20 65 72 72 6f 72 20 69 73 73 75 last error issu
1a60: 65 64 20 62 79 20 53 51 4c 69 74 65 0d 0a 20 20 ed by SQLite..
1a70: 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e /// </summary>
1a80: 0d 0a 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 72 .. /// <retur
1a90: 6e 73 3e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 ns></returns>..
1aa0: 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 internal abst
1ab0: 72 61 63 74 20 73 74 72 69 6e 67 20 47 65 74 4c ract string GetL
1ac0: 61 73 74 45 72 72 6f 72 28 29 3b 0d 0a 0d 0a 20 astError();....
1ad0: 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e /// <summary>
1ae0: 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 6e .. /// Return
1af0: 73 20 74 68 65 20 74 65 78 74 20 6f 66 20 74 68 s the text of th
1b00: 65 20 6c 61 73 74 20 65 72 72 6f 72 20 69 73 73 e last error iss
1b10: 75 65 64 20 62 79 20 53 51 4c 69 74 65 20 2d 4f ued by SQLite -O
1b20: 52 2d 20 74 68 65 20 73 70 65 63 69 66 69 65 64 R- the specified
1b30: 20 64 65 66 61 75 6c 74 20 65 72 72 6f 72 20 74 default error t
1b40: 65 78 74 20 69 66 0d 0a 20 20 20 20 2f 2f 2f 20 ext if.. ///
1b50: 6e 6f 6e 65 20 69 73 20 61 76 61 69 6c 61 62 6c none is availabl
1b60: 65 20 66 72 6f 6d 20 74 68 65 20 53 51 4c 69 74 e from the SQLit
1b70: 65 20 63 6f 72 65 20 6c 69 62 72 61 72 79 2e 0d e core library..
1b80: 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 . /// </summa
1b90: 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 70 61 ry>.. /// <pa
1ba0: 72 61 6d 20 6e 61 6d 65 3d 22 64 65 66 56 61 6c ram name="defVal
1bb0: 75 65 22 3e 0d 0a 20 20 20 20 2f 2f 2f 20 54 68 ue">.. /// Th
1bc0: 65 20 65 72 72 6f 72 20 74 65 78 74 20 74 6f 20 e error text to
1bd0: 72 65 74 75 72 6e 20 69 6e 20 74 68 65 20 65 76 return in the ev
1be0: 65 6e 74 20 74 68 61 74 20 6f 6e 65 20 69 73 20 ent that one is
1bf0: 6e 6f 74 20 61 76 61 69 6c 61 62 6c 65 20 66 72 not available fr
1c00: 6f 6d 20 74 68 65 20 53 51 4c 69 74 65 20 63 6f om the SQLite co
1c10: 72 65 20 6c 69 62 72 61 72 79 2e 0d 0a 20 20 20 re library...
1c20: 20 2f 2f 2f 20 3c 2f 70 61 72 61 6d 3e 0d 0a 20 /// </param>..
1c30: 20 20 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 3e /// <returns>
1c40: 0d 0a 20 20 20 20 2f 2f 2f 20 54 68 65 20 65 72 .. /// The er
1c50: 72 6f 72 20 74 65 78 74 2e 0d 0a 20 20 20 20 2f ror text... /
1c60: 2f 2f 20 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 // </returns>..
1c70: 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 internal abst
1c80: 72 61 63 74 20 73 74 72 69 6e 67 20 47 65 74 4c ract string GetL
1c90: 61 73 74 45 72 72 6f 72 28 73 74 72 69 6e 67 20 astError(string
1ca0: 64 65 66 56 61 6c 75 65 29 3b 0d 0a 0d 0a 20 20 defValue);....
1cb0: 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d /// <summary>.
1cc0: 0a 20 20 20 20 2f 2f 2f 20 57 68 65 6e 20 70 6f . /// When po
1cd0: 6f 6c 69 6e 67 20 69 73 20 65 6e 61 62 6c 65 64 oling is enabled
1ce0: 2c 20 66 6f 72 63 65 20 74 68 69 73 20 63 6f 6e , force this con
1cf0: 6e 65 63 74 69 6f 6e 20 74 6f 20 62 65 20 64 69 nection to be di
1d00: 73 70 6f 73 65 64 20 72 61 74 68 65 72 20 74 68 sposed rather th
1d10: 61 6e 20 72 65 74 75 72 6e 65 64 20 74 6f 20 74 an returned to t
1d20: 68 65 20 70 6f 6f 6c 0d 0a 20 20 20 20 2f 2f 2f he pool.. ///
1d30: 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 </summary>..
1d40: 20 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 61 internal abstra
1d50: 63 74 20 76 6f 69 64 20 43 6c 65 61 72 50 6f 6f ct void ClearPoo
1d60: 6c 28 29 3b 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 l();.... ///
1d70: 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f <summary>.. /
1d80: 2f 2f 20 57 68 65 6e 20 70 6f 6f 6c 69 6e 67 20 // When pooling
1d90: 69 73 20 65 6e 61 62 6c 65 64 2c 20 72 65 74 75 is enabled, retu
1da0: 72 6e 73 20 74 68 65 20 6e 75 6d 62 65 72 20 6f rns the number o
1db0: 66 20 70 6f 6f 6c 20 65 6e 74 72 69 65 73 20 6d f pool entries m
1dc0: 61 74 63 68 69 6e 67 20 74 68 65 20 63 75 72 72 atching the curr
1dd0: 65 6e 74 20 66 69 6c 65 20 6e 61 6d 65 2e 0d 0a ent file name...
1de0: 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 /// </summar
1df0: 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 72 65 74 y>.. /// <ret
1e00: 75 72 6e 73 3e 54 68 65 20 6e 75 6d 62 65 72 20 urns>The number
1e10: 6f 66 20 70 6f 6f 6c 20 65 6e 74 72 69 65 73 20 of pool entries
1e20: 6d 61 74 63 68 69 6e 67 20 74 68 65 20 63 75 72 matching the cur
1e30: 72 65 6e 74 20 66 69 6c 65 20 6e 61 6d 65 2e 3c rent file name.<
1e40: 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 69 /returns>.. i
1e50: 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 61 63 74 nternal abstract
1e60: 20 69 6e 74 20 43 6f 75 6e 74 50 6f 6f 6c 28 29 int CountPool()
1e70: 3b 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 ;.... /// <su
1e80: 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 mmary>.. ///
1e90: 50 72 65 70 61 72 65 73 20 61 20 53 51 4c 20 73 Prepares a SQL s
1ea0: 74 61 74 65 6d 65 6e 74 20 66 6f 72 20 65 78 65 tatement for exe
1eb0: 63 75 74 69 6f 6e 2e 0d 0a 20 20 20 20 2f 2f 2f cution... ///
1ec0: 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 </summary>..
1ed0: 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 /// <param name
1ee0: 3d 22 63 6e 6e 22 3e 54 68 65 20 73 6f 75 72 63 ="cnn">The sourc
1ef0: 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 70 72 65 e connection pre
1f00: 70 61 72 69 6e 67 20 74 68 65 20 63 6f 6d 6d 61 paring the comma
1f10: 6e 64 2e 20 20 43 61 6e 20 62 65 20 6e 75 6c 6c nd. Can be null
1f20: 20 66 6f 72 20 61 6e 79 20 63 61 6c 6c 65 72 20 for any caller
1f30: 65 78 63 65 70 74 20 4c 49 4e 51 3c 2f 70 61 72 except LINQ</par
1f40: 61 6d 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 70 61 am>.. /// <pa
1f50: 72 61 6d 20 6e 61 6d 65 3d 22 73 74 72 53 71 6c ram name="strSql
1f60: 22 3e 54 68 65 20 53 51 4c 20 63 6f 6d 6d 61 6e ">The SQL comman
1f70: 64 20 74 65 78 74 20 74 6f 20 70 72 65 70 61 72 d text to prepar
1f80: 65 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 2f e</param>.. /
1f90: 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 // <param name="
1fa0: 70 72 65 76 69 6f 75 73 22 3e 54 68 65 20 70 72 previous">The pr
1fb0: 65 76 69 6f 75 73 20 73 74 61 74 65 6d 65 6e 74 evious statement
1fc0: 20 69 6e 20 61 20 6d 75 6c 74 69 2d 73 74 61 74 in a multi-stat
1fd0: 65 6d 65 6e 74 20 63 6f 6d 6d 61 6e 64 2c 20 6f ement command, o
1fe0: 72 20 6e 75 6c 6c 20 69 66 20 6e 6f 20 70 72 65 r null if no pre
1ff0: 76 69 6f 75 73 20 73 74 61 74 65 6d 65 6e 74 20 vious statement
2000: 65 78 69 73 74 73 3c 2f 70 61 72 61 6d 3e 0d 0a exists</param>..
2010: 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e /// <param n
2020: 61 6d 65 3d 22 74 69 6d 65 6f 75 74 4d 53 22 3e ame="timeoutMS">
2030: 54 68 65 20 74 69 6d 65 6f 75 74 20 74 6f 20 77 The timeout to w
2040: 61 69 74 20 62 65 66 6f 72 65 20 61 62 6f 72 74 ait before abort
2050: 69 6e 67 20 74 68 65 20 70 72 65 70 61 72 65 3c ing the prepare<
2060: 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 2f 2f 2f /param>.. ///
2070: 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 73 74 <param name="st
2080: 72 52 65 6d 61 69 6e 22 3e 54 68 65 20 72 65 6d rRemain">The rem
2090: 61 69 6e 64 65 72 20 6f 66 20 74 68 65 20 73 74 ainder of the st
20a0: 61 74 65 6d 65 6e 74 20 74 68 61 74 20 77 61 73 atement that was
20b0: 20 6e 6f 74 20 70 72 6f 63 65 73 73 65 64 2e 20 not processed.
20c0: 20 45 61 63 68 20 63 61 6c 6c 20 74 6f 20 70 72 Each call to pr
20d0: 65 70 61 72 65 20 70 61 72 73 65 73 20 74 68 65 epare parses the
20e0: 0d 0a 20 20 20 20 2f 2f 2f 20 53 51 4c 20 75 70 .. /// SQL up
20f0: 20 74 6f 20 74 6f 20 65 69 74 68 65 72 20 74 68 to to either th
2100: 65 20 65 6e 64 20 6f 66 20 74 68 65 20 74 65 78 e end of the tex
2110: 74 20 6f 72 20 74 6f 20 74 68 65 20 66 69 72 73 t or to the firs
2120: 74 20 73 65 6d 69 2d 63 6f 6c 6f 6e 20 64 65 6c t semi-colon del
2130: 69 6d 69 74 65 72 2e 20 20 54 68 65 20 72 65 6d imiter. The rem
2140: 61 69 6e 69 6e 67 20 74 65 78 74 20 69 73 20 72 aining text is r
2150: 65 74 75 72 6e 65 64 0d 0a 20 20 20 20 2f 2f 2f eturned.. ///
2160: 20 68 65 72 65 20 66 6f 72 20 61 20 73 75 62 73 here for a subs
2170: 65 71 75 65 6e 74 20 63 61 6c 6c 20 74 6f 20 50 equent call to P
2180: 72 65 70 61 72 65 28 29 20 75 6e 74 69 6c 20 61 repare() until a
2190: 6c 6c 20 74 68 65 20 74 65 78 74 20 68 61 73 20 ll the text has
21a0: 62 65 65 6e 20 70 72 6f 63 65 73 73 65 64 2e 3c been processed.<
21b0: 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 2f 2f 2f /param>.. ///
21c0: 20 3c 72 65 74 75 72 6e 73 3e 52 65 74 75 72 6e <returns>Return
21d0: 73 20 61 6e 20 69 6e 69 74 69 61 6c 69 7a 65 64 s an initialized
21e0: 20 53 51 4c 69 74 65 53 74 61 74 65 6d 65 6e 74 SQLiteStatement
21f0: 2e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 .</returns>..
2200: 20 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 61 internal abstra
2210: 63 74 20 53 51 4c 69 74 65 53 74 61 74 65 6d 65 ct SQLiteStateme
2220: 6e 74 20 50 72 65 70 61 72 65 28 53 51 4c 69 74 nt Prepare(SQLit
2230: 65 43 6f 6e 6e 65 63 74 69 6f 6e 20 63 6e 6e 2c eConnection cnn,
2240: 20 73 74 72 69 6e 67 20 73 74 72 53 71 6c 2c 20 string strSql,
2250: 53 51 4c 69 74 65 53 74 61 74 65 6d 65 6e 74 20 SQLiteStatement
2260: 70 72 65 76 69 6f 75 73 2c 20 75 69 6e 74 20 74 previous, uint t
2270: 69 6d 65 6f 75 74 4d 53 2c 20 72 65 66 20 73 74 imeoutMS, ref st
2280: 72 69 6e 67 20 73 74 72 52 65 6d 61 69 6e 29 3b ring strRemain);
2290: 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 .. /// <summa
22a0: 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 53 74 65 ry>.. /// Ste
22b0: 70 73 20 74 68 72 6f 75 67 68 20 61 20 70 72 65 ps through a pre
22c0: 70 61 72 65 64 20 73 74 61 74 65 6d 65 6e 74 2e pared statement.
22d0: 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d .. /// </summ
22e0: 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 70 ary>.. /// <p
22f0: 61 72 61 6d 20 6e 61 6d 65 3d 22 73 74 6d 74 22 aram name="stmt"
2300: 3e 54 68 65 20 53 51 4c 69 74 65 53 74 61 74 65 >The SQLiteState
2310: 6d 65 6e 74 20 74 6f 20 73 74 65 70 20 74 68 72 ment to step thr
2320: 6f 75 67 68 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 ough</param>..
2330: 20 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 3e 54 /// <returns>T
2340: 72 75 65 20 69 66 20 61 20 72 6f 77 20 77 61 73 rue if a row was
2350: 20 72 65 74 75 72 6e 65 64 2c 20 46 61 6c 73 65 returned, False
2360: 20 69 66 20 6e 6f 74 2e 3c 2f 72 65 74 75 72 6e if not.</return
2370: 73 3e 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c s>.. internal
2380: 20 61 62 73 74 72 61 63 74 20 62 6f 6f 6c 20 53 abstract bool S
2390: 74 65 70 28 53 51 4c 69 74 65 53 74 61 74 65 6d tep(SQLiteStatem
23a0: 65 6e 74 20 73 74 6d 74 29 3b 0d 0a 20 20 20 20 ent stmt);..
23b0: 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 /// <summary>..
23c0: 20 20 20 2f 2f 2f 20 52 65 74 75 72 6e 73 20 6e /// Returns n
23d0: 6f 6e 2d 7a 65 72 6f 20 69 66 20 74 68 65 20 73 on-zero if the s
23e0: 70 65 63 69 66 69 65 64 20 73 74 61 74 65 6d 65 pecified stateme
23f0: 6e 74 20 69 73 20 72 65 61 64 2d 6f 6e 6c 79 20 nt is read-only
2400: 69 6e 20 6e 61 74 75 72 65 2e 0d 0a 20 20 20 20 in nature...
2410: 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a /// </summary>..
2420: 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e /// <param n
2430: 61 6d 65 3d 22 73 74 6d 74 22 3e 54 68 65 20 73 ame="stmt">The s
2440: 74 61 74 65 6d 65 6e 74 20 74 6f 20 63 68 65 63 tatement to chec
2450: 6b 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 k.</param>..
2460: 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 3e 54 72 75 /// <returns>Tru
2470: 65 20 69 66 20 74 68 65 20 6f 75 74 65 72 20 71 e if the outer q
2480: 75 65 72 79 20 69 73 20 72 65 61 64 2d 6f 6e 6c uery is read-onl
2490: 79 2e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 20 y.</returns>..
24a0: 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 internal abstr
24b0: 61 63 74 20 62 6f 6f 6c 20 49 73 52 65 61 64 4f act bool IsReadO
24c0: 6e 6c 79 28 53 51 4c 69 74 65 53 74 61 74 65 6d nly(SQLiteStatem
24d0: 65 6e 74 20 73 74 6d 74 29 3b 0d 0a 20 20 20 20 ent stmt);..
24e0: 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 /// <summary>..
24f0: 20 20 20 2f 2f 2f 20 52 65 73 65 74 73 20 61 20 /// Resets a
2500: 70 72 65 70 61 72 65 64 20 73 74 61 74 65 6d 65 prepared stateme
2510: 6e 74 20 73 6f 20 69 74 20 63 61 6e 20 62 65 20 nt so it can be
2520: 65 78 65 63 75 74 65 64 20 61 67 61 69 6e 2e 20 executed again.
2530: 20 49 66 20 74 68 65 20 65 72 72 6f 72 20 72 65 If the error re
2540: 74 75 72 6e 65 64 20 69 73 20 53 51 4c 49 54 45 turned is SQLITE
2550: 5f 53 43 48 45 4d 41 2c 0d 0a 20 20 20 20 2f 2f _SCHEMA,.. //
2560: 2f 20 74 72 61 6e 73 70 61 72 65 6e 74 6c 79 20 / transparently
2570: 61 74 74 65 6d 70 74 20 74 6f 20 72 65 62 75 69 attempt to rebui
2580: 6c 64 20 74 68 65 20 53 51 4c 20 73 74 61 74 65 ld the SQL state
2590: 6d 65 6e 74 20 61 6e 64 20 74 68 72 6f 77 20 61 ment and throw a
25a0: 6e 20 65 72 72 6f 72 20 69 66 20 74 68 61 74 20 n error if that
25b0: 77 61 73 20 6e 6f 74 20 70 6f 73 73 69 62 6c 65 was not possible
25c0: 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d ... /// </sum
25d0: 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c mary>.. /// <
25e0: 70 61 72 61 6d 20 6e 61 6d 65 3d 22 73 74 6d 74 param name="stmt
25f0: 22 3e 54 68 65 20 73 74 61 74 65 6d 65 6e 74 20 ">The statement
2600: 74 6f 20 72 65 73 65 74 3c 2f 70 61 72 61 6d 3e to reset</param>
2610: 0d 0a 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 72 .. /// <retur
2620: 6e 73 3e 52 65 74 75 72 6e 73 20 2d 31 20 69 66 ns>Returns -1 if
2630: 20 74 68 65 20 73 63 68 65 6d 61 20 63 68 61 6e the schema chan
2640: 67 65 64 20 77 68 69 6c 65 20 72 65 73 65 74 74 ged while resett
2650: 69 6e 67 2c 20 30 20 69 66 20 74 68 65 20 72 65 ing, 0 if the re
2660: 73 65 74 20 77 61 73 20 73 75 63 65 73 73 66 75 set was sucessfu
2670: 6c 20 6f 72 20 36 20 28 53 51 4c 49 54 45 5f 4c l or 6 (SQLITE_L
2680: 4f 43 4b 45 44 29 20 69 66 20 74 68 65 20 72 65 OCKED) if the re
2690: 73 65 74 20 66 61 69 6c 65 64 20 64 75 65 20 74 set failed due t
26a0: 6f 20 61 20 6c 6f 63 6b 3c 2f 72 65 74 75 72 6e o a lock</return
26b0: 73 3e 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c s>.. internal
26c0: 20 61 62 73 74 72 61 63 74 20 53 51 4c 69 74 65 abstract SQLite
26d0: 45 72 72 6f 72 43 6f 64 65 20 52 65 73 65 74 28 ErrorCode Reset(
26e0: 53 51 4c 69 74 65 53 74 61 74 65 6d 65 6e 74 20 SQLiteStatement
26f0: 73 74 6d 74 29 3b 0d 0a 0d 0a 20 20 20 20 2f 2f stmt);.... //
2700: 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 / <summary>..
2710: 20 2f 2f 2f 20 41 74 74 65 6d 70 74 73 20 74 6f /// Attempts to
2720: 20 69 6e 74 65 72 72 75 70 74 20 74 68 65 20 71 interrupt the q
2730: 75 65 72 79 20 63 75 72 72 65 6e 74 6c 79 20 65 uery currently e
2740: 78 65 63 75 74 69 6e 67 20 6f 6e 20 74 68 65 20 xecuting on the
2750: 61 73 73 6f 63 69 61 74 65 64 0d 0a 20 20 20 20 associated..
2760: 2f 2f 2f 20 6e 61 74 69 76 65 20 64 61 74 61 62 /// native datab
2770: 61 73 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 2e 0d ase connection..
2780: 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 . /// </summa
2790: 72 79 3e 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 ry>.. interna
27a0: 6c 20 61 62 73 74 72 61 63 74 20 76 6f 69 64 20 l abstract void
27b0: 43 61 6e 63 65 6c 28 29 3b 0d 0a 0d 0a 20 20 20 Cancel();....
27c0: 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a /// <summary>..
27d0: 20 20 20 20 2f 2f 2f 20 54 68 69 73 20 66 75 6e /// This fun
27e0: 63 74 69 6f 6e 20 62 69 6e 64 73 20 61 20 75 73 ction binds a us
27f0: 65 72 2d 64 65 66 69 6e 65 64 20 66 75 6e 63 74 er-defined funct
2800: 69 6f 6e 20 74 6f 20 74 68 65 20 63 6f 6e 6e 65 ion to the conne
2810: 63 74 69 6f 6e 2e 0d 0a 20 20 20 20 2f 2f 2f 20 ction... ///
2820: 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 </summary>..
2830: 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d /// <param name=
2840: 22 66 75 6e 63 74 69 6f 6e 41 74 74 72 69 62 75 "functionAttribu
2850: 74 65 22 3e 0d 0a 20 20 20 20 2f 2f 2f 20 54 68 te">.. /// Th
2860: 65 20 3c 73 65 65 20 63 72 65 66 3d 22 53 51 4c e <see cref="SQL
2870: 69 74 65 46 75 6e 63 74 69 6f 6e 41 74 74 72 69 iteFunctionAttri
2880: 62 75 74 65 22 2f 3e 20 6f 62 6a 65 63 74 20 69 bute"/> object i
2890: 6e 73 74 61 6e 63 65 20 63 6f 6e 74 61 69 6e 69 nstance containi
28a0: 6e 67 0d 0a 20 20 20 20 2f 2f 2f 20 74 68 65 20 ng.. /// the
28b0: 6d 65 74 61 64 61 74 61 20 66 6f 72 20 74 68 65 metadata for the
28c0: 20 66 75 6e 63 74 69 6f 6e 20 74 6f 20 62 65 20 function to be
28d0: 62 6f 75 6e 64 2e 0d 0a 20 20 20 20 2f 2f 2f 20 bound... ///
28e0: 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 2f 2f </param>.. //
28f0: 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 66 / <param name="f
2900: 75 6e 63 74 69 6f 6e 22 3e 0d 0a 20 20 20 20 2f unction">.. /
2910: 2f 2f 20 54 68 65 20 3c 73 65 65 20 63 72 65 66 // The <see cref
2920: 3d 22 53 51 4c 69 74 65 46 75 6e 63 74 69 6f 6e ="SQLiteFunction
2930: 22 2f 3e 20 6f 62 6a 65 63 74 20 69 6e 73 74 61 "/> object insta
2940: 6e 63 65 20 74 68 61 74 20 69 6d 70 6c 65 6d 65 nce that impleme
2950: 6e 74 73 20 74 68 65 0d 0a 20 20 20 20 2f 2f 2f nts the.. ///
2960: 20 66 75 6e 63 74 69 6f 6e 20 74 6f 20 62 65 20 function to be
2970: 62 6f 75 6e 64 2e 0d 0a 20 20 20 20 2f 2f 2f 20 bound... ///
2980: 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 2f 2f </param>.. //
2990: 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 66 / <param name="f
29a0: 6c 61 67 73 22 3e 0d 0a 20 20 20 20 2f 2f 2f 20 lags">.. ///
29b0: 54 68 65 20 66 6c 61 67 73 20 61 73 73 6f 63 69 The flags associ
29c0: 61 74 65 64 20 77 69 74 68 20 74 68 65 20 70 61 ated with the pa
29d0: 72 65 6e 74 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 rent connection
29e0: 6f 62 6a 65 63 74 2e 0d 0a 20 20 20 20 2f 2f 2f object... ///
29f0: 20 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 69 </param>.. i
2a00: 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 61 63 74 nternal abstract
2a10: 20 76 6f 69 64 20 42 69 6e 64 46 75 6e 63 74 69 void BindFuncti
2a20: 6f 6e 28 53 51 4c 69 74 65 46 75 6e 63 74 69 6f on(SQLiteFunctio
2a30: 6e 41 74 74 72 69 62 75 74 65 20 66 75 6e 63 74 nAttribute funct
2a40: 69 6f 6e 41 74 74 72 69 62 75 74 65 2c 20 53 51 ionAttribute, SQ
2a50: 4c 69 74 65 46 75 6e 63 74 69 6f 6e 20 66 75 6e LiteFunction fun
2a60: 63 74 69 6f 6e 2c 20 53 51 4c 69 74 65 43 6f 6e ction, SQLiteCon
2a70: 6e 65 63 74 69 6f 6e 46 6c 61 67 73 20 66 6c 61 nectionFlags fla
2a80: 67 73 29 3b 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 gs);.... ///
2a90: 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f <summary>.. /
2aa0: 2f 2f 20 54 68 69 73 20 66 75 6e 63 74 69 6f 6e // This function
2ab0: 20 75 6e 62 69 6e 64 73 20 61 20 75 73 65 72 2d unbinds a user-
2ac0: 64 65 66 69 6e 65 64 20 66 75 6e 63 74 69 6f 6e defined function
2ad0: 20 66 72 6f 6d 20 74 68 65 20 63 6f 6e 6e 65 63 from the connec
2ae0: 74 69 6f 6e 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c tion... /// <
2af0: 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f /summary>.. /
2b00: 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 // <param name="
2b10: 66 75 6e 63 74 69 6f 6e 41 74 74 72 69 62 75 74 functionAttribut
2b20: 65 22 3e 0d 0a 20 20 20 20 2f 2f 2f 20 54 68 65 e">.. /// The
2b30: 20 3c 73 65 65 20 63 72 65 66 3d 22 53 51 4c 69 <see cref="SQLi
2b40: 74 65 46 75 6e 63 74 69 6f 6e 41 74 74 72 69 62 teFunctionAttrib
2b50: 75 74 65 22 2f 3e 20 6f 62 6a 65 63 74 20 69 6e ute"/> object in
2b60: 73 74 61 6e 63 65 20 63 6f 6e 74 61 69 6e 69 6e stance containin
2b70: 67 0d 0a 20 20 20 20 2f 2f 2f 20 74 68 65 20 6d g.. /// the m
2b80: 65 74 61 64 61 74 61 20 66 6f 72 20 74 68 65 20 etadata for the
2b90: 66 75 6e 63 74 69 6f 6e 20 74 6f 20 62 65 20 75 function to be u
2ba0: 6e 62 6f 75 6e 64 2e 0d 0a 20 20 20 20 2f 2f 2f nbound... ///
2bb0: 20 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 2f </param>.. /
2bc0: 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 // <param name="
2bd0: 66 6c 61 67 73 22 3e 0d 0a 20 20 20 20 2f 2f 2f flags">.. ///
2be0: 20 54 68 65 20 66 6c 61 67 73 20 61 73 73 6f 63 The flags assoc
2bf0: 69 61 74 65 64 20 77 69 74 68 20 74 68 65 20 70 iated with the p
2c00: 61 72 65 6e 74 20 63 6f 6e 6e 65 63 74 69 6f 6e arent connection
2c10: 20 6f 62 6a 65 63 74 2e 0d 0a 20 20 20 20 2f 2f object... //
2c20: 2f 20 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 / </param>..
2c30: 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 3e 4e 6f 6e /// <returns>Non
2c40: 2d 7a 65 72 6f 20 69 66 20 74 68 65 20 66 75 6e -zero if the fun
2c50: 63 74 69 6f 6e 20 77 61 73 20 75 6e 62 6f 75 6e ction was unboun
2c60: 64 2e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 20 d.</returns>..
2c70: 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 internal abstr
2c80: 61 63 74 20 62 6f 6f 6c 20 55 6e 62 69 6e 64 46 act bool UnbindF
2c90: 75 6e 63 74 69 6f 6e 28 53 51 4c 69 74 65 46 75 unction(SQLiteFu
2ca0: 6e 63 74 69 6f 6e 41 74 74 72 69 62 75 74 65 20 nctionAttribute
2cb0: 66 75 6e 63 74 69 6f 6e 41 74 74 72 69 62 75 74 functionAttribut
2cc0: 65 2c 20 53 51 4c 69 74 65 43 6f 6e 6e 65 63 74 e, SQLiteConnect
2cd0: 69 6f 6e 46 6c 61 67 73 20 66 6c 61 67 73 29 3b ionFlags flags);
2ce0: 0d 0a 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c .... internal
2cf0: 20 61 62 73 74 72 61 63 74 20 76 6f 69 64 20 42 abstract void B
2d00: 69 6e 64 5f 44 6f 75 62 6c 65 28 53 51 4c 69 74 ind_Double(SQLit
2d10: 65 53 74 61 74 65 6d 65 6e 74 20 73 74 6d 74 2c eStatement stmt,
2d20: 20 53 51 4c 69 74 65 43 6f 6e 6e 65 63 74 69 6f SQLiteConnectio
2d30: 6e 46 6c 61 67 73 20 66 6c 61 67 73 2c 20 69 6e nFlags flags, in
2d40: 74 20 69 6e 64 65 78 2c 20 64 6f 75 62 6c 65 20 t index, double
2d50: 76 61 6c 75 65 29 3b 0d 0a 20 20 20 20 69 6e 74 value);.. int
2d60: 65 72 6e 61 6c 20 61 62 73 74 72 61 63 74 20 76 ernal abstract v
2d70: 6f 69 64 20 42 69 6e 64 5f 49 6e 74 33 32 28 53 oid Bind_Int32(S
2d80: 51 4c 69 74 65 53 74 61 74 65 6d 65 6e 74 20 73 QLiteStatement s
2d90: 74 6d 74 2c 20 53 51 4c 69 74 65 43 6f 6e 6e 65 tmt, SQLiteConne
2da0: 63 74 69 6f 6e 46 6c 61 67 73 20 66 6c 61 67 73 ctionFlags flags
2db0: 2c 20 69 6e 74 20 69 6e 64 65 78 2c 20 49 6e 74 , int index, Int
2dc0: 33 32 20 76 61 6c 75 65 29 3b 0d 0a 20 20 20 20 32 value);..
2dd0: 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 61 63 internal abstrac
2de0: 74 20 76 6f 69 64 20 42 69 6e 64 5f 55 49 6e 74 t void Bind_UInt
2df0: 33 32 28 53 51 4c 69 74 65 53 74 61 74 65 6d 65 32(SQLiteStateme
2e00: 6e 74 20 73 74 6d 74 2c 20 53 51 4c 69 74 65 43 nt stmt, SQLiteC
2e10: 6f 6e 6e 65 63 74 69 6f 6e 46 6c 61 67 73 20 66 onnectionFlags f
2e20: 6c 61 67 73 2c 20 69 6e 74 20 69 6e 64 65 78 2c lags, int index,
2e30: 20 55 49 6e 74 33 32 20 76 61 6c 75 65 29 3b 0d UInt32 value);.
2e40: 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 . internal ab
2e50: 73 74 72 61 63 74 20 76 6f 69 64 20 42 69 6e 64 stract void Bind
2e60: 5f 49 6e 74 36 34 28 53 51 4c 69 74 65 53 74 61 _Int64(SQLiteSta
2e70: 74 65 6d 65 6e 74 20 73 74 6d 74 2c 20 53 51 4c tement stmt, SQL
2e80: 69 74 65 43 6f 6e 6e 65 63 74 69 6f 6e 46 6c 61 iteConnectionFla
2e90: 67 73 20 66 6c 61 67 73 2c 20 69 6e 74 20 69 6e gs flags, int in
2ea0: 64 65 78 2c 20 49 6e 74 36 34 20 76 61 6c 75 65 dex, Int64 value
2eb0: 29 3b 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c );.. internal
2ec0: 20 61 62 73 74 72 61 63 74 20 76 6f 69 64 20 42 abstract void B
2ed0: 69 6e 64 5f 55 49 6e 74 36 34 28 53 51 4c 69 74 ind_UInt64(SQLit
2ee0: 65 53 74 61 74 65 6d 65 6e 74 20 73 74 6d 74 2c eStatement stmt,
2ef0: 20 53 51 4c 69 74 65 43 6f 6e 6e 65 63 74 69 6f SQLiteConnectio
2f00: 6e 46 6c 61 67 73 20 66 6c 61 67 73 2c 20 69 6e nFlags flags, in
2f10: 74 20 69 6e 64 65 78 2c 20 55 49 6e 74 36 34 20 t index, UInt64
2f20: 76 61 6c 75 65 29 3b 0d 0a 20 20 20 20 69 6e 74 value);.. int
2f30: 65 72 6e 61 6c 20 61 62 73 74 72 61 63 74 20 76 ernal abstract v
2f40: 6f 69 64 20 42 69 6e 64 5f 54 65 78 74 28 53 51 oid Bind_Text(SQ
2f50: 4c 69 74 65 53 74 61 74 65 6d 65 6e 74 20 73 74 LiteStatement st
2f60: 6d 74 2c 20 53 51 4c 69 74 65 43 6f 6e 6e 65 63 mt, SQLiteConnec
2f70: 74 69 6f 6e 46 6c 61 67 73 20 66 6c 61 67 73 2c tionFlags flags,
2f80: 20 69 6e 74 20 69 6e 64 65 78 2c 20 73 74 72 69 int index, stri
2f90: 6e 67 20 76 61 6c 75 65 29 3b 0d 0a 20 20 20 20 ng value);..
2fa0: 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 61 63 internal abstrac
2fb0: 74 20 76 6f 69 64 20 42 69 6e 64 5f 42 6c 6f 62 t void Bind_Blob
2fc0: 28 53 51 4c 69 74 65 53 74 61 74 65 6d 65 6e 74 (SQLiteStatement
2fd0: 20 73 74 6d 74 2c 20 53 51 4c 69 74 65 43 6f 6e stmt, SQLiteCon
2fe0: 6e 65 63 74 69 6f 6e 46 6c 61 67 73 20 66 6c 61 nectionFlags fla
2ff0: 67 73 2c 20 69 6e 74 20 69 6e 64 65 78 2c 20 62 gs, int index, b
3000: 79 74 65 5b 5d 20 62 6c 6f 62 44 61 74 61 29 3b yte[] blobData);
3010: 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 .. internal a
3020: 62 73 74 72 61 63 74 20 76 6f 69 64 20 42 69 6e bstract void Bin
3030: 64 5f 44 61 74 65 54 69 6d 65 28 53 51 4c 69 74 d_DateTime(SQLit
3040: 65 53 74 61 74 65 6d 65 6e 74 20 73 74 6d 74 2c eStatement stmt,
3050: 20 53 51 4c 69 74 65 43 6f 6e 6e 65 63 74 69 6f SQLiteConnectio
3060: 6e 46 6c 61 67 73 20 66 6c 61 67 73 2c 20 69 6e nFlags flags, in
3070: 74 20 69 6e 64 65 78 2c 20 44 61 74 65 54 69 6d t index, DateTim
3080: 65 20 64 74 29 3b 0d 0a 20 20 20 20 69 6e 74 65 e dt);.. inte
3090: 72 6e 61 6c 20 61 62 73 74 72 61 63 74 20 76 6f rnal abstract vo
30a0: 69 64 20 42 69 6e 64 5f 4e 75 6c 6c 28 53 51 4c id Bind_Null(SQL
30b0: 69 74 65 53 74 61 74 65 6d 65 6e 74 20 73 74 6d iteStatement stm
30c0: 74 2c 20 53 51 4c 69 74 65 43 6f 6e 6e 65 63 74 t, SQLiteConnect
30d0: 69 6f 6e 46 6c 61 67 73 20 66 6c 61 67 73 2c 20 ionFlags flags,
30e0: 69 6e 74 20 69 6e 64 65 78 29 3b 0d 0a 0d 0a 20 int index);....
30f0: 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 internal abst
3100: 72 61 63 74 20 69 6e 74 20 42 69 6e 64 5f 50 61 ract int Bind_Pa
3110: 72 61 6d 43 6f 75 6e 74 28 53 51 4c 69 74 65 53 ramCount(SQLiteS
3120: 74 61 74 65 6d 65 6e 74 20 73 74 6d 74 2c 20 53 tatement stmt, S
3130: 51 4c 69 74 65 43 6f 6e 6e 65 63 74 69 6f 6e 46 QLiteConnectionF
3140: 6c 61 67 73 20 66 6c 61 67 73 29 3b 0d 0a 20 20 lags flags);..
3150: 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 internal abstr
3160: 61 63 74 20 73 74 72 69 6e 67 20 42 69 6e 64 5f act string Bind_
3170: 50 61 72 61 6d 4e 61 6d 65 28 53 51 4c 69 74 65 ParamName(SQLite
3180: 53 74 61 74 65 6d 65 6e 74 20 73 74 6d 74 2c 20 Statement stmt,
3190: 53 51 4c 69 74 65 43 6f 6e 6e 65 63 74 69 6f 6e SQLiteConnection
31a0: 46 6c 61 67 73 20 66 6c 61 67 73 2c 20 69 6e 74 Flags flags, int
31b0: 20 69 6e 64 65 78 29 3b 0d 0a 20 20 20 20 69 6e index);.. in
31c0: 74 65 72 6e 61 6c 20 61 62 73 74 72 61 63 74 20 ternal abstract
31d0: 69 6e 74 20 42 69 6e 64 5f 50 61 72 61 6d 49 6e int Bind_ParamIn
31e0: 64 65 78 28 53 51 4c 69 74 65 53 74 61 74 65 6d dex(SQLiteStatem
31f0: 65 6e 74 20 73 74 6d 74 2c 20 53 51 4c 69 74 65 ent stmt, SQLite
3200: 43 6f 6e 6e 65 63 74 69 6f 6e 46 6c 61 67 73 20 ConnectionFlags
3210: 66 6c 61 67 73 2c 20 73 74 72 69 6e 67 20 70 61 flags, string pa
3220: 72 61 6d 4e 61 6d 65 29 3b 0d 0a 0d 0a 20 20 20 ramName);....
3230: 20 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 61 internal abstra
3240: 63 74 20 69 6e 74 20 43 6f 6c 75 6d 6e 43 6f 75 ct int ColumnCou
3250: 6e 74 28 53 51 4c 69 74 65 53 74 61 74 65 6d 65 nt(SQLiteStateme
3260: 6e 74 20 73 74 6d 74 29 3b 0d 0a 20 20 20 20 69 nt stmt);.. i
3270: 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 61 63 74 nternal abstract
3280: 20 73 74 72 69 6e 67 20 43 6f 6c 75 6d 6e 4e 61 string ColumnNa
3290: 6d 65 28 53 51 4c 69 74 65 53 74 61 74 65 6d 65 me(SQLiteStateme
32a0: 6e 74 20 73 74 6d 74 2c 20 69 6e 74 20 69 6e 64 nt stmt, int ind
32b0: 65 78 29 3b 0d 0a 20 20 20 20 69 6e 74 65 72 6e ex);.. intern
32c0: 61 6c 20 61 62 73 74 72 61 63 74 20 54 79 70 65 al abstract Type
32d0: 41 66 66 69 6e 69 74 79 20 43 6f 6c 75 6d 6e 41 Affinity ColumnA
32e0: 66 66 69 6e 69 74 79 28 53 51 4c 69 74 65 53 74 ffinity(SQLiteSt
32f0: 61 74 65 6d 65 6e 74 20 73 74 6d 74 2c 20 69 6e atement stmt, in
3300: 74 20 69 6e 64 65 78 29 3b 0d 0a 20 20 20 20 69 t index);.. i
3310: 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 61 63 74 nternal abstract
3320: 20 73 74 72 69 6e 67 20 43 6f 6c 75 6d 6e 54 79 string ColumnTy
3330: 70 65 28 53 51 4c 69 74 65 53 74 61 74 65 6d 65 pe(SQLiteStateme
3340: 6e 74 20 73 74 6d 74 2c 20 69 6e 74 20 69 6e 64 nt stmt, int ind
3350: 65 78 2c 20 72 65 66 20 54 79 70 65 41 66 66 69 ex, ref TypeAffi
3360: 6e 69 74 79 20 6e 41 66 66 69 6e 69 74 79 29 3b nity nAffinity);
3370: 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 .. internal a
3380: 62 73 74 72 61 63 74 20 69 6e 74 20 43 6f 6c 75 bstract int Colu
3390: 6d 6e 49 6e 64 65 78 28 53 51 4c 69 74 65 53 74 mnIndex(SQLiteSt
33a0: 61 74 65 6d 65 6e 74 20 73 74 6d 74 2c 20 73 74 atement stmt, st
33b0: 72 69 6e 67 20 63 6f 6c 75 6d 6e 4e 61 6d 65 29 ring columnName)
33c0: 3b 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 ;.. internal
33d0: 61 62 73 74 72 61 63 74 20 73 74 72 69 6e 67 20 abstract string
33e0: 43 6f 6c 75 6d 6e 4f 72 69 67 69 6e 61 6c 4e 61 ColumnOriginalNa
33f0: 6d 65 28 53 51 4c 69 74 65 53 74 61 74 65 6d 65 me(SQLiteStateme
3400: 6e 74 20 73 74 6d 74 2c 20 69 6e 74 20 69 6e 64 nt stmt, int ind
3410: 65 78 29 3b 0d 0a 20 20 20 20 69 6e 74 65 72 6e ex);.. intern
3420: 61 6c 20 61 62 73 74 72 61 63 74 20 73 74 72 69 al abstract stri
3430: 6e 67 20 43 6f 6c 75 6d 6e 44 61 74 61 62 61 73 ng ColumnDatabas
3440: 65 4e 61 6d 65 28 53 51 4c 69 74 65 53 74 61 74 eName(SQLiteStat
3450: 65 6d 65 6e 74 20 73 74 6d 74 2c 20 69 6e 74 20 ement stmt, int
3460: 69 6e 64 65 78 29 3b 0d 0a 20 20 20 20 69 6e 74 index);.. int
3470: 65 72 6e 61 6c 20 61 62 73 74 72 61 63 74 20 73 ernal abstract s
3480: 74 72 69 6e 67 20 43 6f 6c 75 6d 6e 54 61 62 6c tring ColumnTabl
3490: 65 4e 61 6d 65 28 53 51 4c 69 74 65 53 74 61 74 eName(SQLiteStat
34a0: 65 6d 65 6e 74 20 73 74 6d 74 2c 20 69 6e 74 20 ement stmt, int
34b0: 69 6e 64 65 78 29 3b 0d 0a 20 20 20 20 69 6e 74 index);.. int
34c0: 65 72 6e 61 6c 20 61 62 73 74 72 61 63 74 20 76 ernal abstract v
34d0: 6f 69 64 20 43 6f 6c 75 6d 6e 4d 65 74 61 44 61 oid ColumnMetaDa
34e0: 74 61 28 73 74 72 69 6e 67 20 64 61 74 61 42 61 ta(string dataBa
34f0: 73 65 2c 20 73 74 72 69 6e 67 20 74 61 62 6c 65 se, string table
3500: 2c 20 73 74 72 69 6e 67 20 63 6f 6c 75 6d 6e 2c , string column,
3510: 20 72 65 66 20 73 74 72 69 6e 67 20 64 61 74 61 ref string data
3520: 54 79 70 65 2c 20 72 65 66 20 73 74 72 69 6e 67 Type, ref string
3530: 20 63 6f 6c 6c 61 74 65 53 65 71 75 65 6e 63 65 collateSequence
3540: 2c 20 72 65 66 20 62 6f 6f 6c 20 6e 6f 74 4e 75 , ref bool notNu
3550: 6c 6c 2c 20 72 65 66 20 62 6f 6f 6c 20 70 72 69 ll, ref bool pri
3560: 6d 61 72 79 4b 65 79 2c 20 72 65 66 20 62 6f 6f maryKey, ref boo
3570: 6c 20 61 75 74 6f 49 6e 63 72 65 6d 65 6e 74 29 l autoIncrement)
3580: 3b 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 ;.. internal
3590: 61 62 73 74 72 61 63 74 20 76 6f 69 64 20 47 65 abstract void Ge
35a0: 74 49 6e 64 65 78 43 6f 6c 75 6d 6e 45 78 74 65 tIndexColumnExte
35b0: 6e 64 65 64 49 6e 66 6f 28 73 74 72 69 6e 67 20 ndedInfo(string
35c0: 64 61 74 61 62 61 73 65 2c 20 73 74 72 69 6e 67 database, string
35d0: 20 69 6e 64 65 78 2c 20 73 74 72 69 6e 67 20 63 index, string c
35e0: 6f 6c 75 6d 6e 2c 20 72 65 66 20 69 6e 74 20 73 olumn, ref int s
35f0: 6f 72 74 4d 6f 64 65 2c 20 72 65 66 20 69 6e 74 ortMode, ref int
3600: 20 6f 6e 45 72 72 6f 72 2c 20 72 65 66 20 73 74 onError, ref st
3610: 72 69 6e 67 20 63 6f 6c 6c 61 74 69 6f 6e 53 65 ring collationSe
3620: 71 75 65 6e 63 65 29 3b 0d 0a 0d 0a 20 20 20 20 quence);....
3630: 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 61 63 internal abstrac
3640: 74 20 6f 62 6a 65 63 74 20 47 65 74 4f 62 6a 65 t object GetObje
3650: 63 74 28 53 51 4c 69 74 65 53 74 61 74 65 6d 65 ct(SQLiteStateme
3660: 6e 74 20 73 74 6d 74 2c 20 69 6e 74 20 69 6e 64 nt stmt, int ind
3670: 65 78 29 3b 0d 0a 20 20 20 20 69 6e 74 65 72 6e ex);.. intern
3680: 61 6c 20 61 62 73 74 72 61 63 74 20 64 6f 75 62 al abstract doub
3690: 6c 65 20 47 65 74 44 6f 75 62 6c 65 28 53 51 4c le GetDouble(SQL
36a0: 69 74 65 53 74 61 74 65 6d 65 6e 74 20 73 74 6d iteStatement stm
36b0: 74 2c 20 69 6e 74 20 69 6e 64 65 78 29 3b 0d 0a t, int index);..
36c0: 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 73 internal abs
36d0: 74 72 61 63 74 20 42 6f 6f 6c 65 61 6e 20 47 65 tract Boolean Ge
36e0: 74 42 6f 6f 6c 65 61 6e 28 53 51 4c 69 74 65 53 tBoolean(SQLiteS
36f0: 74 61 74 65 6d 65 6e 74 20 73 74 6d 74 2c 20 69 tatement stmt, i
3700: 6e 74 20 69 6e 64 65 78 29 3b 0d 0a 20 20 20 20 nt index);..
3710: 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 61 63 internal abstrac
3720: 74 20 53 42 79 74 65 20 47 65 74 53 42 79 74 65 t SByte GetSByte
3730: 28 53 51 4c 69 74 65 53 74 61 74 65 6d 65 6e 74 (SQLiteStatement
3740: 20 73 74 6d 74 2c 20 69 6e 74 20 69 6e 64 65 78 stmt, int index
3750: 29 3b 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c );.. internal
3760: 20 61 62 73 74 72 61 63 74 20 42 79 74 65 20 47 abstract Byte G
3770: 65 74 42 79 74 65 28 53 51 4c 69 74 65 53 74 61 etByte(SQLiteSta
3780: 74 65 6d 65 6e 74 20 73 74 6d 74 2c 20 69 6e 74 tement stmt, int
3790: 20 69 6e 64 65 78 29 3b 0d 0a 20 20 20 20 69 6e index);.. in
37a0: 74 65 72 6e 61 6c 20 61 62 73 74 72 61 63 74 20 ternal abstract
37b0: 49 6e 74 31 36 20 47 65 74 49 6e 74 31 36 28 53 Int16 GetInt16(S
37c0: 51 4c 69 74 65 53 74 61 74 65 6d 65 6e 74 20 73 QLiteStatement s
37d0: 74 6d 74 2c 20 69 6e 74 20 69 6e 64 65 78 29 3b tmt, int index);
37e0: 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 .. internal a
37f0: 62 73 74 72 61 63 74 20 55 49 6e 74 31 36 20 47 bstract UInt16 G
3800: 65 74 55 49 6e 74 31 36 28 53 51 4c 69 74 65 53 etUInt16(SQLiteS
3810: 74 61 74 65 6d 65 6e 74 20 73 74 6d 74 2c 20 69 tatement stmt, i
3820: 6e 74 20 69 6e 64 65 78 29 3b 0d 0a 20 20 20 20 nt index);..
3830: 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 61 63 internal abstrac
3840: 74 20 49 6e 74 33 32 20 47 65 74 49 6e 74 33 32 t Int32 GetInt32
3850: 28 53 51 4c 69 74 65 53 74 61 74 65 6d 65 6e 74 (SQLiteStatement
3860: 20 73 74 6d 74 2c 20 69 6e 74 20 69 6e 64 65 78 stmt, int index
3870: 29 3b 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c );.. internal
3880: 20 61 62 73 74 72 61 63 74 20 55 49 6e 74 33 32 abstract UInt32
3890: 20 47 65 74 55 49 6e 74 33 32 28 53 51 4c 69 74 GetUInt32(SQLit
38a0: 65 53 74 61 74 65 6d 65 6e 74 20 73 74 6d 74 2c eStatement stmt,
38b0: 20 69 6e 74 20 69 6e 64 65 78 29 3b 0d 0a 20 20 int index);..
38c0: 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 internal abstr
38d0: 61 63 74 20 49 6e 74 36 34 20 47 65 74 49 6e 74 act Int64 GetInt
38e0: 36 34 28 53 51 4c 69 74 65 53 74 61 74 65 6d 65 64(SQLiteStateme
38f0: 6e 74 20 73 74 6d 74 2c 20 69 6e 74 20 69 6e 64 nt stmt, int ind
3900: 65 78 29 3b 0d 0a 20 20 20 20 69 6e 74 65 72 6e ex);.. intern
3910: 61 6c 20 61 62 73 74 72 61 63 74 20 55 49 6e 74 al abstract UInt
3920: 36 34 20 47 65 74 55 49 6e 74 36 34 28 53 51 4c 64 GetUInt64(SQL
3930: 69 74 65 53 74 61 74 65 6d 65 6e 74 20 73 74 6d iteStatement stm
3940: 74 2c 20 69 6e 74 20 69 6e 64 65 78 29 3b 0d 0a t, int index);..
3950: 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 73 internal abs
3960: 74 72 61 63 74 20 73 74 72 69 6e 67 20 47 65 74 tract string Get
3970: 54 65 78 74 28 53 51 4c 69 74 65 53 74 61 74 65 Text(SQLiteState
3980: 6d 65 6e 74 20 73 74 6d 74 2c 20 69 6e 74 20 69 ment stmt, int i
3990: 6e 64 65 78 29 3b 0d 0a 20 20 20 20 69 6e 74 65 ndex);.. inte
39a0: 72 6e 61 6c 20 61 62 73 74 72 61 63 74 20 6c 6f rnal abstract lo
39b0: 6e 67 20 47 65 74 42 79 74 65 73 28 53 51 4c 69 ng GetBytes(SQLi
39c0: 74 65 53 74 61 74 65 6d 65 6e 74 20 73 74 6d 74 teStatement stmt
39d0: 2c 20 69 6e 74 20 69 6e 64 65 78 2c 20 69 6e 74 , int index, int
39e0: 20 6e 44 61 74 61 6f 66 66 73 65 74 2c 20 62 79 nDataoffset, by
39f0: 74 65 5b 5d 20 62 44 65 73 74 2c 20 69 6e 74 20 te[] bDest, int
3a00: 6e 53 74 61 72 74 2c 20 69 6e 74 20 6e 4c 65 6e nStart, int nLen
3a10: 67 74 68 29 3b 0d 0a 20 20 20 20 69 6e 74 65 72 gth);.. inter
3a20: 6e 61 6c 20 61 62 73 74 72 61 63 74 20 6c 6f 6e nal abstract lon
3a30: 67 20 47 65 74 43 68 61 72 73 28 53 51 4c 69 74 g GetChars(SQLit
3a40: 65 53 74 61 74 65 6d 65 6e 74 20 73 74 6d 74 2c eStatement stmt,
3a50: 20 69 6e 74 20 69 6e 64 65 78 2c 20 69 6e 74 20 int index, int
3a60: 6e 44 61 74 61 6f 66 66 73 65 74 2c 20 63 68 61 nDataoffset, cha
3a70: 72 5b 5d 20 62 44 65 73 74 2c 20 69 6e 74 20 6e r[] bDest, int n
3a80: 53 74 61 72 74 2c 20 69 6e 74 20 6e 4c 65 6e 67 Start, int nLeng
3a90: 74 68 29 3b 0d 0a 20 20 20 20 69 6e 74 65 72 6e th);.. intern
3aa0: 61 6c 20 61 62 73 74 72 61 63 74 20 44 61 74 65 al abstract Date
3ab0: 54 69 6d 65 20 47 65 74 44 61 74 65 54 69 6d 65 Time GetDateTime
3ac0: 28 53 51 4c 69 74 65 53 74 61 74 65 6d 65 6e 74 (SQLiteStatement
3ad0: 20 73 74 6d 74 2c 20 69 6e 74 20 69 6e 64 65 78 stmt, int index
3ae0: 29 3b 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c );.. internal
3af0: 20 61 62 73 74 72 61 63 74 20 62 6f 6f 6c 20 49 abstract bool I
3b00: 73 4e 75 6c 6c 28 53 51 4c 69 74 65 53 74 61 74 sNull(SQLiteStat
3b10: 65 6d 65 6e 74 20 73 74 6d 74 2c 20 69 6e 74 20 ement stmt, int
3b20: 69 6e 64 65 78 29 3b 0d 0a 0d 0a 20 20 20 20 69 index);.... i
3b30: 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 61 63 74 nternal abstract
3b40: 20 53 51 4c 69 74 65 45 72 72 6f 72 43 6f 64 65 SQLiteErrorCode
3b50: 20 43 72 65 61 74 65 43 6f 6c 6c 61 74 69 6f 6e CreateCollation
3b60: 28 73 74 72 69 6e 67 20 73 74 72 43 6f 6c 6c 61 (string strColla
3b70: 74 69 6f 6e 2c 20 53 51 4c 69 74 65 43 6f 6c 6c tion, SQLiteColl
3b80: 61 74 69 6f 6e 20 66 75 6e 63 2c 20 53 51 4c 69 ation func, SQLi
3b90: 74 65 43 6f 6c 6c 61 74 69 6f 6e 20 66 75 6e 63 teCollation func
3ba0: 31 36 2c 20 62 6f 6f 6c 20 40 74 68 72 6f 77 29 16, bool @throw)
3bb0: 3b 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 ;.. internal
3bc0: 61 62 73 74 72 61 63 74 20 53 51 4c 69 74 65 45 abstract SQLiteE
3bd0: 72 72 6f 72 43 6f 64 65 20 43 72 65 61 74 65 46 rrorCode CreateF
3be0: 75 6e 63 74 69 6f 6e 28 73 74 72 69 6e 67 20 73 unction(string s
3bf0: 74 72 46 75 6e 63 74 69 6f 6e 2c 20 69 6e 74 20 trFunction, int
3c00: 6e 41 72 67 73 2c 20 62 6f 6f 6c 20 6e 65 65 64 nArgs, bool need
3c10: 43 6f 6c 6c 53 65 71 2c 20 53 51 4c 69 74 65 43 CollSeq, SQLiteC
3c20: 61 6c 6c 62 61 63 6b 20 66 75 6e 63 2c 20 53 51 allback func, SQ
3c30: 4c 69 74 65 43 61 6c 6c 62 61 63 6b 20 66 75 6e LiteCallback fun
3c40: 63 73 74 65 70 2c 20 53 51 4c 69 74 65 46 69 6e cstep, SQLiteFin
3c50: 61 6c 43 61 6c 6c 62 61 63 6b 20 66 75 6e 63 66 alCallback funcf
3c60: 69 6e 61 6c 2c 20 62 6f 6f 6c 20 40 74 68 72 6f inal, bool @thro
3c70: 77 29 3b 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 w);.. interna
3c80: 6c 20 61 62 73 74 72 61 63 74 20 43 6f 6c 6c 61 l abstract Colla
3c90: 74 69 6f 6e 53 65 71 75 65 6e 63 65 20 47 65 74 tionSequence Get
3ca0: 43 6f 6c 6c 61 74 69 6f 6e 53 65 71 75 65 6e 63 CollationSequenc
3cb0: 65 28 53 51 4c 69 74 65 46 75 6e 63 74 69 6f 6e e(SQLiteFunction
3cc0: 20 66 75 6e 63 2c 20 49 6e 74 50 74 72 20 63 6f func, IntPtr co
3cd0: 6e 74 65 78 74 29 3b 0d 0a 20 20 20 20 69 6e 74 ntext);.. int
3ce0: 65 72 6e 61 6c 20 61 62 73 74 72 61 63 74 20 69 ernal abstract i
3cf0: 6e 74 20 43 6f 6e 74 65 78 74 43 6f 6c 6c 61 74 nt ContextCollat
3d00: 65 43 6f 6d 70 61 72 65 28 43 6f 6c 6c 61 74 69 eCompare(Collati
3d10: 6f 6e 45 6e 63 6f 64 69 6e 67 45 6e 75 6d 20 65 onEncodingEnum e
3d20: 6e 63 2c 20 49 6e 74 50 74 72 20 63 6f 6e 74 65 nc, IntPtr conte
3d30: 78 74 2c 20 73 74 72 69 6e 67 20 73 31 2c 20 73 xt, string s1, s
3d40: 74 72 69 6e 67 20 73 32 29 3b 0d 0a 20 20 20 20 tring s2);..
3d50: 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 61 63 internal abstrac
3d60: 74 20 69 6e 74 20 43 6f 6e 74 65 78 74 43 6f 6c t int ContextCol
3d70: 6c 61 74 65 43 6f 6d 70 61 72 65 28 43 6f 6c 6c lateCompare(Coll
3d80: 61 74 69 6f 6e 45 6e 63 6f 64 69 6e 67 45 6e 75 ationEncodingEnu
3d90: 6d 20 65 6e 63 2c 20 49 6e 74 50 74 72 20 63 6f m enc, IntPtr co
3da0: 6e 74 65 78 74 2c 20 63 68 61 72 5b 5d 20 63 31 ntext, char[] c1
3db0: 2c 20 63 68 61 72 5b 5d 20 63 32 29 3b 0d 0a 0d , char[] c2);...
3dc0: 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 . internal ab
3dd0: 73 74 72 61 63 74 20 69 6e 74 20 41 67 67 72 65 stract int Aggre
3de0: 67 61 74 65 43 6f 75 6e 74 28 49 6e 74 50 74 72 gateCount(IntPtr
3df0: 20 63 6f 6e 74 65 78 74 29 3b 0d 0a 20 20 20 20 context);..
3e00: 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 61 63 internal abstrac
3e10: 74 20 49 6e 74 50 74 72 20 41 67 67 72 65 67 61 t IntPtr Aggrega
3e20: 74 65 43 6f 6e 74 65 78 74 28 49 6e 74 50 74 72 teContext(IntPtr
3e30: 20 63 6f 6e 74 65 78 74 29 3b 0d 0a 0d 0a 20 20 context);....
3e40: 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 internal abstr
3e50: 61 63 74 20 6c 6f 6e 67 20 47 65 74 50 61 72 61 act long GetPara
3e60: 6d 56 61 6c 75 65 42 79 74 65 73 28 49 6e 74 50 mValueBytes(IntP
3e70: 74 72 20 70 74 72 2c 20 69 6e 74 20 6e 44 61 74 tr ptr, int nDat
3e80: 61 4f 66 66 73 65 74 2c 20 62 79 74 65 5b 5d 20 aOffset, byte[]
3e90: 62 44 65 73 74 2c 20 69 6e 74 20 6e 53 74 61 72 bDest, int nStar
3ea0: 74 2c 20 69 6e 74 20 6e 4c 65 6e 67 74 68 29 3b t, int nLength);
3eb0: 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 .. internal a
3ec0: 62 73 74 72 61 63 74 20 64 6f 75 62 6c 65 20 47 bstract double G
3ed0: 65 74 50 61 72 61 6d 56 61 6c 75 65 44 6f 75 62 etParamValueDoub
3ee0: 6c 65 28 49 6e 74 50 74 72 20 70 74 72 29 3b 0d le(IntPtr ptr);.
3ef0: 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 . internal ab
3f00: 73 74 72 61 63 74 20 69 6e 74 20 47 65 74 50 61 stract int GetPa
3f10: 72 61 6d 56 61 6c 75 65 49 6e 74 33 32 28 49 6e ramValueInt32(In
3f20: 74 50 74 72 20 70 74 72 29 3b 0d 0a 20 20 20 20 tPtr ptr);..
3f30: 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 61 63 internal abstrac
3f40: 74 20 49 6e 74 36 34 20 47 65 74 50 61 72 61 6d t Int64 GetParam
3f50: 56 61 6c 75 65 49 6e 74 36 34 28 49 6e 74 50 74 ValueInt64(IntPt
3f60: 72 20 70 74 72 29 3b 0d 0a 20 20 20 20 69 6e 74 r ptr);.. int
3f70: 65 72 6e 61 6c 20 61 62 73 74 72 61 63 74 20 73 ernal abstract s
3f80: 74 72 69 6e 67 20 47 65 74 50 61 72 61 6d 56 61 tring GetParamVa
3f90: 6c 75 65 54 65 78 74 28 49 6e 74 50 74 72 20 70 lueText(IntPtr p
3fa0: 74 72 29 3b 0d 0a 20 20 20 20 69 6e 74 65 72 6e tr);.. intern
3fb0: 61 6c 20 61 62 73 74 72 61 63 74 20 54 79 70 65 al abstract Type
3fc0: 41 66 66 69 6e 69 74 79 20 47 65 74 50 61 72 61 Affinity GetPara
3fd0: 6d 56 61 6c 75 65 54 79 70 65 28 49 6e 74 50 74 mValueType(IntPt
3fe0: 72 20 70 74 72 29 3b 0d 0a 0d 0a 20 20 20 20 69 r ptr);.... i
3ff0: 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 61 63 74 nternal abstract
4000: 20 76 6f 69 64 20 52 65 74 75 72 6e 42 6c 6f 62 void ReturnBlob
4010: 28 49 6e 74 50 74 72 20 63 6f 6e 74 65 78 74 2c (IntPtr context,
4020: 20 62 79 74 65 5b 5d 20 76 61 6c 75 65 29 3b 0d byte[] value);.
4030: 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 . internal ab
4040: 73 74 72 61 63 74 20 76 6f 69 64 20 52 65 74 75 stract void Retu
4050: 72 6e 44 6f 75 62 6c 65 28 49 6e 74 50 74 72 20 rnDouble(IntPtr
4060: 63 6f 6e 74 65 78 74 2c 20 64 6f 75 62 6c 65 20 context, double
4070: 76 61 6c 75 65 29 3b 0d 0a 20 20 20 20 69 6e 74 value);.. int
4080: 65 72 6e 61 6c 20 61 62 73 74 72 61 63 74 20 76 ernal abstract v
4090: 6f 69 64 20 52 65 74 75 72 6e 45 72 72 6f 72 28 oid ReturnError(
40a0: 49 6e 74 50 74 72 20 63 6f 6e 74 65 78 74 2c 20 IntPtr context,
40b0: 73 74 72 69 6e 67 20 76 61 6c 75 65 29 3b 0d 0a string value);..
40c0: 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 73 internal abs
40d0: 74 72 61 63 74 20 76 6f 69 64 20 52 65 74 75 72 tract void Retur
40e0: 6e 49 6e 74 33 32 28 49 6e 74 50 74 72 20 63 6f nInt32(IntPtr co
40f0: 6e 74 65 78 74 2c 20 49 6e 74 33 32 20 76 61 6c ntext, Int32 val
4100: 75 65 29 3b 0d 0a 20 20 20 20 69 6e 74 65 72 6e ue);.. intern
4110: 61 6c 20 61 62 73 74 72 61 63 74 20 76 6f 69 64 al abstract void
4120: 20 52 65 74 75 72 6e 49 6e 74 36 34 28 49 6e 74 ReturnInt64(Int
4130: 50 74 72 20 63 6f 6e 74 65 78 74 2c 20 49 6e 74 Ptr context, Int
4140: 36 34 20 76 61 6c 75 65 29 3b 0d 0a 20 20 20 20 64 value);..
4150: 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 61 63 internal abstrac
4160: 74 20 76 6f 69 64 20 52 65 74 75 72 6e 4e 75 6c t void ReturnNul
4170: 6c 28 49 6e 74 50 74 72 20 63 6f 6e 74 65 78 74 l(IntPtr context
4180: 29 3b 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c );.. internal
4190: 20 61 62 73 74 72 61 63 74 20 76 6f 69 64 20 52 abstract void R
41a0: 65 74 75 72 6e 54 65 78 74 28 49 6e 74 50 74 72 eturnText(IntPtr
41b0: 20 63 6f 6e 74 65 78 74 2c 20 73 74 72 69 6e 67 context, string
41c0: 20 76 61 6c 75 65 29 3b 0d 0a 0d 0a 23 69 66 20 value);....#if
41d0: 49 4e 54 45 52 4f 50 5f 56 49 52 54 55 41 4c 5f INTEROP_VIRTUAL_
41e0: 54 41 42 4c 45 0d 0a 20 20 20 20 2f 2f 2f 20 3c TABLE.. /// <
41f0: 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f summary>.. //
4200: 2f 20 43 61 6c 6c 73 20 74 68 65 20 6e 61 74 69 / Calls the nati
4210: 76 65 20 53 51 4c 69 74 65 20 63 6f 72 65 20 6c ve SQLite core l
4220: 69 62 72 61 72 79 20 69 6e 20 6f 72 64 65 72 20 ibrary in order
4230: 74 6f 20 63 72 65 61 74 65 20 61 20 64 69 73 70 to create a disp
4240: 6f 73 61 62 6c 65 0d 0a 20 20 20 20 2f 2f 2f 20 osable.. ///
4250: 6d 6f 64 75 6c 65 20 63 6f 6e 74 61 69 6e 69 6e module containin
4260: 67 20 74 68 65 20 69 6d 70 6c 65 6d 65 6e 74 61 g the implementa
4270: 74 69 6f 6e 20 6f 66 20 61 20 76 69 72 74 75 61 tion of a virtua
4280: 6c 20 74 61 62 6c 65 2e 0d 0a 20 20 20 20 2f 2f l table... //
4290: 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 / </summary>..
42a0: 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d /// <param nam
42b0: 65 3d 22 6d 6f 64 75 6c 65 22 3e 0d 0a 20 20 20 e="module">..
42c0: 20 2f 2f 2f 20 54 68 65 20 6d 6f 64 75 6c 65 20 /// The module
42d0: 6f 62 6a 65 63 74 20 74 6f 20 62 65 20 75 73 65 object to be use
42e0: 64 20 77 68 65 6e 20 63 72 65 61 74 69 6e 67 20 d when creating
42f0: 74 68 65 20 6e 61 74 69 76 65 20 64 69 73 70 6f the native dispo
4300: 73 61 62 6c 65 20 6d 6f 64 75 6c 65 2e 0d 0a 20 sable module...
4310: 20 20 20 2f 2f 2f 20 3c 2f 70 61 72 61 6d 3e 0d /// </param>.
4320: 0a 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 . /// <param
4330: 6e 61 6d 65 3d 22 66 6c 61 67 73 22 3e 0d 0a 20 name="flags">..
4340: 20 20 20 2f 2f 2f 20 54 68 65 20 66 6c 61 67 73 /// The flags
4350: 20 66 6f 72 20 74 68 65 20 61 73 73 6f 63 69 61 for the associa
4360: 74 65 64 20 3c 73 65 65 20 63 72 65 66 3d 22 53 ted <see cref="S
4370: 51 4c 69 74 65 43 6f 6e 6e 65 63 74 69 6f 6e 22 QLiteConnection"
4380: 20 2f 3e 20 6f 62 6a 65 63 74 20 69 6e 73 74 61 /> object insta
4390: 6e 63 65 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f nce... /// </
43a0: 70 61 72 61 6d 3e 0d 0a 20 20 20 20 69 6e 74 65 param>.. inte
43b0: 72 6e 61 6c 20 61 62 73 74 72 61 63 74 20 76 6f rnal abstract vo
43c0: 69 64 20 43 72 65 61 74 65 4d 6f 64 75 6c 65 28 id CreateModule(
43d0: 53 51 4c 69 74 65 4d 6f 64 75 6c 65 20 6d 6f 64 SQLiteModule mod
43e0: 75 6c 65 2c 20 53 51 4c 69 74 65 43 6f 6e 6e 65 ule, SQLiteConne
43f0: 63 74 69 6f 6e 46 6c 61 67 73 20 66 6c 61 67 73 ctionFlags flags
4400: 29 3b 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 );.... /// <s
4410: 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f ummary>.. ///
4420: 20 43 61 6c 6c 73 20 74 68 65 20 6e 61 74 69 76 Calls the nativ
4430: 65 20 53 51 4c 69 74 65 20 63 6f 72 65 20 6c 69 e SQLite core li
4440: 62 72 61 72 79 20 69 6e 20 6f 72 64 65 72 20 74 brary in order t
4450: 6f 20 63 6c 65 61 6e 75 70 20 74 68 65 20 72 65 o cleanup the re
4460: 73 6f 75 72 63 65 73 0d 0a 20 20 20 20 2f 2f 2f sources.. ///
4470: 20 61 73 73 6f 63 69 61 74 65 64 20 77 69 74 68 associated with
4480: 20 61 20 6d 6f 64 75 6c 65 20 63 6f 6e 74 61 69 a module contai
4490: 6e 69 6e 67 20 74 68 65 20 69 6d 70 6c 65 6d 65 ning the impleme
44a0: 6e 74 61 74 69 6f 6e 20 6f 66 20 61 20 76 69 72 ntation of a vir
44b0: 74 75 61 6c 20 74 61 62 6c 65 2e 0d 0a 20 20 20 tual table...
44c0: 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d /// </summary>.
44d0: 0a 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 . /// <param
44e0: 6e 61 6d 65 3d 22 6d 6f 64 75 6c 65 22 3e 0d 0a name="module">..
44f0: 20 20 20 20 2f 2f 2f 20 54 68 65 20 6d 6f 64 75 /// The modu
4500: 6c 65 20 6f 62 6a 65 63 74 20 70 72 65 76 69 6f le object previo
4510: 75 73 6c 79 20 70 61 73 73 65 64 20 74 6f 20 74 usly passed to t
4520: 68 65 20 3c 73 65 65 20 63 72 65 66 3d 22 43 72 he <see cref="Cr
4530: 65 61 74 65 4d 6f 64 75 6c 65 22 20 2f 3e 0d 0a eateModule" />..
4540: 20 20 20 20 2f 2f 2f 20 6d 65 74 68 6f 64 2e 0d /// method..
4550: 0a 20 20 20 20 2f 2f 2f 20 3c 2f 70 61 72 61 6d . /// </param
4560: 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 >.. /// <para
4570: 6d 20 6e 61 6d 65 3d 22 66 6c 61 67 73 22 3e 0d m name="flags">.
4580: 0a 20 20 20 20 2f 2f 2f 20 54 68 65 20 66 6c 61 . /// The fla
4590: 67 73 20 66 6f 72 20 74 68 65 20 61 73 73 6f 63 gs for the assoc
45a0: 69 61 74 65 64 20 3c 73 65 65 20 63 72 65 66 3d iated <see cref=
45b0: 22 53 51 4c 69 74 65 43 6f 6e 6e 65 63 74 69 6f "SQLiteConnectio
45c0: 6e 22 20 2f 3e 20 6f 62 6a 65 63 74 20 69 6e 73 n" /> object ins
45d0: 74 61 6e 63 65 2e 0d 0a 20 20 20 20 2f 2f 2f 20 tance... ///
45e0: 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 69 6e </param>.. in
45f0: 74 65 72 6e 61 6c 20 61 62 73 74 72 61 63 74 20 ternal abstract
4600: 76 6f 69 64 20 44 69 73 70 6f 73 65 4d 6f 64 75 void DisposeModu
4610: 6c 65 28 53 51 4c 69 74 65 4d 6f 64 75 6c 65 20 le(SQLiteModule
4620: 6d 6f 64 75 6c 65 2c 20 53 51 4c 69 74 65 43 6f module, SQLiteCo
4630: 6e 6e 65 63 74 69 6f 6e 46 6c 61 67 73 20 66 6c nnectionFlags fl
4640: 61 67 73 29 3b 0d 0a 0d 0a 20 20 20 20 2f 2f 2f ags);.... ///
4650: 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 <summary>..
4660: 2f 2f 2f 20 43 61 6c 6c 73 20 74 68 65 20 6e 61 /// Calls the na
4670: 74 69 76 65 20 53 51 4c 69 74 65 20 63 6f 72 65 tive SQLite core
4680: 20 6c 69 62 72 61 72 79 20 69 6e 20 6f 72 64 65 library in orde
4690: 72 20 74 6f 20 64 65 63 6c 61 72 65 20 61 20 76 r to declare a v
46a0: 69 72 74 75 61 6c 20 74 61 62 6c 65 0d 0a 20 20 irtual table..
46b0: 20 20 2f 2f 2f 20 69 6e 20 72 65 73 70 6f 6e 73 /// in respons
46c0: 65 20 74 6f 20 61 20 63 61 6c 6c 20 69 6e 74 6f e to a call into
46d0: 20 74 68 65 20 3c 73 65 65 20 63 72 65 66 3d 22 the <see cref="
46e0: 49 53 51 4c 69 74 65 4e 61 74 69 76 65 4d 6f 64 ISQLiteNativeMod
46f0: 75 6c 65 2e 78 43 72 65 61 74 65 22 20 2f 3e 0d ule.xCreate" />.
4700: 0a 20 20 20 20 2f 2f 2f 20 6f 72 20 3c 73 65 65 . /// or <see
4710: 20 63 72 65 66 3d 22 49 53 51 4c 69 74 65 4e 61 cref="ISQLiteNa
4720: 74 69 76 65 4d 6f 64 75 6c 65 2e 78 43 6f 6e 6e tiveModule.xConn
4730: 65 63 74 22 20 2f 3e 20 76 69 72 74 75 61 6c 20 ect" /> virtual
4740: 74 61 62 6c 65 20 6d 65 74 68 6f 64 73 2e 0d 0a table methods...
4750: 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 /// </summar
4760: 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 70 61 72 y>.. /// <par
4770: 61 6d 20 6e 61 6d 65 3d 22 6d 6f 64 75 6c 65 22 am name="module"
4780: 3e 0d 0a 20 20 20 20 2f 2f 2f 20 54 68 65 20 76 >.. /// The v
4790: 69 72 74 75 61 6c 20 74 61 62 6c 65 20 6d 6f 64 irtual table mod
47a0: 75 6c 65 20 74 68 61 74 20 69 73 20 74 6f 20 62 ule that is to b
47b0: 65 20 72 65 73 70 6f 6e 73 69 62 6c 65 20 66 6f e responsible fo
47c0: 72 20 74 68 65 20 76 69 72 74 75 61 6c 20 74 61 r the virtual ta
47d0: 62 6c 65 0d 0a 20 20 20 20 2f 2f 2f 20 62 65 69 ble.. /// bei
47e0: 6e 67 20 64 65 63 6c 61 72 65 64 2e 0d 0a 20 20 ng declared...
47f0: 20 20 2f 2f 2f 20 3c 2f 70 61 72 61 6d 3e 0d 0a /// </param>..
4800: 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e /// <param n
4810: 61 6d 65 3d 22 73 74 72 53 71 6c 22 3e 0d 0a 20 ame="strSql">..
4820: 20 20 20 2f 2f 2f 20 54 68 65 20 73 74 72 69 6e /// The strin
4830: 67 20 63 6f 6e 74 61 69 6e 69 6e 67 20 74 68 65 g containing the
4840: 20 53 51 4c 20 73 74 61 74 65 6d 65 6e 74 20 64 SQL statement d
4850: 65 73 63 72 69 62 69 6e 67 20 74 68 65 20 76 69 escribing the vi
4860: 72 74 75 61 6c 20 74 61 62 6c 65 20 74 6f 0d 0a rtual table to..
4870: 20 20 20 20 2f 2f 2f 20 62 65 20 64 65 63 6c 61 /// be decla
4880: 72 65 64 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f red... /// </
4890: 70 61 72 61 6d 3e 0d 0a 20 20 20 20 2f 2f 2f 20 param>.. ///
48a0: 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 65 72 72 <param name="err
48b0: 6f 72 22 3e 0d 0a 20 20 20 20 2f 2f 2f 20 55 70 or">.. /// Up
48c0: 6f 6e 20 73 75 63 63 65 73 73 2c 20 74 68 65 20 on success, the
48d0: 63 6f 6e 74 65 6e 74 73 20 6f 66 20 74 68 69 73 contents of this
48e0: 20 70 61 72 61 6d 65 74 65 72 20 61 72 65 20 75 parameter are u
48f0: 6e 64 65 66 69 6e 65 64 2e 20 20 55 70 6f 6e 20 ndefined. Upon
4900: 66 61 69 6c 75 72 65 2c 0d 0a 20 20 20 20 2f 2f failure,.. //
4910: 2f 20 69 74 20 73 68 6f 75 6c 64 20 63 6f 6e 74 / it should cont
4920: 61 69 6e 20 61 6e 20 61 70 70 72 6f 70 72 69 61 ain an appropria
4930: 74 65 20 65 72 72 6f 72 20 6d 65 73 73 61 67 65 te error message
4940: 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 70 61 72 ... /// </par
4950: 61 6d 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 72 65 am>.. /// <re
4960: 74 75 72 6e 73 3e 0d 0a 20 20 20 20 2f 2f 2f 20 turns>.. ///
4970: 41 20 73 74 61 6e 64 61 72 64 20 53 51 4c 69 74 A standard SQLit
4980: 65 20 72 65 74 75 72 6e 20 63 6f 64 65 2e 0d 0a e return code...
4990: 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 74 75 72 6e /// </return
49a0: 73 3e 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c s>.. internal
49b0: 20 61 62 73 74 72 61 63 74 20 53 51 4c 69 74 65 abstract SQLite
49c0: 45 72 72 6f 72 43 6f 64 65 20 44 65 63 6c 61 72 ErrorCode Declar
49d0: 65 56 69 72 74 75 61 6c 54 61 62 6c 65 28 53 51 eVirtualTable(SQ
49e0: 4c 69 74 65 4d 6f 64 75 6c 65 20 6d 6f 64 75 6c LiteModule modul
49f0: 65 2c 20 73 74 72 69 6e 67 20 73 74 72 53 71 6c e, string strSql
4a00: 2c 20 72 65 66 20 73 74 72 69 6e 67 20 65 72 72 , ref string err
4a10: 6f 72 29 3b 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 or);.... ///
4a20: 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f <summary>.. /
4a30: 2f 2f 20 43 61 6c 6c 73 20 74 68 65 20 6e 61 74 // Calls the nat
4a40: 69 76 65 20 53 51 4c 69 74 65 20 63 6f 72 65 20 ive SQLite core
4a50: 6c 69 62 72 61 72 79 20 69 6e 20 6f 72 64 65 72 library in order
4a60: 20 74 6f 20 64 65 63 6c 61 72 65 20 61 20 76 69 to declare a vi
4a70: 72 74 75 61 6c 20 74 61 62 6c 65 0d 0a 20 20 20 rtual table..
4a80: 20 2f 2f 2f 20 66 75 6e 63 74 69 6f 6e 20 69 6e /// function in
4a90: 20 72 65 73 70 6f 6e 73 65 20 74 6f 20 61 20 63 response to a c
4aa0: 61 6c 6c 20 69 6e 74 6f 20 74 68 65 20 3c 73 65 all into the <se
4ab0: 65 20 63 72 65 66 3d 22 49 53 51 4c 69 74 65 4e e cref="ISQLiteN
4ac0: 61 74 69 76 65 4d 6f 64 75 6c 65 2e 78 43 72 65 ativeModule.xCre
4ad0: 61 74 65 22 20 2f 3e 0d 0a 20 20 20 20 2f 2f 2f ate" />.. ///
4ae0: 20 6f 72 20 3c 73 65 65 20 63 72 65 66 3d 22 49 or <see cref="I
4af0: 53 51 4c 69 74 65 4e 61 74 69 76 65 4d 6f 64 75 SQLiteNativeModu
4b00: 6c 65 2e 78 43 6f 6e 6e 65 63 74 22 20 2f 3e 20 le.xConnect" />
4b10: 76 69 72 74 75 61 6c 20 74 61 62 6c 65 20 6d 65 virtual table me
4b20: 74 68 6f 64 73 2e 0d 0a 20 20 20 20 2f 2f 2f 20 thods... ///
4b30: 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 </summary>..
4b40: 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d /// <param name=
4b50: 22 6d 6f 64 75 6c 65 22 3e 0d 0a 20 20 20 20 2f "module">.. /
4b60: 2f 2f 20 54 68 65 20 76 69 72 74 75 61 6c 20 74 // The virtual t
4b70: 61 62 6c 65 20 6d 6f 64 75 6c 65 20 74 68 61 74 able module that
4b80: 20 69 73 20 74 6f 20 62 65 20 72 65 73 70 6f 6e is to be respon
4b90: 73 69 62 6c 65 20 66 6f 72 20 74 68 65 20 76 69 sible for the vi
4ba0: 72 74 75 61 6c 20 74 61 62 6c 65 0d 0a 20 20 20 rtual table..
4bb0: 20 2f 2f 2f 20 66 75 6e 63 74 69 6f 6e 20 62 65 /// function be
4bc0: 69 6e 67 20 64 65 63 6c 61 72 65 64 2e 0d 0a 20 ing declared...
4bd0: 20 20 20 2f 2f 2f 20 3c 2f 70 61 72 61 6d 3e 0d /// </param>.
4be0: 0a 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 . /// <param
4bf0: 6e 61 6d 65 3d 22 61 72 67 75 6d 65 6e 74 43 6f name="argumentCo
4c00: 75 6e 74 22 3e 0d 0a 20 20 20 20 2f 2f 2f 20 54 unt">.. /// T
4c10: 68 65 20 6e 75 6d 62 65 72 20 6f 66 20 61 72 67 he number of arg
4c20: 75 6d 65 6e 74 73 20 74 6f 20 74 68 65 20 66 75 uments to the fu
4c30: 6e 63 74 69 6f 6e 20 62 65 69 6e 67 20 64 65 63 nction being dec
4c40: 6c 61 72 65 64 2e 0d 0a 20 20 20 20 2f 2f 2f 20 lared... ///
4c50: 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 2f 2f </param>.. //
4c60: 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 6e / <param name="n
4c70: 61 6d 65 22 3e 0d 0a 20 20 20 20 2f 2f 2f 20 54 ame">.. /// T
4c80: 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 66 he name of the f
4c90: 75 6e 63 74 69 6f 6e 20 62 65 69 6e 67 20 64 65 unction being de
4ca0: 63 6c 61 72 65 64 2e 0d 0a 20 20 20 20 2f 2f 2f clared... ///
4cb0: 20 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 2f </param>.. /
4cc0: 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 // <param name="
4cd0: 65 72 72 6f 72 22 3e 0d 0a 20 20 20 20 2f 2f 2f error">.. ///
4ce0: 20 55 70 6f 6e 20 73 75 63 63 65 73 73 2c 20 74 Upon success, t
4cf0: 68 65 20 63 6f 6e 74 65 6e 74 73 20 6f 66 20 74 he contents of t
4d00: 68 69 73 20 70 61 72 61 6d 65 74 65 72 20 61 72 his parameter ar
4d10: 65 20 75 6e 64 65 66 69 6e 65 64 2e 20 20 55 70 e undefined. Up
4d20: 6f 6e 20 66 61 69 6c 75 72 65 2c 0d 0a 20 20 20 on failure,..
4d30: 20 2f 2f 2f 20 69 74 20 73 68 6f 75 6c 64 20 63 /// it should c
4d40: 6f 6e 74 61 69 6e 20 61 6e 20 61 70 70 72 6f 70 ontain an approp
4d50: 72 69 61 74 65 20 65 72 72 6f 72 20 6d 65 73 73 riate error mess
4d60: 61 67 65 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f age... /// </
4d70: 70 61 72 61 6d 3e 0d 0a 20 20 20 20 2f 2f 2f 20 param>.. ///
4d80: 3c 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 2f <returns>.. /
4d90: 2f 2f 20 41 20 73 74 61 6e 64 61 72 64 20 53 51 // A standard SQ
4da0: 4c 69 74 65 20 72 65 74 75 72 6e 20 63 6f 64 65 Lite return code
4db0: 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 74 ... /// </ret
4dc0: 75 72 6e 73 3e 0d 0a 20 20 20 20 69 6e 74 65 72 urns>.. inter
4dd0: 6e 61 6c 20 61 62 73 74 72 61 63 74 20 53 51 4c nal abstract SQL
4de0: 69 74 65 45 72 72 6f 72 43 6f 64 65 20 44 65 63 iteErrorCode Dec
4df0: 6c 61 72 65 56 69 72 74 75 61 6c 46 75 6e 63 74 lareVirtualFunct
4e00: 69 6f 6e 28 53 51 4c 69 74 65 4d 6f 64 75 6c 65 ion(SQLiteModule
4e10: 20 6d 6f 64 75 6c 65 2c 20 69 6e 74 20 61 72 67 module, int arg
4e20: 75 6d 65 6e 74 43 6f 75 6e 74 2c 20 73 74 72 69 umentCount, stri
4e30: 6e 67 20 6e 61 6d 65 2c 20 72 65 66 20 73 74 72 ng name, ref str
4e40: 69 6e 67 20 65 72 72 6f 72 29 3b 0d 0a 23 65 6e ing error);..#en
4e50: 64 69 66 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c dif.... /// <
4e60: 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f summary>.. //
4e70: 2f 20 45 6e 61 62 6c 65 73 20 6f 72 20 64 69 73 / Enables or dis
4e80: 61 62 6c 65 64 20 65 78 74 65 6e 73 69 6f 6e 20 abled extension
4e90: 6c 6f 61 64 69 6e 67 20 62 79 20 53 51 4c 69 74 loading by SQLit
4ea0: 65 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 e... /// </su
4eb0: 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 mmary>.. ///
4ec0: 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 62 4f 6e <param name="bOn
4ed0: 4f 66 66 22 3e 0d 0a 20 20 20 20 2f 2f 2f 20 54 Off">.. /// T
4ee0: 72 75 65 20 74 6f 20 65 6e 61 62 6c 65 20 6c 6f rue to enable lo
4ef0: 61 64 69 6e 67 20 6f 66 20 65 78 74 65 6e 73 69 ading of extensi
4f00: 6f 6e 73 2c 20 66 61 6c 73 65 20 74 6f 20 64 69 ons, false to di
4f10: 73 61 62 6c 65 2e 0d 0a 20 20 20 20 2f 2f 2f 20 sable... ///
4f20: 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 69 6e </param>.. in
4f30: 74 65 72 6e 61 6c 20 61 62 73 74 72 61 63 74 20 ternal abstract
4f40: 76 6f 69 64 20 53 65 74 4c 6f 61 64 45 78 74 65 void SetLoadExte
4f50: 6e 73 69 6f 6e 28 62 6f 6f 6c 20 62 4f 6e 4f 66 nsion(bool bOnOf
4f60: 66 29 3b 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 f);.. /// <su
4f70: 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 mmary>.. ///
4f80: 4c 6f 61 64 73 20 61 20 53 51 4c 69 74 65 20 65 Loads a SQLite e
4f90: 78 74 65 6e 73 69 6f 6e 20 6c 69 62 72 61 72 79 xtension library
4fa0: 20 66 72 6f 6d 20 74 68 65 20 6e 61 6d 65 64 20 from the named
4fb0: 66 69 6c 65 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c file... /// <
4fc0: 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f /summary>.. /
4fd0: 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 // <param name="
4fe0: 66 69 6c 65 4e 61 6d 65 22 3e 0d 0a 20 20 20 20 fileName">..
4ff0: 2f 2f 2f 20 54 68 65 20 6e 61 6d 65 20 6f 66 20 /// The name of
5000: 74 68 65 20 64 79 6e 61 6d 69 63 20 6c 69 6e 6b the dynamic link
5010: 20 6c 69 62 72 61 72 79 20 66 69 6c 65 20 63 6f library file co
5020: 6e 74 61 69 6e 69 6e 67 20 74 68 65 20 65 78 74 ntaining the ext
5030: 65 6e 73 69 6f 6e 2e 0d 0a 20 20 20 20 2f 2f 2f ension... ///
5040: 20 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 2f </param>.. /
5050: 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 // <param name="
5060: 70 72 6f 63 4e 61 6d 65 22 3e 0d 0a 20 20 20 20 procName">..
5070: 2f 2f 2f 20 54 68 65 20 6e 61 6d 65 20 6f 66 20 /// The name of
5080: 74 68 65 20 65 78 70 6f 72 74 65 64 20 66 75 6e the exported fun
5090: 63 74 69 6f 6e 20 75 73 65 64 20 74 6f 20 69 6e ction used to in
50a0: 69 74 69 61 6c 69 7a 65 20 74 68 65 20 65 78 74 itialize the ext
50b0: 65 6e 73 69 6f 6e 2e 0d 0a 20 20 20 20 2f 2f 2f ension... ///
50c0: 20 49 66 20 6e 75 6c 6c 2c 20 74 68 65 20 64 65 If null, the de
50d0: 66 61 75 6c 74 20 22 73 71 6c 69 74 65 33 5f 65 fault "sqlite3_e
50e0: 78 74 65 6e 73 69 6f 6e 5f 69 6e 69 74 22 20 77 xtension_init" w
50f0: 69 6c 6c 20 62 65 20 75 73 65 64 2e 0d 0a 20 20 ill be used...
5100: 20 20 2f 2f 2f 20 3c 2f 70 61 72 61 6d 3e 0d 0a /// </param>..
5110: 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 73 internal abs
5120: 74 72 61 63 74 20 76 6f 69 64 20 4c 6f 61 64 45 tract void LoadE
5130: 78 74 65 6e 73 69 6f 6e 28 73 74 72 69 6e 67 20 xtension(string
5140: 66 69 6c 65 4e 61 6d 65 2c 20 73 74 72 69 6e 67 fileName, string
5150: 20 70 72 6f 63 4e 61 6d 65 29 3b 0d 0a 20 20 20 procName);..
5160: 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a /// <summary>..
5170: 20 20 20 20 2f 2f 2f 20 45 6e 61 62 6c 65 73 20 /// Enables
5180: 6f 72 20 64 69 73 61 62 6c 65 64 20 65 78 74 65 or disabled exte
5190: 6e 65 64 20 72 65 73 75 6c 74 20 63 6f 64 65 73 ned result codes
51a0: 20 72 65 74 75 72 6e 65 64 20 62 79 20 53 51 4c returned by SQL
51b0: 69 74 65 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 ite.. /// </s
51c0: 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f ummary>.. ///
51d0: 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 62 4f <param name="bO
51e0: 6e 4f 66 66 22 3e 74 72 75 65 20 74 6f 20 65 6e nOff">true to en
51f0: 61 62 6c 65 20 65 78 74 65 6e 64 65 64 20 72 65 able extended re
5200: 73 75 6c 74 20 63 6f 64 65 73 2c 20 66 61 6c 73 sult codes, fals
5210: 65 20 74 6f 20 64 69 73 61 62 6c 65 2e 3c 2f 70 e to disable.</p
5220: 61 72 61 6d 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c aram>.. /// <
5230: 72 65 74 75 72 6e 73 3e 3c 2f 72 65 74 75 72 6e returns></return
5240: 73 3e 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c s>.. internal
5250: 20 61 62 73 74 72 61 63 74 20 76 6f 69 64 20 53 abstract void S
5260: 65 74 45 78 74 65 6e 64 65 64 52 65 73 75 6c 74 etExtendedResult
5270: 43 6f 64 65 73 28 62 6f 6f 6c 20 62 4f 6e 4f 66 Codes(bool bOnOf
5280: 66 29 3b 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 f);.. /// <su
5290: 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 mmary>.. ///
52a0: 52 65 74 75 72 6e 73 20 74 68 65 20 6e 75 6d 65 Returns the nume
52b0: 72 69 63 20 72 65 73 75 6c 74 20 63 6f 64 65 20 ric result code
52c0: 66 6f 72 20 74 68 65 20 6d 6f 73 74 20 72 65 63 for the most rec
52d0: 65 6e 74 20 66 61 69 6c 65 64 20 53 51 4c 69 74 ent failed SQLit
52e0: 65 20 41 50 49 20 63 61 6c 6c 0d 0a 20 20 20 20 e API call..
52f0: 2f 2f 2f 20 61 73 73 6f 63 69 61 74 65 64 20 77 /// associated w
5300: 69 74 68 20 74 68 65 20 64 61 74 61 62 61 73 65 ith the database
5310: 20 63 6f 6e 6e 65 63 74 69 6f 6e 2e 0d 0a 20 20 connection...
5320: 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e /// </summary>
5330: 0d 0a 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 72 .. /// <retur
5340: 6e 73 3e 52 65 73 75 6c 74 20 63 6f 64 65 3c 2f ns>Result code</
5350: 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 69 6e returns>.. in
5360: 74 65 72 6e 61 6c 20 61 62 73 74 72 61 63 74 20 ternal abstract
5370: 53 51 4c 69 74 65 45 72 72 6f 72 43 6f 64 65 20 SQLiteErrorCode
5380: 52 65 73 75 6c 74 43 6f 64 65 28 29 3b 0d 0a 20 ResultCode();..
5390: 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e /// <summary>
53a0: 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 6e .. /// Return
53b0: 73 20 74 68 65 20 65 78 74 65 6e 64 65 64 20 6e s the extended n
53c0: 75 6d 65 72 69 63 20 72 65 73 75 6c 74 20 63 6f umeric result co
53d0: 64 65 20 66 6f 72 20 74 68 65 20 6d 6f 73 74 20 de for the most
53e0: 72 65 63 65 6e 74 20 66 61 69 6c 65 64 20 53 51 recent failed SQ
53f0: 4c 69 74 65 20 41 50 49 20 63 61 6c 6c 0d 0a 20 Lite API call..
5400: 20 20 20 2f 2f 2f 20 61 73 73 6f 63 69 61 74 65 /// associate
5410: 64 20 77 69 74 68 20 74 68 65 20 64 61 74 61 62 d with the datab
5420: 61 73 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 2e 0d ase connection..
5430: 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 . /// </summa
5440: 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 72 65 ry>.. /// <re
5450: 74 75 72 6e 73 3e 45 78 74 65 6e 64 65 64 20 72 turns>Extended r
5460: 65 73 75 6c 74 20 63 6f 64 65 3c 2f 72 65 74 75 esult code</retu
5470: 72 6e 73 3e 0d 0a 20 20 20 20 69 6e 74 65 72 6e rns>.. intern
5480: 61 6c 20 61 62 73 74 72 61 63 74 20 53 51 4c 69 al abstract SQLi
5490: 74 65 45 72 72 6f 72 43 6f 64 65 20 45 78 74 65 teErrorCode Exte
54a0: 6e 64 65 64 52 65 73 75 6c 74 43 6f 64 65 28 29 ndedResultCode()
54b0: 3b 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 ;.... /// <su
54c0: 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 mmary>.. ///
54d0: 41 64 64 20 61 20 6c 6f 67 20 6d 65 73 73 61 67 Add a log messag
54e0: 65 20 76 69 61 20 74 68 65 20 53 51 4c 69 74 65 e via the SQLite
54f0: 20 73 71 6c 69 74 65 33 5f 6c 6f 67 20 69 6e 74 sqlite3_log int
5500: 65 72 66 61 63 65 2e 0d 0a 20 20 20 20 2f 2f 2f erface... ///
5510: 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 </summary>..
5520: 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 /// <param name
5530: 3d 22 69 45 72 72 43 6f 64 65 22 3e 45 72 72 6f ="iErrCode">Erro
5540: 72 20 63 6f 64 65 20 74 6f 20 62 65 20 6c 6f 67 r code to be log
5550: 67 65 64 20 77 69 74 68 20 74 68 65 20 6d 65 73 ged with the mes
5560: 73 61 67 65 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 sage.</param>..
5570: 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 /// <param na
5580: 6d 65 3d 22 7a 4d 65 73 73 61 67 65 22 3e 53 74 me="zMessage">St
5590: 72 69 6e 67 20 74 6f 20 62 65 20 6c 6f 67 67 65 ring to be logge
55a0: 64 2e 20 20 55 6e 6c 69 6b 65 20 74 68 65 20 53 d. Unlike the S
55b0: 51 4c 69 74 65 20 73 71 6c 69 74 65 33 5f 6c 6f QLite sqlite3_lo
55c0: 67 28 29 0d 0a 20 20 20 20 2f 2f 2f 20 69 6e 74 g().. /// int
55d0: 65 72 66 61 63 65 2c 20 74 68 69 73 20 73 68 6f erface, this sho
55e0: 75 6c 64 20 62 65 20 70 72 65 2d 66 6f 72 6d 61 uld be pre-forma
55f0: 74 74 65 64 2e 20 20 43 6f 6e 73 69 64 65 72 20 tted. Consider
5600: 75 73 69 6e 67 20 74 68 65 0d 0a 20 20 20 20 2f using the.. /
5610: 2f 2f 20 53 74 72 69 6e 67 2e 46 6f 72 6d 61 74 // String.Format
5620: 28 29 20 66 75 6e 63 74 69 6f 6e 2e 3c 2f 70 61 () function.</pa
5630: 72 61 6d 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 72 ram>.. /// <r
5640: 65 74 75 72 6e 73 3e 3c 2f 72 65 74 75 72 6e 73 eturns></returns
5650: 3e 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 >.. internal
5660: 61 62 73 74 72 61 63 74 20 76 6f 69 64 20 4c 6f abstract void Lo
5670: 67 4d 65 73 73 61 67 65 28 53 51 4c 69 74 65 45 gMessage(SQLiteE
5680: 72 72 6f 72 43 6f 64 65 20 69 45 72 72 43 6f 64 rrorCode iErrCod
5690: 65 2c 20 73 74 72 69 6e 67 20 7a 4d 65 73 73 61 e, string zMessa
56a0: 67 65 29 3b 0d 0a 0d 0a 23 69 66 20 49 4e 54 45 ge);....#if INTE
56b0: 52 4f 50 5f 43 4f 44 45 43 20 7c 7c 20 49 4e 54 ROP_CODEC || INT
56c0: 45 52 4f 50 5f 49 4e 43 4c 55 44 45 5f 53 45 45 EROP_INCLUDE_SEE
56d0: 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 .. internal a
56e0: 62 73 74 72 61 63 74 20 76 6f 69 64 20 53 65 74 bstract void Set
56f0: 50 61 73 73 77 6f 72 64 28 62 79 74 65 5b 5d 20 Password(byte[]
5700: 70 61 73 73 77 6f 72 64 42 79 74 65 73 29 3b 0d passwordBytes);.
5710: 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 . internal ab
5720: 73 74 72 61 63 74 20 76 6f 69 64 20 43 68 61 6e stract void Chan
5730: 67 65 50 61 73 73 77 6f 72 64 28 62 79 74 65 5b gePassword(byte[
5740: 5d 20 6e 65 77 50 61 73 73 77 6f 72 64 42 79 74 ] newPasswordByt
5750: 65 73 29 3b 0d 0a 23 65 6e 64 69 66 0d 0a 0d 0a es);..#endif....
5760: 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 73 internal abs
5770: 74 72 61 63 74 20 76 6f 69 64 20 53 65 74 50 72 tract void SetPr
5780: 6f 67 72 65 73 73 48 6f 6f 6b 28 69 6e 74 20 6e ogressHook(int n
5790: 4f 70 73 2c 20 53 51 4c 69 74 65 50 72 6f 67 72 Ops, SQLiteProgr
57a0: 65 73 73 43 61 6c 6c 62 61 63 6b 20 66 75 6e 63 essCallback func
57b0: 29 3b 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c );.. internal
57c0: 20 61 62 73 74 72 61 63 74 20 76 6f 69 64 20 53 abstract void S
57d0: 65 74 41 75 74 68 6f 72 69 7a 65 72 48 6f 6f 6b etAuthorizerHook
57e0: 28 53 51 4c 69 74 65 41 75 74 68 6f 72 69 7a 65 (SQLiteAuthorize
57f0: 72 43 61 6c 6c 62 61 63 6b 20 66 75 6e 63 29 3b rCallback func);
5800: 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 .. internal a
5810: 62 73 74 72 61 63 74 20 76 6f 69 64 20 53 65 74 bstract void Set
5820: 55 70 64 61 74 65 48 6f 6f 6b 28 53 51 4c 69 74 UpdateHook(SQLit
5830: 65 55 70 64 61 74 65 43 61 6c 6c 62 61 63 6b 20 eUpdateCallback
5840: 66 75 6e 63 29 3b 0d 0a 20 20 20 20 69 6e 74 65 func);.. inte
5850: 72 6e 61 6c 20 61 62 73 74 72 61 63 74 20 76 6f rnal abstract vo
5860: 69 64 20 53 65 74 43 6f 6d 6d 69 74 48 6f 6f 6b id SetCommitHook
5870: 28 53 51 4c 69 74 65 43 6f 6d 6d 69 74 43 61 6c (SQLiteCommitCal
5880: 6c 62 61 63 6b 20 66 75 6e 63 29 3b 0d 0a 20 20 lback func);..
5890: 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 internal abstr
58a0: 61 63 74 20 76 6f 69 64 20 53 65 74 54 72 61 63 act void SetTrac
58b0: 65 43 61 6c 6c 62 61 63 6b 28 53 51 4c 69 74 65 eCallback(SQLite
58c0: 54 72 61 63 65 43 61 6c 6c 62 61 63 6b 20 66 75 TraceCallback fu
58d0: 6e 63 29 3b 0d 0a 20 20 20 20 69 6e 74 65 72 6e nc);.. intern
58e0: 61 6c 20 61 62 73 74 72 61 63 74 20 76 6f 69 64 al abstract void
58f0: 20 53 65 74 52 6f 6c 6c 62 61 63 6b 48 6f 6f 6b SetRollbackHook
5900: 28 53 51 4c 69 74 65 52 6f 6c 6c 62 61 63 6b 43 (SQLiteRollbackC
5910: 61 6c 6c 62 61 63 6b 20 66 75 6e 63 29 3b 0d 0a allback func);..
5920: 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 73 internal abs
5930: 74 72 61 63 74 20 53 51 4c 69 74 65 45 72 72 6f tract SQLiteErro
5940: 72 43 6f 64 65 20 53 65 74 4c 6f 67 43 61 6c 6c rCode SetLogCall
5950: 62 61 63 6b 28 53 51 4c 69 74 65 4c 6f 67 43 61 back(SQLiteLogCa
5960: 6c 6c 62 61 63 6b 20 66 75 6e 63 29 3b 0d 0a 0d llback func);...
5970: 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 . /// <summar
5980: 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 43 68 65 63 y>.. /// Chec
5990: 6b 73 20 69 66 20 74 68 65 20 53 51 4c 69 74 65 ks if the SQLite
59a0: 20 63 6f 72 65 20 6c 69 62 72 61 72 79 20 68 61 core library ha
59b0: 73 20 62 65 65 6e 20 69 6e 69 74 69 61 6c 69 7a s been initializ
59c0: 65 64 20 69 6e 20 74 68 65 20 63 75 72 72 65 6e ed in the curren
59d0: 74 20 70 72 6f 63 65 73 73 2e 0d 0a 20 20 20 20 t process...
59e0: 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a /// </summary>..
59f0: 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 /// <returns
5a00: 3e 0d 0a 20 20 20 20 2f 2f 2f 20 4e 6f 6e 2d 7a >.. /// Non-z
5a10: 65 72 6f 20 69 66 20 74 68 65 20 53 51 4c 69 74 ero if the SQLit
5a20: 65 20 63 6f 72 65 20 6c 69 62 72 61 72 79 20 68 e core library h
5a30: 61 73 20 62 65 65 6e 20 69 6e 69 74 69 61 6c 69 as been initiali
5a40: 7a 65 64 20 69 6e 20 74 68 65 20 63 75 72 72 65 zed in the curre
5a50: 6e 74 20 70 72 6f 63 65 73 73 2c 0d 0a 20 20 20 nt process,..
5a60: 20 2f 2f 2f 20 7a 65 72 6f 20 6f 74 68 65 72 77 /// zero otherw
5a70: 69 73 65 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f ise... /// </
5a80: 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 69 6e returns>.. in
5a90: 74 65 72 6e 61 6c 20 61 62 73 74 72 61 63 74 20 ternal abstract
5aa0: 62 6f 6f 6c 20 49 73 49 6e 69 74 69 61 6c 69 7a bool IsInitializ
5ab0: 65 64 28 29 3b 0d 0a 0d 0a 20 20 20 20 69 6e 74 ed();.... int
5ac0: 65 72 6e 61 6c 20 61 62 73 74 72 61 63 74 20 69 ernal abstract i
5ad0: 6e 74 20 47 65 74 43 75 72 73 6f 72 46 6f 72 54 nt GetCursorForT
5ae0: 61 62 6c 65 28 53 51 4c 69 74 65 53 74 61 74 65 able(SQLiteState
5af0: 6d 65 6e 74 20 73 74 6d 74 2c 20 69 6e 74 20 64 ment stmt, int d
5b00: 61 74 61 62 61 73 65 2c 20 69 6e 74 20 72 6f 6f atabase, int roo
5b10: 74 50 61 67 65 29 3b 0d 0a 20 20 20 20 69 6e 74 tPage);.. int
5b20: 65 72 6e 61 6c 20 61 62 73 74 72 61 63 74 20 6c ernal abstract l
5b30: 6f 6e 67 20 47 65 74 52 6f 77 49 64 46 6f 72 43 ong GetRowIdForC
5b40: 75 72 73 6f 72 28 53 51 4c 69 74 65 53 74 61 74 ursor(SQLiteStat
5b50: 65 6d 65 6e 74 20 73 74 6d 74 2c 20 69 6e 74 20 ement stmt, int
5b60: 63 75 72 73 6f 72 29 3b 0d 0a 0d 0a 20 20 20 20 cursor);....
5b70: 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 61 63 internal abstrac
5b80: 74 20 6f 62 6a 65 63 74 20 47 65 74 56 61 6c 75 t object GetValu
5b90: 65 28 53 51 4c 69 74 65 53 74 61 74 65 6d 65 6e e(SQLiteStatemen
5ba0: 74 20 73 74 6d 74 2c 20 53 51 4c 69 74 65 43 6f t stmt, SQLiteCo
5bb0: 6e 6e 65 63 74 69 6f 6e 46 6c 61 67 73 20 66 6c nnectionFlags fl
5bc0: 61 67 73 2c 20 69 6e 74 20 69 6e 64 65 78 2c 20 ags, int index,
5bd0: 53 51 4c 69 74 65 54 79 70 65 20 74 79 70 29 3b SQLiteType typ);
5be0: 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d .... /// <sum
5bf0: 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 52 mary>.. /// R
5c00: 65 74 75 72 6e 73 20 6e 6f 6e 2d 7a 65 72 6f 20 eturns non-zero
5c10: 69 66 20 74 68 65 20 67 69 76 65 6e 20 64 61 74 if the given dat
5c20: 61 62 61 73 65 20 63 6f 6e 6e 65 63 74 69 6f 6e abase connection
5c30: 20 69 73 20 69 6e 20 61 75 74 6f 63 6f 6d 6d 69 is in autocommi
5c40: 74 20 6d 6f 64 65 2e 0d 0a 20 20 20 20 2f 2f 2f t mode... ///
5c50: 20 41 75 74 6f 63 6f 6d 6d 69 74 20 6d 6f 64 65 Autocommit mode
5c60: 20 69 73 20 6f 6e 20 62 79 20 64 65 66 61 75 6c is on by defaul
5c70: 74 2e 20 20 41 75 74 6f 63 6f 6d 6d 69 74 20 6d t. Autocommit m
5c80: 6f 64 65 20 69 73 20 64 69 73 61 62 6c 65 64 20 ode is disabled
5c90: 62 79 20 61 20 42 45 47 49 4e 0d 0a 20 20 20 20 by a BEGIN..
5ca0: 2f 2f 2f 20 73 74 61 74 65 6d 65 6e 74 2e 20 20 /// statement.
5cb0: 41 75 74 6f 63 6f 6d 6d 69 74 20 6d 6f 64 65 20 Autocommit mode
5cc0: 69 73 20 72 65 2d 65 6e 61 62 6c 65 64 20 62 79 is re-enabled by
5cd0: 20 61 20 43 4f 4d 4d 49 54 20 6f 72 20 52 4f 4c a COMMIT or ROL
5ce0: 4c 42 41 43 4b 2e 0d 0a 20 20 20 20 2f 2f 2f 20 LBACK... ///
5cf0: 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 </summary>..
5d00: 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 61 63 internal abstrac
5d10: 74 20 62 6f 6f 6c 20 41 75 74 6f 43 6f 6d 6d 69 t bool AutoCommi
5d20: 74 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 t.. {..
5d30: 67 65 74 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 get;.. }....
5d40: 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 internal abst
5d50: 72 61 63 74 20 53 51 4c 69 74 65 45 72 72 6f 72 ract SQLiteError
5d60: 43 6f 64 65 20 46 69 6c 65 43 6f 6e 74 72 6f 6c Code FileControl
5d70: 28 73 74 72 69 6e 67 20 7a 44 62 4e 61 6d 65 2c (string zDbName,
5d80: 20 69 6e 74 20 6f 70 2c 20 49 6e 74 50 74 72 20 int op, IntPtr
5d90: 70 41 72 67 29 3b 0d 0a 0d 0a 20 20 20 20 2f 2f pArg);.... //
5da0: 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 / <summary>..
5db0: 20 2f 2f 2f 20 43 72 65 61 74 65 73 20 61 20 6e /// Creates a n
5dc0: 65 77 20 53 51 4c 69 74 65 20 62 61 63 6b 75 70 ew SQLite backup
5dd0: 20 6f 62 6a 65 63 74 20 62 61 73 65 64 20 6f 6e object based on
5de0: 20 74 68 65 20 70 72 6f 76 69 64 65 64 20 64 65 the provided de
5df0: 73 74 69 6e 61 74 69 6f 6e 0d 0a 20 20 20 20 2f stination.. /
5e00: 2f 2f 20 64 61 74 61 62 61 73 65 20 63 6f 6e 6e // database conn
5e10: 65 63 74 69 6f 6e 2e 20 20 54 68 65 20 73 6f 75 ection. The sou
5e20: 72 63 65 20 64 61 74 61 62 61 73 65 20 63 6f 6e rce database con
5e30: 6e 65 63 74 69 6f 6e 20 69 73 20 74 68 65 20 6f nection is the o
5e40: 6e 65 0d 0a 20 20 20 20 2f 2f 2f 20 61 73 73 6f ne.. /// asso
5e50: 63 69 61 74 65 64 20 77 69 74 68 20 74 68 69 73 ciated with this
5e60: 20 6f 62 6a 65 63 74 2e 20 20 54 68 65 20 73 6f object. The so
5e70: 75 72 63 65 20 61 6e 64 20 64 65 73 74 69 6e 61 urce and destina
5e80: 74 69 6f 6e 20 64 61 74 61 62 61 73 65 0d 0a 20 tion database..
5e90: 20 20 20 2f 2f 2f 20 63 6f 6e 6e 65 63 74 69 6f /// connectio
5ea0: 6e 73 20 63 61 6e 6e 6f 74 20 62 65 20 74 68 65 ns cannot be the
5eb0: 20 73 61 6d 65 2e 0d 0a 20 20 20 20 2f 2f 2f 20 same... ///
5ec0: 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 </summary>..
5ed0: 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d /// <param name=
5ee0: 22 64 65 73 74 43 6e 6e 22 3e 54 68 65 20 64 65 "destCnn">The de
5ef0: 73 74 69 6e 61 74 69 6f 6e 20 64 61 74 61 62 61 stination databa
5f00: 73 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 2e 3c 2f se connection.</
5f10: 70 61 72 61 6d 3e 0d 0a 20 20 20 20 2f 2f 2f 20 param>.. ///
5f20: 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 64 65 73 <param name="des
5f30: 74 4e 61 6d 65 22 3e 54 68 65 20 64 65 73 74 69 tName">The desti
5f40: 6e 61 74 69 6f 6e 20 64 61 74 61 62 61 73 65 20 nation database
5f50: 6e 61 6d 65 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 name.</param>..
5f60: 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 /// <param na
5f70: 6d 65 3d 22 73 6f 75 72 63 65 4e 61 6d 65 22 3e me="sourceName">
5f80: 54 68 65 20 73 6f 75 72 63 65 20 64 61 74 61 62 The source datab
5f90: 61 73 65 20 6e 61 6d 65 2e 3c 2f 70 61 72 61 6d ase name.</param
5fa0: 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 >.. /// <retu
5fb0: 72 6e 73 3e 54 68 65 20 6e 65 77 6c 79 20 63 72 rns>The newly cr
5fc0: 65 61 74 65 64 20 62 61 63 6b 75 70 20 6f 62 6a eated backup obj
5fd0: 65 63 74 2e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a ect.</returns>..
5fe0: 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 73 internal abs
5ff0: 74 72 61 63 74 20 53 51 4c 69 74 65 42 61 63 6b tract SQLiteBack
6000: 75 70 20 49 6e 69 74 69 61 6c 69 7a 65 42 61 63 up InitializeBac
6010: 6b 75 70 28 0d 0a 20 20 20 20 20 20 20 20 53 51 kup(.. SQ
6020: 4c 69 74 65 43 6f 6e 6e 65 63 74 69 6f 6e 20 64 LiteConnection d
6030: 65 73 74 43 6e 6e 2c 20 73 74 72 69 6e 67 20 64 estCnn, string d
6040: 65 73 74 4e 61 6d 65 2c 0d 0a 20 20 20 20 20 20 estName,..
6050: 20 20 73 74 72 69 6e 67 20 73 6f 75 72 63 65 4e string sourceN
6060: 61 6d 65 29 3b 0d 0a 0d 0a 20 20 20 20 2f 2f 2f ame);.... ///
6070: 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 <summary>..
6080: 2f 2f 2f 20 43 6f 70 69 65 73 20 75 70 20 74 6f /// Copies up to
6090: 20 4e 20 70 61 67 65 73 20 66 72 6f 6d 20 74 68 N pages from th
60a0: 65 20 73 6f 75 72 63 65 20 64 61 74 61 62 61 73 e source databas
60b0: 65 20 74 6f 20 74 68 65 20 64 65 73 74 69 6e 61 e to the destina
60c0: 74 69 6f 6e 0d 0a 20 20 20 20 2f 2f 2f 20 64 61 tion.. /// da
60d0: 74 61 62 61 73 65 20 61 73 73 6f 63 69 61 74 65 tabase associate
60e0: 64 20 77 69 74 68 20 74 68 65 20 73 70 65 63 69 d with the speci
60f0: 66 69 65 64 20 62 61 63 6b 75 70 20 6f 62 6a 65 fied backup obje
6100: 63 74 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 ct... /// </s
6110: 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f ummary>.. ///
6120: 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 62 61 <param name="ba
6130: 63 6b 75 70 22 3e 54 68 65 20 62 61 63 6b 75 70 ckup">The backup
6140: 20 6f 62 6a 65 63 74 20 74 6f 20 75 73 65 2e 3c object to use.<
6150: 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 2f 2f 2f /param>.. ///
6160: 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 6e 50 <param name="nP
6170: 61 67 65 22 3e 0d 0a 20 20 20 20 2f 2f 2f 20 54 age">.. /// T
6180: 68 65 20 6e 75 6d 62 65 72 20 6f 66 20 70 61 67 he number of pag
6190: 65 73 20 74 6f 20 63 6f 70 79 20 6f 72 20 6e 65 es to copy or ne
61a0: 67 61 74 69 76 65 20 74 6f 20 63 6f 70 79 20 61 gative to copy a
61b0: 6c 6c 20 72 65 6d 61 69 6e 69 6e 67 20 70 61 67 ll remaining pag
61c0: 65 73 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 70 es... /// </p
61d0: 61 72 61 6d 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c aram>.. /// <
61e0: 70 61 72 61 6d 20 6e 61 6d 65 3d 22 72 65 74 72 param name="retr
61f0: 79 22 3e 0d 0a 20 20 20 20 2f 2f 2f 20 53 65 74 y">.. /// Set
6200: 20 74 6f 20 74 72 75 65 20 69 66 20 74 68 65 20 to true if the
6210: 6f 70 65 72 61 74 69 6f 6e 20 6e 65 65 64 73 20 operation needs
6220: 74 6f 20 62 65 20 72 65 74 72 69 65 64 20 64 75 to be retried du
6230: 65 20 74 6f 20 64 61 74 61 62 61 73 65 0d 0a 20 e to database..
6240: 20 20 20 2f 2f 2f 20 6c 6f 63 6b 69 6e 67 20 69 /// locking i
6250: 73 73 75 65 73 2e 0d 0a 20 20 20 20 2f 2f 2f 20 ssues... ///
6260: 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 2f 2f </param>.. //
6270: 2f 20 3c 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 / <returns>..
6280: 20 2f 2f 2f 20 54 72 75 65 20 69 66 20 74 68 65 /// True if the
6290: 72 65 20 61 72 65 20 6d 6f 72 65 20 70 61 67 65 re are more page
62a0: 73 20 74 6f 20 62 65 20 63 6f 70 69 65 64 2c 20 s to be copied,
62b0: 66 61 6c 73 65 20 6f 74 68 65 72 77 69 73 65 2e false otherwise.
62c0: 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 74 75 .. /// </retu
62d0: 72 6e 73 3e 0d 0a 20 20 20 20 69 6e 74 65 72 6e rns>.. intern
62e0: 61 6c 20 61 62 73 74 72 61 63 74 20 62 6f 6f 6c al abstract bool
62f0: 20 53 74 65 70 42 61 63 6b 75 70 28 53 51 4c 69 StepBackup(SQLi
6300: 74 65 42 61 63 6b 75 70 20 62 61 63 6b 75 70 2c teBackup backup,
6310: 20 69 6e 74 20 6e 50 61 67 65 2c 20 72 65 66 20 int nPage, ref
6320: 62 6f 6f 6c 20 72 65 74 72 79 29 3b 0d 0a 0d 0a bool retry);....
6330: 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 /// <summary
6340: 3e 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 >.. /// Retur
6350: 6e 73 20 74 68 65 20 6e 75 6d 62 65 72 20 6f 66 ns the number of
6360: 20 70 61 67 65 73 20 72 65 6d 61 69 6e 69 6e 67 pages remaining
6370: 20 74 6f 20 62 65 20 63 6f 70 69 65 64 20 66 72 to be copied fr
6380: 6f 6d 20 74 68 65 20 73 6f 75 72 63 65 0d 0a 20 om the source..
6390: 20 20 20 2f 2f 2f 20 64 61 74 61 62 61 73 65 20 /// database
63a0: 74 6f 20 74 68 65 20 64 65 73 74 69 6e 61 74 69 to the destinati
63b0: 6f 6e 20 64 61 74 61 62 61 73 65 20 61 73 73 6f on database asso
63c0: 63 69 61 74 65 64 20 77 69 74 68 20 74 68 65 20 ciated with the
63d0: 73 70 65 63 69 66 69 65 64 0d 0a 20 20 20 20 2f specified.. /
63e0: 2f 2f 20 62 61 63 6b 75 70 20 6f 62 6a 65 63 74 // backup object
63f0: 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d ... /// </sum
6400: 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c mary>.. /// <
6410: 70 61 72 61 6d 20 6e 61 6d 65 3d 22 62 61 63 6b param name="back
6420: 75 70 22 3e 54 68 65 20 62 61 63 6b 75 70 20 6f up">The backup o
6430: 62 6a 65 63 74 20 74 6f 20 63 68 65 63 6b 2e 3c bject to check.<
6440: 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 2f 2f 2f /param>.. ///
6450: 20 3c 72 65 74 75 72 6e 73 3e 54 68 65 20 6e 75 <returns>The nu
6460: 6d 62 65 72 20 6f 66 20 70 61 67 65 73 20 72 65 mber of pages re
6470: 6d 61 69 6e 69 6e 67 20 74 6f 20 62 65 20 63 6f maining to be co
6480: 70 69 65 64 2e 3c 2f 72 65 74 75 72 6e 73 3e 0d pied.</returns>.
6490: 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 . internal ab
64a0: 73 74 72 61 63 74 20 69 6e 74 20 52 65 6d 61 69 stract int Remai
64b0: 6e 69 6e 67 42 61 63 6b 75 70 28 53 51 4c 69 74 ningBackup(SQLit
64c0: 65 42 61 63 6b 75 70 20 62 61 63 6b 75 70 29 3b eBackup backup);
64d0: 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d .... /// <sum
64e0: 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 52 mary>.. /// R
64f0: 65 74 75 72 6e 73 20 74 68 65 20 74 6f 74 61 6c eturns the total
6500: 20 6e 75 6d 62 65 72 20 6f 66 20 70 61 67 65 73 number of pages
6510: 20 69 6e 20 74 68 65 20 73 6f 75 72 63 65 20 64 in the source d
6520: 61 74 61 62 61 73 65 20 61 73 73 6f 63 69 61 74 atabase associat
6530: 65 64 0d 0a 20 20 20 20 2f 2f 2f 20 77 69 74 68 ed.. /// with
6540: 20 74 68 65 20 73 70 65 63 69 66 69 65 64 20 62 the specified b
6550: 61 63 6b 75 70 20 6f 62 6a 65 63 74 2e 0d 0a 20 ackup object...
6560: 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 /// </summary
6570: 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 >.. /// <para
6580: 6d 20 6e 61 6d 65 3d 22 62 61 63 6b 75 70 22 3e m name="backup">
6590: 54 68 65 20 62 61 63 6b 75 70 20 6f 62 6a 65 63 The backup objec
65a0: 74 20 74 6f 20 63 68 65 63 6b 2e 3c 2f 70 61 72 t to check.</par
65b0: 61 6d 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 72 65 am>.. /// <re
65c0: 74 75 72 6e 73 3e 54 68 65 20 74 6f 74 61 6c 20 turns>The total
65d0: 6e 75 6d 62 65 72 20 6f 66 20 70 61 67 65 73 20 number of pages
65e0: 69 6e 20 74 68 65 20 73 6f 75 72 63 65 20 64 61 in the source da
65f0: 74 61 62 61 73 65 2e 3c 2f 72 65 74 75 72 6e 73 tabase.</returns
6600: 3e 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 >.. internal
6610: 61 62 73 74 72 61 63 74 20 69 6e 74 20 50 61 67 abstract int Pag
6620: 65 43 6f 75 6e 74 42 61 63 6b 75 70 28 53 51 4c eCountBackup(SQL
6630: 69 74 65 42 61 63 6b 75 70 20 62 61 63 6b 75 70 iteBackup backup
6640: 29 3b 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 );.... /// <s
6650: 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f ummary>.. ///
6660: 20 44 65 73 74 72 6f 79 73 20 74 68 65 20 62 61 Destroys the ba
6670: 63 6b 75 70 20 6f 62 6a 65 63 74 2c 20 72 6f 6c ckup object, rol
6680: 6c 69 6e 67 20 62 61 63 6b 20 61 6e 79 20 62 61 ling back any ba
6690: 63 6b 75 70 20 74 68 61 74 20 6d 61 79 20 62 65 ckup that may be
66a0: 20 69 6e 0d 0a 20 20 20 20 2f 2f 2f 20 70 72 6f in.. /// pro
66b0: 67 65 73 73 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c gess... /// <
66c0: 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f /summary>.. /
66d0: 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 // <param name="
66e0: 62 61 63 6b 75 70 22 3e 54 68 65 20 62 61 63 6b backup">The back
66f0: 75 70 20 6f 62 6a 65 63 74 20 74 6f 20 64 65 73 up object to des
6700: 74 72 6f 79 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 troy.</param>..
6710: 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 internal abst
6720: 72 61 63 74 20 76 6f 69 64 20 46 69 6e 69 73 68 ract void Finish
6730: 42 61 63 6b 75 70 28 53 51 4c 69 74 65 42 61 63 Backup(SQLiteBac
6740: 6b 75 70 20 62 61 63 6b 75 70 29 3b 0d 0a 0d 0a kup backup);....
6750: 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////
6760: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
6770: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
6780: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
6790: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
67a0: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
67b0: 2f 2f 2f 0d 0a 0d 0a 20 20 20 20 23 72 65 67 69 ///.... #regi
67c0: 6f 6e 20 49 44 69 73 70 6f 73 61 62 6c 65 20 4d on IDisposable M
67d0: 65 6d 62 65 72 73 0d 0a 20 20 20 20 70 75 62 6c embers.. publ
67e0: 69 63 20 76 6f 69 64 20 44 69 73 70 6f 73 65 28 ic void Dispose(
67f0: 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 ).. {..
6800: 20 20 44 69 73 70 6f 73 65 28 74 72 75 65 29 3b Dispose(true);
6810: 0d 0a 20 20 20 20 20 20 20 20 47 43 2e 53 75 70 .. GC.Sup
6820: 70 72 65 73 73 46 69 6e 61 6c 69 7a 65 28 74 68 pressFinalize(th
6830: 69 73 29 3b 0d 0a 20 20 20 20 7d 0d 0a 20 20 20 is);.. }..
6840: 20 23 65 6e 64 72 65 67 69 6f 6e 0d 0a 0d 0a 20 #endregion....
6850: 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f /////////////
6860: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
6870: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
6880: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
6890: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
68a0: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
68b0: 2f 2f 0d 0a 0d 0a 20 20 20 20 23 72 65 67 69 6f //.... #regio
68c0: 6e 20 49 44 69 73 70 6f 73 61 62 6c 65 20 22 50 n IDisposable "P
68d0: 61 74 74 65 72 6e 22 20 4d 65 6d 62 65 72 73 0d attern" Members.
68e0: 0a 20 20 20 20 70 72 69 76 61 74 65 20 62 6f 6f . private boo
68f0: 6c 20 64 69 73 70 6f 73 65 64 3b 0d 0a 20 20 20 l disposed;..
6900: 20 70 72 69 76 61 74 65 20 76 6f 69 64 20 43 68 private void Ch
6910: 65 63 6b 44 69 73 70 6f 73 65 64 28 29 20 2f 2a eckDisposed() /*
6920: 20 74 68 72 6f 77 20 2a 2f 0d 0a 20 20 20 20 7b throw */.. {
6930: 0d 0a 23 69 66 20 54 48 52 4f 57 5f 4f 4e 5f 44 ..#if THROW_ON_D
6940: 49 53 50 4f 53 45 44 0d 0a 20 20 20 20 20 20 20 ISPOSED..
6950: 20 69 66 20 28 64 69 73 70 6f 73 65 64 29 0d 0a if (disposed)..
6960: 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f thro
6970: 77 20 6e 65 77 20 4f 62 6a 65 63 74 44 69 73 70 w new ObjectDisp
6980: 6f 73 65 64 45 78 63 65 70 74 69 6f 6e 28 74 79 osedException(ty
6990: 70 65 6f 66 28 53 51 4c 69 74 65 42 61 73 65 29 peof(SQLiteBase)
69a0: 2e 4e 61 6d 65 29 3b 0d 0a 23 65 6e 64 69 66 0d .Name);..#endif.
69b0: 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f . }.... //
69c0: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
69d0: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
69e0: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
69f0: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
6a00: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
6a10: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 0d 0a 0d /////////////...
6a20: 0a 20 20 20 20 70 72 6f 74 65 63 74 65 64 20 76 . protected v
6a30: 69 72 74 75 61 6c 20 76 6f 69 64 20 44 69 73 70 irtual void Disp
6a40: 6f 73 65 28 62 6f 6f 6c 20 64 69 73 70 6f 73 69 ose(bool disposi
6a50: 6e 67 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 ng).. {..
6a60: 20 20 20 20 69 66 20 28 21 64 69 73 70 6f 73 65 if (!dispose
6a70: 64 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 d).. {..
6a80: 20 20 20 20 20 20 20 20 20 20 20 2f 2f 69 66 20 //if
6a90: 28 64 69 73 70 6f 73 69 6e 67 29 0d 0a 20 20 20 (disposing)..
6aa0: 20 20 20 20 20 20 20 20 20 2f 2f 7b 0d 0a 20 20 //{..
6ab0: 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 //
6ac0: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
6ad0: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
6ae0: 2f 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 20 20 20 ////..
6af0: 20 20 2f 2f 20 20 20 20 2f 2f 20 64 69 73 70 6f // // dispo
6b00: 73 65 20 6d 61 6e 61 67 65 64 20 72 65 73 6f 75 se managed resou
6b10: 72 63 65 73 20 68 65 72 65 2e 2e 2e 0d 0a 20 20 rces here.....
6b20: 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 //
6b30: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
6b40: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
6b50: 2f 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 20 20 20 ////..
6b60: 20 20 2f 2f 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 //}....
6b70: 20 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ///////////
6b80: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
6b90: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 0d 0a 20 20 20 ///////////..
6ba0: 20 20 20 20 20 20 20 20 20 2f 2f 20 72 65 6c 65 // rele
6bb0: 61 73 65 20 75 6e 6d 61 6e 61 67 65 64 20 72 65 ase unmanaged re
6bc0: 73 6f 75 72 63 65 73 20 68 65 72 65 2e 2e 2e 0d sources here....
6bd0: 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f . ///
6be0: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
6bf0: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
6c00: 2f 2f 2f 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 ///....
6c10: 20 20 20 64 69 73 70 6f 73 65 64 20 3d 20 74 72 disposed = tr
6c20: 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a ue;.. }..
6c30: 20 20 20 20 7d 0d 0a 20 20 20 20 23 65 6e 64 72 }.. #endr
6c40: 65 67 69 6f 6e 0d 0a 0d 0a 20 20 20 20 2f 2f 2f egion.... ///
6c50: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
6c60: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
6c70: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
6c80: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
6c90: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
6ca0: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 0d 0a 0d 0a ////////////....
6cb0: 20 20 20 20 23 72 65 67 69 6f 6e 20 44 65 73 74 #region Dest
6cc0: 72 75 63 74 6f 72 0d 0a 20 20 20 20 7e 53 51 4c ructor.. ~SQL
6cd0: 69 74 65 42 61 73 65 28 29 0d 0a 20 20 20 20 7b iteBase().. {
6ce0: 0d 0a 20 20 20 20 20 20 20 20 44 69 73 70 6f 73 .. Dispos
6cf0: 65 28 66 61 6c 73 65 29 3b 0d 0a 20 20 20 20 7d e(false);.. }
6d00: 0d 0a 20 20 20 20 23 65 6e 64 72 65 67 69 6f 6e .. #endregion
6d10: 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f .... ////////
6d20: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
6d30: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
6d40: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
6d50: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
6d60: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
6d70: 2f 2f 2f 2f 2f 2f 2f 0d 0a 0d 0a 20 20 20 20 2f ///////.... /
6d80: 2f 20 54 68 65 73 65 20 73 74 61 74 69 63 73 20 / These statics
6d90: 61 72 65 20 68 65 72 65 20 66 6f 72 20 6c 61 63 are here for lac
6da0: 6b 20 6f 66 20 61 20 62 65 74 74 65 72 20 70 6c k of a better pl
6db0: 61 63 65 20 74 6f 20 70 75 74 20 74 68 65 6d 2e ace to put them.
6dc0: 0d 0a 20 20 20 20 2f 2f 20 54 68 65 79 20 65 78 .. // They ex
6dd0: 69 73 74 20 68 65 72 65 20 62 65 63 61 75 73 65 ist here because
6de0: 20 74 68 65 79 20 61 72 65 20 63 61 6c 6c 65 64 they are called
6df0: 20 64 75 72 69 6e 67 20 74 68 65 20 66 69 6e 61 during the fina
6e00: 6c 69 7a 61 74 69 6f 6e 20 6f 66 0d 0a 20 20 20 lization of..
6e10: 20 2f 2f 20 61 20 53 51 4c 69 74 65 53 74 61 74 // a SQLiteStat
6e20: 65 6d 65 6e 74 48 61 6e 64 6c 65 2c 20 53 51 4c ementHandle, SQL
6e30: 69 74 65 43 6f 6e 6e 65 63 74 69 6f 6e 48 61 6e iteConnectionHan
6e40: 64 6c 65 2c 20 61 6e 64 20 53 51 4c 69 74 65 46 dle, and SQLiteF
6e50: 75 6e 63 74 69 6f 6e 43 6f 6f 6b 69 65 48 61 6e unctionCookieHan
6e60: 64 6c 65 2e 0d 0a 20 20 20 20 2f 2f 20 54 68 65 dle... // The
6e70: 72 65 66 6f 72 65 20 74 68 65 73 65 20 66 75 6e refore these fun
6e80: 63 74 69 6f 6e 73 20 68 61 76 65 20 74 6f 20 62 ctions have to b
6e90: 65 20 73 74 61 74 69 63 2c 20 61 6e 64 20 68 61 e static, and ha
6ea0: 76 65 20 74 6f 20 62 65 20 6c 6f 77 2d 6c 65 76 ve to be low-lev
6eb0: 65 6c 2e 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 2f 2f el..... /////
6ec0: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
6ed0: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
6ee0: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
6ef0: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
6f00: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
6f10: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 0d 0a 0d 0a 20 20 //////////....
6f20: 20 20 70 72 69 76 61 74 65 20 73 74 61 74 69 63 private static
6f30: 20 73 74 72 69 6e 67 5b 5d 20 5f 65 72 72 6f 72 string[] _error
6f40: 4d 65 73 73 61 67 65 73 20 3d 20 7b 0d 0a 20 20 Messages = {..
6f50: 20 20 20 20 20 20 2f 2a 20 53 51 4c 49 54 45 5f /* SQLITE_
6f60: 4f 4b 20 20 20 20 20 20 20 20 20 20 2a 2f 20 22 OK */ "
6f70: 6e 6f 74 20 61 6e 20 65 72 72 6f 72 22 2c 0d 0a not an error",..
6f80: 20 20 20 20 20 20 20 20 2f 2a 20 53 51 4c 49 54 /* SQLIT
6f90: 45 5f 45 52 52 4f 52 20 20 20 20 20 20 20 2a 2f E_ERROR */
6fa0: 20 22 53 51 4c 20 6c 6f 67 69 63 20 65 72 72 6f "SQL logic erro
6fb0: 72 20 6f 72 20 6d 69 73 73 69 6e 67 20 64 61 74 r or missing dat
6fc0: 61 62 61 73 65 22 2c 0d 0a 20 20 20 20 20 20 20 abase",..
6fd0: 20 2f 2a 20 53 51 4c 49 54 45 5f 49 4e 54 45 52 /* SQLITE_INTER
6fe0: 4e 41 4c 20 20 20 20 2a 2f 20 22 69 6e 74 65 72 NAL */ "inter
6ff0: 6e 61 6c 20 6c 6f 67 69 63 20 65 72 72 6f 72 22 nal logic error"
7000: 2c 0d 0a 20 20 20 20 20 20 20 20 2f 2a 20 53 51 ,.. /* SQ
7010: 4c 49 54 45 5f 50 45 52 4d 20 20 20 20 20 20 20 LITE_PERM
7020: 20 2a 2f 20 22 61 63 63 65 73 73 20 70 65 72 6d */ "access perm
7030: 69 73 73 69 6f 6e 20 64 65 6e 69 65 64 22 2c 0d ission denied",.
7040: 0a 20 20 20 20 20 20 20 20 2f 2a 20 53 51 4c 49 . /* SQLI
7050: 54 45 5f 41 42 4f 52 54 20 20 20 20 20 20 20 2a TE_ABORT *
7060: 2f 20 22 63 61 6c 6c 62 61 63 6b 20 72 65 71 75 / "callback requ
7070: 65 73 74 65 64 20 71 75 65 72 79 20 61 62 6f 72 ested query abor
7080: 74 22 2c 0d 0a 20 20 20 20 20 20 20 20 2f 2a 20 t",.. /*
7090: 53 51 4c 49 54 45 5f 42 55 53 59 20 20 20 20 20 SQLITE_BUSY
70a0: 20 20 20 2a 2f 20 22 64 61 74 61 62 61 73 65 20 */ "database
70b0: 69 73 20 6c 6f 63 6b 65 64 22 2c 0d 0a 20 20 20 is locked",..
70c0: 20 20 20 20 20 2f 2a 20 53 51 4c 49 54 45 5f 4c /* SQLITE_L
70d0: 4f 43 4b 45 44 20 20 20 20 20 20 2a 2f 20 22 64 OCKED */ "d
70e0: 61 74 61 62 61 73 65 20 74 61 62 6c 65 20 69 73 atabase table is
70f0: 20 6c 6f 63 6b 65 64 22 2c 0d 0a 20 20 20 20 20 locked",..
7100: 20 20 20 2f 2a 20 53 51 4c 49 54 45 5f 4e 4f 4d /* SQLITE_NOM
7110: 45 4d 20 20 20 20 20 20 20 2a 2f 20 22 6f 75 74 EM */ "out
7120: 20 6f 66 20 6d 65 6d 6f 72 79 22 2c 0d 0a 20 20 of memory",..
7130: 20 20 20 20 20 20 2f 2a 20 53 51 4c 49 54 45 5f /* SQLITE_
7140: 52 45 41 44 4f 4e 4c 59 20 20 20 20 2a 2f 20 22 READONLY */ "
7150: 61 74 74 65 6d 70 74 20 74 6f 20 77 72 69 74 65 attempt to write
7160: 20 61 20 72 65 61 64 6f 6e 6c 79 20 64 61 74 61 a readonly data
7170: 62 61 73 65 22 2c 0d 0a 20 20 20 20 20 20 20 20 base",..
7180: 2f 2a 20 53 51 4c 49 54 45 5f 49 4e 54 45 52 52 /* SQLITE_INTERR
7190: 55 50 54 20 20 20 2a 2f 20 22 69 6e 74 65 72 72 UPT */ "interr
71a0: 75 70 74 65 64 22 2c 0d 0a 20 20 20 20 20 20 20 upted",..
71b0: 20 2f 2a 20 53 51 4c 49 54 45 5f 49 4f 45 52 52 /* SQLITE_IOERR
71c0: 20 20 20 20 20 20 20 2a 2f 20 22 64 69 73 6b 20 */ "disk
71d0: 49 2f 4f 20 65 72 72 6f 72 22 2c 0d 0a 20 20 20 I/O error",..
71e0: 20 20 20 20 20 2f 2a 20 53 51 4c 49 54 45 5f 43 /* SQLITE_C
71f0: 4f 52 52 55 50 54 20 20 20 20 20 2a 2f 20 22 64 ORRUPT */ "d
7200: 61 74 61 62 61 73 65 20 64 69 73 6b 20 69 6d 61 atabase disk ima
7210: 67 65 20 69 73 20 6d 61 6c 66 6f 72 6d 65 64 22 ge is malformed"
7220: 2c 0d 0a 20 20 20 20 20 20 20 20 2f 2a 20 53 51 ,.. /* SQ
7230: 4c 49 54 45 5f 4e 4f 54 46 4f 55 4e 44 20 20 20 LITE_NOTFOUND
7240: 20 2a 2f 20 22 75 6e 6b 6e 6f 77 6e 20 6f 70 65 */ "unknown ope
7250: 72 61 74 69 6f 6e 22 2c 0d 0a 20 20 20 20 20 20 ration",..
7260: 20 20 2f 2a 20 53 51 4c 49 54 45 5f 46 55 4c 4c /* SQLITE_FULL
7270: 20 20 20 20 20 20 20 20 2a 2f 20 22 64 61 74 61 */ "data
7280: 62 61 73 65 20 6f 72 20 64 69 73 6b 20 69 73 20 base or disk is
7290: 66 75 6c 6c 22 2c 0d 0a 20 20 20 20 20 20 20 20 full",..
72a0: 2f 2a 20 53 51 4c 49 54 45 5f 43 41 4e 54 4f 50 /* SQLITE_CANTOP
72b0: 45 4e 20 20 20 20 2a 2f 20 22 75 6e 61 62 6c 65 EN */ "unable
72c0: 20 74 6f 20 6f 70 65 6e 20 64 61 74 61 62 61 73 to open databas
72d0: 65 20 66 69 6c 65 22 2c 0d 0a 20 20 20 20 20 20 e file",..
72e0: 20 20 2f 2a 20 53 51 4c 49 54 45 5f 50 52 4f 54 /* SQLITE_PROT
72f0: 4f 43 4f 4c 20 20 20 20 2a 2f 20 22 6c 6f 63 6b OCOL */ "lock
7300: 69 6e 67 20 70 72 6f 74 6f 63 6f 6c 22 2c 0d 0a ing protocol",..
7310: 20 20 20 20 20 20 20 20 2f 2a 20 53 51 4c 49 54 /* SQLIT
7320: 45 5f 45 4d 50 54 59 20 20 20 20 20 20 20 2a 2f E_EMPTY */
7330: 20 22 74 61 62 6c 65 20 63 6f 6e 74 61 69 6e 73 "table contains
7340: 20 6e 6f 20 64 61 74 61 22 2c 0d 0a 20 20 20 20 no data",..
7350: 20 20 20 20 2f 2a 20 53 51 4c 49 54 45 5f 53 43 /* SQLITE_SC
7360: 48 45 4d 41 20 20 20 20 20 20 2a 2f 20 22 64 61 HEMA */ "da
7370: 74 61 62 61 73 65 20 73 63 68 65 6d 61 20 68 61 tabase schema ha
7380: 73 20 63 68 61 6e 67 65 64 22 2c 0d 0a 20 20 20 s changed",..
7390: 20 20 20 20 20 2f 2a 20 53 51 4c 49 54 45 5f 54 /* SQLITE_T
73a0: 4f 4f 42 49 47 20 20 20 20 20 20 2a 2f 20 22 73 OOBIG */ "s
73b0: 74 72 69 6e 67 20 6f 72 20 62 6c 6f 62 20 74 6f tring or blob to
73c0: 6f 20 62 69 67 22 2c 0d 0a 20 20 20 20 20 20 20 o big",..
73d0: 20 2f 2a 20 53 51 4c 49 54 45 5f 43 4f 4e 53 54 /* SQLITE_CONST
73e0: 52 41 49 4e 54 20 20 2a 2f 20 22 63 6f 6e 73 74 RAINT */ "const
73f0: 72 61 69 6e 74 20 66 61 69 6c 65 64 22 2c 0d 0a raint failed",..
7400: 20 20 20 20 20 20 20 20 2f 2a 20 53 51 4c 49 54 /* SQLIT
7410: 45 5f 4d 49 53 4d 41 54 43 48 20 20 20 20 2a 2f E_MISMATCH */
7420: 20 22 64 61 74 61 74 79 70 65 20 6d 69 73 6d 61 "datatype misma
7430: 74 63 68 22 2c 0d 0a 20 20 20 20 20 20 20 20 2f tch",.. /
7440: 2a 20 53 51 4c 49 54 45 5f 4d 49 53 55 53 45 20 * SQLITE_MISUSE
7450: 20 20 20 20 20 2a 2f 20 22 6c 69 62 72 61 72 79 */ "library
7460: 20 72 6f 75 74 69 6e 65 20 63 61 6c 6c 65 64 20 routine called
7470: 6f 75 74 20 6f 66 20 73 65 71 75 65 6e 63 65 22 out of sequence"
7480: 2c 0d 0a 20 20 20 20 20 20 20 20 2f 2a 20 53 51 ,.. /* SQ
7490: 4c 49 54 45 5f 4e 4f 4c 46 53 20 20 20 20 20 20 LITE_NOLFS
74a0: 20 2a 2f 20 22 6c 61 72 67 65 20 66 69 6c 65 20 */ "large file
74b0: 73 75 70 70 6f 72 74 20 69 73 20 64 69 73 61 62 support is disab
74c0: 6c 65 64 22 2c 0d 0a 20 20 20 20 20 20 20 20 2f led",.. /
74d0: 2a 20 53 51 4c 49 54 45 5f 41 55 54 48 20 20 20 * SQLITE_AUTH
74e0: 20 20 20 20 20 2a 2f 20 22 61 75 74 68 6f 72 69 */ "authori
74f0: 7a 61 74 69 6f 6e 20 64 65 6e 69 65 64 22 2c 0d zation denied",.
7500: 0a 20 20 20 20 20 20 20 20 2f 2a 20 53 51 4c 49 . /* SQLI
7510: 54 45 5f 46 4f 52 4d 41 54 20 20 20 20 20 20 2a TE_FORMAT *
7520: 2f 20 22 61 75 78 69 6c 69 61 72 79 20 64 61 74 / "auxiliary dat
7530: 61 62 61 73 65 20 66 6f 72 6d 61 74 20 65 72 72 abase format err
7540: 6f 72 22 2c 0d 0a 20 20 20 20 20 20 20 20 2f 2a or",.. /*
7550: 20 53 51 4c 49 54 45 5f 52 41 4e 47 45 20 20 20 SQLITE_RANGE
7560: 20 20 20 20 2a 2f 20 22 62 69 6e 64 20 6f 72 20 */ "bind or
7570: 63 6f 6c 75 6d 6e 20 69 6e 64 65 78 20 6f 75 74 column index out
7580: 20 6f 66 20 72 61 6e 67 65 22 2c 0d 0a 20 20 20 of range",..
7590: 20 20 20 20 20 2f 2a 20 53 51 4c 49 54 45 5f 4e /* SQLITE_N
75a0: 4f 54 41 44 42 20 20 20 20 20 20 2a 2f 20 22 66 OTADB */ "f
75b0: 69 6c 65 20 69 73 20 65 6e 63 72 79 70 74 65 64 ile is encrypted
75c0: 20 6f 72 20 69 73 20 6e 6f 74 20 61 20 64 61 74 or is not a dat
75d0: 61 62 61 73 65 22 2c 0d 0a 20 20 20 20 20 20 20 abase",..
75e0: 20 2f 2a 20 53 51 4c 49 54 45 5f 4e 4f 54 49 43 /* SQLITE_NOTIC
75f0: 45 20 20 20 20 20 20 2a 2f 20 22 6e 6f 74 69 66 E */ "notif
7600: 69 63 61 74 69 6f 6e 20 6d 65 73 73 61 67 65 22 ication message"
7610: 2c 0d 0a 20 20 20 20 20 20 20 20 2f 2a 20 53 51 ,.. /* SQ
7620: 4c 49 54 45 5f 57 41 52 4e 49 4e 47 20 20 20 20 LITE_WARNING
7630: 20 2a 2f 20 22 77 61 72 6e 69 6e 67 20 6d 65 73 */ "warning mes
7640: 73 61 67 65 22 0d 0a 20 20 20 20 7d 3b 0d 0a 0d sage".. };...
7650: 0a 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f . ///////////
7660: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
7670: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
7680: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
7690: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
76a0: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
76b0: 2f 2f 2f 2f 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 ////.... ///
76c0: 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f <summary>.. /
76d0: 2f 2f 20 52 65 74 75 72 6e 73 20 74 68 65 20 65 // Returns the e
76e0: 72 72 6f 72 20 6d 65 73 73 61 67 65 20 66 6f 72 rror message for
76f0: 20 74 68 65 20 73 70 65 63 69 66 69 65 64 20 53 the specified S
7700: 51 4c 69 74 65 20 72 65 74 75 72 6e 20 63 6f 64 QLite return cod
7710: 65 20 75 73 69 6e 67 0d 0a 20 20 20 20 2f 2f 2f e using.. ///
7720: 20 74 68 65 20 69 6e 74 65 72 6e 61 6c 20 73 74 the internal st
7730: 61 74 69 63 20 6c 6f 6f 6b 75 70 20 74 61 62 6c atic lookup tabl
7740: 65 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 e... /// </su
7750: 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 mmary>.. ///
7760: 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 72 63 22 <param name="rc"
7770: 3e 54 68 65 20 53 51 4c 69 74 65 20 72 65 74 75 >The SQLite retu
7780: 72 6e 20 63 6f 64 65 2e 3c 2f 70 61 72 61 6d 3e rn code.</param>
7790: 0d 0a 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 72 .. /// <retur
77a0: 6e 73 3e 54 68 65 20 65 72 72 6f 72 20 6d 65 73 ns>The error mes
77b0: 73 61 67 65 20 6f 72 20 6e 75 6c 6c 20 69 66 20 sage or null if
77c0: 69 74 20 63 61 6e 6e 6f 74 20 62 65 20 66 6f 75 it cannot be fou
77d0: 6e 64 2e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 nd.</returns>..
77e0: 20 20 20 70 72 6f 74 65 63 74 65 64 20 73 74 61 protected sta
77f0: 74 69 63 20 73 74 72 69 6e 67 20 46 61 6c 6c 62 tic string Fallb
7800: 61 63 6b 47 65 74 45 72 72 6f 72 53 74 72 69 6e ackGetErrorStrin
7810: 67 28 53 51 4c 69 74 65 45 72 72 6f 72 43 6f 64 g(SQLiteErrorCod
7820: 65 20 72 63 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 e rc).. {..
7830: 20 20 20 20 20 20 69 66 20 28 5f 65 72 72 6f 72 if (_error
7840: 4d 65 73 73 61 67 65 73 20 3d 3d 20 6e 75 6c 6c Messages == null
7850: 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 ).. r
7860: 65 74 75 72 6e 20 6e 75 6c 6c 3b 0d 0a 0d 0a 20 eturn null;....
7870: 20 20 20 20 20 20 20 69 6e 74 20 69 6e 64 65 78 int index
7880: 20 3d 20 28 69 6e 74 29 72 63 3b 0d 0a 0d 0a 20 = (int)rc;....
7890: 20 20 20 20 20 20 20 69 66 20 28 28 69 6e 64 65 if ((inde
78a0: 78 20 3c 20 30 29 20 7c 7c 20 28 69 6e 64 65 78 x < 0) || (index
78b0: 20 3e 3d 20 5f 65 72 72 6f 72 4d 65 73 73 61 67 >= _errorMessag
78c0: 65 73 2e 4c 65 6e 67 74 68 29 29 0d 0a 20 20 20 es.Length))..
78d0: 20 20 20 20 20 20 20 20 20 69 6e 64 65 78 20 3d index =
78e0: 20 28 69 6e 74 29 53 51 4c 69 74 65 45 72 72 6f (int)SQLiteErro
78f0: 72 43 6f 64 65 2e 45 72 72 6f 72 3b 20 2f 2a 20 rCode.Error; /*
7900: 4d 61 6b 65 20 69 6e 74 6f 20 67 65 6e 65 72 69 Make into generi
7910: 63 20 65 72 72 6f 72 2e 20 2a 2f 0d 0a 0d 0a 20 c error. */....
7920: 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 5f 65 return _e
7930: 72 72 6f 72 4d 65 73 73 61 67 65 73 5b 69 6e 64 rrorMessages[ind
7940: 65 78 5d 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 ex];.. }....
7950: 20 20 20 69 6e 74 65 72 6e 61 6c 20 73 74 61 74 internal stat
7960: 69 63 20 73 74 72 69 6e 67 20 47 65 74 4c 61 73 ic string GetLas
7970: 74 45 72 72 6f 72 28 53 51 4c 69 74 65 43 6f 6e tError(SQLiteCon
7980: 6e 65 63 74 69 6f 6e 48 61 6e 64 6c 65 20 68 64 nectionHandle hd
7990: 6c 2c 20 49 6e 74 50 74 72 20 64 62 29 0d 0a 20 l, IntPtr db)..
79a0: 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 {.. if
79b0: 20 28 28 68 64 6c 20 3d 3d 20 6e 75 6c 6c 29 20 ((hdl == null)
79c0: 7c 7c 20 28 64 62 20 3d 3d 20 49 6e 74 50 74 72 || (db == IntPtr
79d0: 2e 5a 65 72 6f 29 29 0d 0a 20 20 20 20 20 20 20 .Zero))..
79e0: 20 20 20 20 20 72 65 74 75 72 6e 20 22 6e 75 6c return "nul
79f0: 6c 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 6f 72 20 l connection or
7a00: 64 61 74 61 62 61 73 65 20 68 61 6e 64 6c 65 22 database handle"
7a10: 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 73 74 72 ;.... str
7a20: 69 6e 67 20 72 65 73 75 6c 74 20 3d 20 6e 75 6c ing result = nul
7a30: 6c 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 74 72 l;.... tr
7a40: 79 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 y.. {..
7a50: 20 20 20 20 20 20 20 20 20 20 2f 2f 20 64 6f 20 // do
7a60: 6e 6f 74 68 69 6e 67 2e 0d 0a 20 20 20 20 20 20 nothing...
7a70: 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 66 69 6e }.. fin
7a80: 61 6c 6c 79 20 2f 2a 20 4e 4f 54 45 3a 20 54 68 ally /* NOTE: Th
7a90: 72 65 61 64 2e 41 62 6f 72 74 28 29 20 70 72 6f read.Abort() pro
7aa0: 74 65 63 74 69 6f 6e 2e 20 2a 2f 0d 0a 20 20 20 tection. */..
7ab0: 20 20 20 20 20 7b 0d 0a 23 69 66 20 50 4c 41 54 {..#if PLAT
7ac0: 46 4f 52 4d 5f 43 4f 4d 50 41 43 54 46 52 41 4d FORM_COMPACTFRAM
7ad0: 45 57 4f 52 4b 0d 0a 20 20 20 20 20 20 20 20 20 EWORK..
7ae0: 20 20 20 6c 6f 63 6b 20 28 68 64 6c 2e 73 79 6e lock (hdl.syn
7af0: 63 52 6f 6f 74 29 0d 0a 23 65 6c 73 65 0d 0a 20 cRoot)..#else..
7b00: 20 20 20 20 20 20 20 20 20 20 20 6c 6f 63 6b 20 lock
7b10: 28 68 64 6c 29 0d 0a 23 65 6e 64 69 66 0d 0a 20 (hdl)..#endif..
7b20: 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 {..
7b30: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 if
7b40: 20 28 21 68 64 6c 2e 49 73 49 6e 76 61 6c 69 64 (!hdl.IsInvalid
7b50: 20 26 26 20 21 68 64 6c 2e 49 73 43 6c 6f 73 65 && !hdl.IsClose
7b60: 64 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 d)..
7b70: 20 20 20 20 7b 0d 0a 23 69 66 20 21 53 51 4c 49 {..#if !SQLI
7b80: 54 45 5f 53 54 41 4e 44 41 52 44 0d 0a 20 20 20 TE_STANDARD..
7b90: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
7ba0: 20 69 6e 74 20 6c 65 6e 20 3d 20 30 3b 0d 0a 20 int len = 0;..
7bb0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
7bc0: 20 20 20 72 65 73 75 6c 74 20 3d 20 55 54 46 38 result = UTF8
7bd0: 54 6f 53 74 72 69 6e 67 28 55 6e 73 61 66 65 4e ToString(UnsafeN
7be0: 61 74 69 76 65 4d 65 74 68 6f 64 73 2e 73 71 6c ativeMethods.sql
7bf0: 69 74 65 33 5f 65 72 72 6d 73 67 5f 69 6e 74 65 ite3_errmsg_inte
7c00: 72 6f 70 28 64 62 2c 20 72 65 66 20 6c 65 6e 29 rop(db, ref len)
7c10: 2c 20 6c 65 6e 29 3b 0d 0a 23 65 6c 73 65 0d 0a , len);..#else..
7c20: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
7c30: 20 20 20 20 72 65 73 75 6c 74 20 3d 20 55 54 46 result = UTF
7c40: 38 54 6f 53 74 72 69 6e 67 28 55 6e 73 61 66 65 8ToString(Unsafe
7c50: 4e 61 74 69 76 65 4d 65 74 68 6f 64 73 2e 73 71 NativeMethods.sq
7c60: 6c 69 74 65 33 5f 65 72 72 6d 73 67 28 64 62 29 lite3_errmsg(db)
7c70: 2c 20 2d 31 29 3b 0d 0a 23 65 6e 64 69 66 0d 0a , -1);..#endif..
7c80: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
7c90: 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 }..
7ca0: 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 else..
7cb0: 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 {..
7cc0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
7cd0: 72 65 73 75 6c 74 20 3d 20 22 63 6c 6f 73 65 64 result = "closed
7ce0: 20 6f 72 20 69 6e 76 61 6c 69 64 20 63 6f 6e 6e or invalid conn
7cf0: 65 63 74 69 6f 6e 20 68 61 6e 64 6c 65 22 3b 0d ection handle";.
7d00: 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .
7d10: 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 }..
7d20: 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 }.. }..
7d30: 20 20 20 20 20 20 47 43 2e 4b 65 65 70 41 6c 69 GC.KeepAli
7d40: 76 65 28 68 64 6c 29 3b 0d 0a 20 20 20 20 20 20 ve(hdl);..
7d50: 20 20 72 65 74 75 72 6e 20 72 65 73 75 6c 74 3b return result;
7d60: 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 69 .. }.... i
7d70: 6e 74 65 72 6e 61 6c 20 73 74 61 74 69 63 20 76 nternal static v
7d80: 6f 69 64 20 46 69 6e 69 73 68 42 61 63 6b 75 70 oid FinishBackup
7d90: 28 53 51 4c 69 74 65 43 6f 6e 6e 65 63 74 69 6f (SQLiteConnectio
7da0: 6e 48 61 6e 64 6c 65 20 68 64 6c 2c 20 49 6e 74 nHandle hdl, Int
7db0: 50 74 72 20 62 61 63 6b 75 70 29 0d 0a 20 20 20 Ptr backup)..
7dc0: 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 {.. if (
7dd0: 28 68 64 6c 20 3d 3d 20 6e 75 6c 6c 29 20 7c 7c (hdl == null) ||
7de0: 20 28 62 61 63 6b 75 70 20 3d 3d 20 49 6e 74 50 (backup == IntP
7df0: 74 72 2e 5a 65 72 6f 29 29 20 72 65 74 75 72 6e tr.Zero)) return
7e00: 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 74 72 79 ;.... try
7e10: 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 .. {..
7e20: 20 20 20 20 20 20 20 20 20 2f 2f 20 64 6f 20 6e // do n
7e30: 6f 74 68 69 6e 67 2e 0d 0a 20 20 20 20 20 20 20 othing...
7e40: 20 7d 0d 0a 20 20 20 20 20 20 20 20 66 69 6e 61 }.. fina
7e50: 6c 6c 79 20 2f 2a 20 4e 4f 54 45 3a 20 54 68 72 lly /* NOTE: Thr
7e60: 65 61 64 2e 41 62 6f 72 74 28 29 20 70 72 6f 74 ead.Abort() prot
7e70: 65 63 74 69 6f 6e 2e 20 2a 2f 0d 0a 20 20 20 20 ection. */..
7e80: 20 20 20 20 7b 0d 0a 23 69 66 20 50 4c 41 54 46 {..#if PLATF
7e90: 4f 52 4d 5f 43 4f 4d 50 41 43 54 46 52 41 4d 45 ORM_COMPACTFRAME
7ea0: 57 4f 52 4b 0d 0a 20 20 20 20 20 20 20 20 20 20 WORK..
7eb0: 20 20 6c 6f 63 6b 20 28 68 64 6c 2e 73 79 6e 63 lock (hdl.sync
7ec0: 52 6f 6f 74 29 0d 0a 23 65 6c 73 65 0d 0a 20 20 Root)..#else..
7ed0: 20 20 20 20 20 20 20 20 20 20 6c 6f 63 6b 20 28 lock (
7ee0: 68 64 6c 29 0d 0a 23 65 6e 64 69 66 0d 0a 20 20 hdl)..#endif..
7ef0: 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 23 69 66 {..#if
7f00: 20 21 53 51 4c 49 54 45 5f 53 54 41 4e 44 41 52 !SQLITE_STANDAR
7f10: 44 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 D..
7f20: 20 20 20 53 51 4c 69 74 65 45 72 72 6f 72 43 6f SQLiteErrorCo
7f30: 64 65 20 6e 20 3d 20 55 6e 73 61 66 65 4e 61 74 de n = UnsafeNat
7f40: 69 76 65 4d 65 74 68 6f 64 73 2e 73 71 6c 69 74 iveMethods.sqlit
7f50: 65 33 5f 62 61 63 6b 75 70 5f 66 69 6e 69 73 68 e3_backup_finish
7f60: 5f 69 6e 74 65 72 6f 70 28 62 61 63 6b 75 70 29 _interop(backup)
7f70: 3b 0d 0a 23 65 6c 73 65 0d 0a 20 20 20 20 20 20 ;..#else..
7f80: 20 20 20 20 20 20 20 20 20 20 53 51 4c 69 74 65 SQLite
7f90: 45 72 72 6f 72 43 6f 64 65 20 6e 20 3d 20 55 6e ErrorCode n = Un
7fa0: 73 61 66 65 4e 61 74 69 76 65 4d 65 74 68 6f 64 safeNativeMethod
7fb0: 73 2e 73 71 6c 69 74 65 33 5f 62 61 63 6b 75 70 s.sqlite3_backup
7fc0: 5f 66 69 6e 69 73 68 28 62 61 63 6b 75 70 29 3b _finish(backup);
7fd0: 0d 0a 23 65 6e 64 69 66 0d 0a 20 20 20 20 20 20 ..#endif..
7fe0: 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6e 20 if (n
7ff0: 21 3d 20 53 51 4c 69 74 65 45 72 72 6f 72 43 6f != SQLiteErrorCo
8000: 64 65 2e 4f 6b 29 20 74 68 72 6f 77 20 6e 65 77 de.Ok) throw new
8010: 20 53 51 4c 69 74 65 45 78 63 65 70 74 69 6f 6e SQLiteException
8020: 28 6e 2c 20 6e 75 6c 6c 29 3b 0d 0a 20 20 20 20 (n, null);..
8030: 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 }..
8040: 20 20 20 7d 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 }.. }....
8050: 20 20 20 69 6e 74 65 72 6e 61 6c 20 73 74 61 74 internal stat
8060: 69 63 20 76 6f 69 64 20 46 69 6e 61 6c 69 7a 65 ic void Finalize
8070: 53 74 61 74 65 6d 65 6e 74 28 53 51 4c 69 74 65 Statement(SQLite
8080: 43 6f 6e 6e 65 63 74 69 6f 6e 48 61 6e 64 6c 65 ConnectionHandle
8090: 20 68 64 6c 2c 20 49 6e 74 50 74 72 20 73 74 6d hdl, IntPtr stm
80a0: 74 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 t).. {..
80b0: 20 20 20 69 66 20 28 28 68 64 6c 20 3d 3d 20 6e if ((hdl == n
80c0: 75 6c 6c 29 20 7c 7c 20 28 73 74 6d 74 20 3d 3d ull) || (stmt ==
80d0: 20 49 6e 74 50 74 72 2e 5a 65 72 6f 29 29 20 72 IntPtr.Zero)) r
80e0: 65 74 75 72 6e 3b 0d 0a 0d 0a 20 20 20 20 20 20 eturn;....
80f0: 20 20 74 72 79 0d 0a 20 20 20 20 20 20 20 20 7b try.. {
8100: 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f .. //
8110: 20 64 6f 20 6e 6f 74 68 69 6e 67 2e 0d 0a 20 20 do nothing...
8120: 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 }..
8130: 20 66 69 6e 61 6c 6c 79 20 2f 2a 20 4e 4f 54 45 finally /* NOTE
8140: 3a 20 54 68 72 65 61 64 2e 41 62 6f 72 74 28 29 : Thread.Abort()
8150: 20 70 72 6f 74 65 63 74 69 6f 6e 2e 20 2a 2f 0d protection. */.
8160: 0a 20 20 20 20 20 20 20 20 7b 0d 0a 23 69 66 20 . {..#if
8170: 50 4c 41 54 46 4f 52 4d 5f 43 4f 4d 50 41 43 54 PLATFORM_COMPACT
8180: 46 52 41 4d 45 57 4f 52 4b 0d 0a 20 20 20 20 20 FRAMEWORK..
8190: 20 20 20 20 20 20 20 6c 6f 63 6b 20 28 68 64 6c lock (hdl
81a0: 2e 73 79 6e 63 52 6f 6f 74 29 0d 0a 23 65 6c 73 .syncRoot)..#els
81b0: 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6c e.. l
81c0: 6f 63 6b 20 28 68 64 6c 29 0d 0a 23 65 6e 64 69 ock (hdl)..#endi
81d0: 66 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b f.. {
81e0: 0d 0a 23 69 66 20 21 53 51 4c 49 54 45 5f 53 54 ..#if !SQLITE_ST
81f0: 41 4e 44 41 52 44 0d 0a 20 20 20 20 20 20 20 20 ANDARD..
8200: 20 20 20 20 20 20 20 20 53 51 4c 69 74 65 45 72 SQLiteEr
8210: 72 6f 72 43 6f 64 65 20 6e 20 3d 20 55 6e 73 61 rorCode n = Unsa
8220: 66 65 4e 61 74 69 76 65 4d 65 74 68 6f 64 73 2e feNativeMethods.
8230: 73 71 6c 69 74 65 33 5f 66 69 6e 61 6c 69 7a 65 sqlite3_finalize
8240: 5f 69 6e 74 65 72 6f 70 28 73 74 6d 74 29 3b 0d _interop(stmt);.
8250: 0a 23 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 .#else..
8260: 20 20 20 20 20 20 20 20 53 51 4c 69 74 65 45 72 SQLiteEr
8270: 72 6f 72 43 6f 64 65 20 6e 20 3d 20 55 6e 73 61 rorCode n = Unsa
8280: 66 65 4e 61 74 69 76 65 4d 65 74 68 6f 64 73 2e feNativeMethods.
8290: 73 71 6c 69 74 65 33 5f 66 69 6e 61 6c 69 7a 65 sqlite3_finalize
82a0: 28 73 74 6d 74 29 3b 0d 0a 23 65 6e 64 69 66 0d (stmt);..#endif.
82b0: 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .
82c0: 20 69 66 20 28 6e 20 21 3d 20 53 51 4c 69 74 65 if (n != SQLite
82d0: 45 72 72 6f 72 43 6f 64 65 2e 4f 6b 29 20 74 68 ErrorCode.Ok) th
82e0: 72 6f 77 20 6e 65 77 20 53 51 4c 69 74 65 45 78 row new SQLiteEx
82f0: 63 65 70 74 69 6f 6e 28 6e 2c 20 6e 75 6c 6c 29 ception(n, null)
8300: 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d ;.. }
8310: 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 .. }..
8320: 20 7d 0d 0a 0d 0a 20 20 20 20 69 6e 74 65 72 6e }.... intern
8330: 61 6c 20 73 74 61 74 69 63 20 76 6f 69 64 20 43 al static void C
8340: 6c 6f 73 65 43 6f 6e 6e 65 63 74 69 6f 6e 28 53 loseConnection(S
8350: 51 4c 69 74 65 43 6f 6e 6e 65 63 74 69 6f 6e 48 QLiteConnectionH
8360: 61 6e 64 6c 65 20 68 64 6c 2c 20 49 6e 74 50 74 andle hdl, IntPt
8370: 72 20 64 62 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 r db).. {..
8380: 20 20 20 20 20 20 69 66 20 28 28 68 64 6c 20 3d if ((hdl =
8390: 3d 20 6e 75 6c 6c 29 20 7c 7c 20 28 64 62 20 3d = null) || (db =
83a0: 3d 20 49 6e 74 50 74 72 2e 5a 65 72 6f 29 29 20 = IntPtr.Zero))
83b0: 72 65 74 75 72 6e 3b 0d 0a 0d 0a 20 20 20 20 20 return;....
83c0: 20 20 20 74 72 79 0d 0a 20 20 20 20 20 20 20 20 try..
83d0: 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f {.. /
83e0: 2f 20 64 6f 20 6e 6f 74 68 69 6e 67 2e 0d 0a 20 / do nothing...
83f0: 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 }..
8400: 20 20 66 69 6e 61 6c 6c 79 20 2f 2a 20 4e 4f 54 finally /* NOT
8410: 45 3a 20 54 68 72 65 61 64 2e 41 62 6f 72 74 28 E: Thread.Abort(
8420: 29 20 70 72 6f 74 65 63 74 69 6f 6e 2e 20 2a 2f ) protection. */
8430: 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 23 69 66 .. {..#if
8440: 20 50 4c 41 54 46 4f 52 4d 5f 43 4f 4d 50 41 43 PLATFORM_COMPAC
8450: 54 46 52 41 4d 45 57 4f 52 4b 0d 0a 20 20 20 20 TFRAMEWORK..
8460: 20 20 20 20 20 20 20 20 6c 6f 63 6b 20 28 68 64 lock (hd
8470: 6c 2e 73 79 6e 63 52 6f 6f 74 29 0d 0a 23 65 6c l.syncRoot)..#el
8480: 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 se..
8490: 6c 6f 63 6b 20 28 68 64 6c 29 0d 0a 23 65 6e 64 lock (hdl)..#end
84a0: 69 66 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 if..
84b0: 7b 0d 0a 23 69 66 20 21 53 51 4c 49 54 45 5f 53 {..#if !SQLITE_S
84c0: 54 41 4e 44 41 52 44 0d 0a 20 20 20 20 20 20 20 TANDARD..
84d0: 20 20 20 20 20 20 20 20 20 53 51 4c 69 74 65 45 SQLiteE
84e0: 72 72 6f 72 43 6f 64 65 20 6e 20 3d 20 55 6e 73 rrorCode n = Uns
84f0: 61 66 65 4e 61 74 69 76 65 4d 65 74 68 6f 64 73 afeNativeMethods
8500: 2e 73 71 6c 69 74 65 33 5f 63 6c 6f 73 65 5f 69 .sqlite3_close_i
8510: 6e 74 65 72 6f 70 28 64 62 29 3b 0d 0a 23 65 6c nterop(db);..#el
8520: 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 se..
8530: 20 20 20 20 52 65 73 65 74 43 6f 6e 6e 65 63 74 ResetConnect
8540: 69 6f 6e 28 68 64 6c 2c 20 64 62 2c 20 66 61 6c ion(hdl, db, fal
8550: 73 65 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 se);....
8560: 20 20 20 20 20 20 20 20 53 51 4c 69 74 65 45 72 SQLiteEr
8570: 72 6f 72 43 6f 64 65 20 6e 20 3d 20 55 6e 73 61 rorCode n = Unsa
8580: 66 65 4e 61 74 69 76 65 4d 65 74 68 6f 64 73 2e feNativeMethods.
8590: 73 71 6c 69 74 65 33 5f 63 6c 6f 73 65 28 64 62 sqlite3_close(db
85a0: 29 3b 0d 0a 23 65 6e 64 69 66 0d 0a 20 20 20 20 );..#endif..
85b0: 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 if (
85c0: 6e 20 21 3d 20 53 51 4c 69 74 65 45 72 72 6f 72 n != SQLiteError
85d0: 43 6f 64 65 2e 4f 6b 29 20 74 68 72 6f 77 20 6e Code.Ok) throw n
85e0: 65 77 20 53 51 4c 69 74 65 45 78 63 65 70 74 69 ew SQLiteExcepti
85f0: 6f 6e 28 6e 2c 20 47 65 74 4c 61 73 74 45 72 72 on(n, GetLastErr
8600: 6f 72 28 68 64 6c 2c 20 64 62 29 29 3b 0d 0a 20 or(hdl, db));..
8610: 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 }..
8620: 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 7d 0d 0a }.. }..
8630: 0d 0a 23 69 66 20 21 49 4e 54 45 52 4f 50 5f 4c ..#if !INTEROP_L
8640: 45 47 41 43 59 5f 43 4c 4f 53 45 0d 0a 20 20 20 EGACY_CLOSE..
8650: 20 69 6e 74 65 72 6e 61 6c 20 73 74 61 74 69 63 internal static
8660: 20 76 6f 69 64 20 43 6c 6f 73 65 43 6f 6e 6e 65 void CloseConne
8670: 63 74 69 6f 6e 56 32 28 53 51 4c 69 74 65 43 6f ctionV2(SQLiteCo
8680: 6e 6e 65 63 74 69 6f 6e 48 61 6e 64 6c 65 20 68 nnectionHandle h
8690: 64 6c 2c 20 49 6e 74 50 74 72 20 64 62 29 0d 0a dl, IntPtr db)..
86a0: 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 {.. i
86b0: 66 20 28 28 68 64 6c 20 3d 3d 20 6e 75 6c 6c 29 f ((hdl == null)
86c0: 20 7c 7c 20 28 64 62 20 3d 3d 20 49 6e 74 50 74 || (db == IntPt
86d0: 72 2e 5a 65 72 6f 29 29 20 72 65 74 75 72 6e 3b r.Zero)) return;
86e0: 0d 0a 0d 0a 20 20 20 20 20 20 20 20 74 72 79 0d .... try.
86f0: 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 . {..
8700: 20 20 20 20 20 20 20 20 2f 2f 20 64 6f 20 6e 6f // do no
8710: 74 68 69 6e 67 2e 0d 0a 20 20 20 20 20 20 20 20 thing...
8720: 7d 0d 0a 20 20 20 20 20 20 20 20 66 69 6e 61 6c }.. final
8730: 6c 79 20 2f 2a 20 4e 4f 54 45 3a 20 54 68 72 65 ly /* NOTE: Thre
8740: 61 64 2e 41 62 6f 72 74 28 29 20 70 72 6f 74 65 ad.Abort() prote
8750: 63 74 69 6f 6e 2e 20 2a 2f 0d 0a 20 20 20 20 20 ction. */..
8760: 20 20 20 7b 0d 0a 23 69 66 20 50 4c 41 54 46 4f {..#if PLATFO
8770: 52 4d 5f 43 4f 4d 50 41 43 54 46 52 41 4d 45 57 RM_COMPACTFRAMEW
8780: 4f 52 4b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ORK..
8790: 20 6c 6f 63 6b 20 28 68 64 6c 2e 73 79 6e 63 52 lock (hdl.syncR
87a0: 6f 6f 74 29 0d 0a 23 65 6c 73 65 0d 0a 20 20 20 oot)..#else..
87b0: 20 20 20 20 20 20 20 20 20 6c 6f 63 6b 20 28 68 lock (h
87c0: 64 6c 29 0d 0a 23 65 6e 64 69 66 0d 0a 20 20 20 dl)..#endif..
87d0: 20 20 20 20 20 20 20 20 20 7b 0d 0a 23 69 66 20 {..#if
87e0: 21 53 51 4c 49 54 45 5f 53 54 41 4e 44 41 52 44 !SQLITE_STANDARD
87f0: 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..
8800: 20 20 53 51 4c 69 74 65 45 72 72 6f 72 43 6f 64 SQLiteErrorCod
8810: 65 20 6e 20 3d 20 55 6e 73 61 66 65 4e 61 74 69 e n = UnsafeNati
8820: 76 65 4d 65 74 68 6f 64 73 2e 73 71 6c 69 74 65 veMethods.sqlite
8830: 33 5f 63 6c 6f 73 65 5f 69 6e 74 65 72 6f 70 28 3_close_interop(
8840: 64 62 29 3b 0d 0a 23 65 6c 73 65 0d 0a 20 20 20 db);..#else..
8850: 20 20 20 20 20 20 20 20 20 20 20 20 20 52 65 73 Res
8860: 65 74 43 6f 6e 6e 65 63 74 69 6f 6e 28 68 64 6c etConnection(hdl
8870: 2c 20 64 62 2c 20 66 61 6c 73 65 29 3b 0d 0a 0d , db, false);...
8880: 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .
8890: 20 53 51 4c 69 74 65 45 72 72 6f 72 43 6f 64 65 SQLiteErrorCode
88a0: 20 6e 20 3d 20 55 6e 73 61 66 65 4e 61 74 69 76 n = UnsafeNativ
88b0: 65 4d 65 74 68 6f 64 73 2e 73 71 6c 69 74 65 33 eMethods.sqlite3
88c0: 5f 63 6c 6f 73 65 5f 76 32 28 64 62 29 3b 0d 0a _close_v2(db);..
88d0: 23 65 6e 64 69 66 0d 0a 20 20 20 20 20 20 20 20 #endif..
88e0: 20 20 20 20 20 20 20 20 69 66 20 28 6e 20 21 3d if (n !=
88f0: 20 53 51 4c 69 74 65 45 72 72 6f 72 43 6f 64 65 SQLiteErrorCode
8900: 2e 4f 6b 29 20 74 68 72 6f 77 20 6e 65 77 20 53 .Ok) throw new S
8910: 51 4c 69 74 65 45 78 63 65 70 74 69 6f 6e 28 6e QLiteException(n
8920: 2c 20 47 65 74 4c 61 73 74 45 72 72 6f 72 28 68 , GetLastError(h
8930: 64 6c 2c 20 64 62 29 29 3b 0d 0a 20 20 20 20 20 dl, db));..
8940: 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 }..
8950: 20 20 7d 0d 0a 20 20 20 20 7d 0d 0a 23 65 6e 64 }.. }..#end
8960: 69 66 0d 0a 0d 0a 20 20 20 20 69 6e 74 65 72 6e if.... intern
8970: 61 6c 20 73 74 61 74 69 63 20 62 6f 6f 6c 20 52 al static bool R
8980: 65 73 65 74 43 6f 6e 6e 65 63 74 69 6f 6e 28 53 esetConnection(S
8990: 51 4c 69 74 65 43 6f 6e 6e 65 63 74 69 6f 6e 48 QLiteConnectionH
89a0: 61 6e 64 6c 65 20 68 64 6c 2c 20 49 6e 74 50 74 andle hdl, IntPt
89b0: 72 20 64 62 2c 20 62 6f 6f 6c 20 63 61 6e 54 68 r db, bool canTh
89c0: 72 6f 77 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 row).. {..
89d0: 20 20 20 20 20 69 66 20 28 28 68 64 6c 20 3d 3d if ((hdl ==
89e0: 20 6e 75 6c 6c 29 20 7c 7c 20 28 64 62 20 3d 3d null) || (db ==
89f0: 20 49 6e 74 50 74 72 2e 5a 65 72 6f 29 29 20 72 IntPtr.Zero)) r
8a00: 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 0d 0a eturn false;....
8a10: 20 20 20 20 20 20 20 20 62 6f 6f 6c 20 72 65 73 bool res
8a20: 75 6c 74 20 3d 20 66 61 6c 73 65 3b 0d 0a 0d 0a ult = false;....
8a30: 20 20 20 20 20 20 20 20 74 72 79 0d 0a 20 20 20 try..
8a40: 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 {..
8a50: 20 20 20 20 2f 2f 20 64 6f 20 6e 6f 74 68 69 6e // do nothin
8a60: 67 2e 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 g... }..
8a70: 20 20 20 20 20 20 20 66 69 6e 61 6c 6c 79 20 2f finally /
8a80: 2a 20 4e 4f 54 45 3a 20 54 68 72 65 61 64 2e 41 * NOTE: Thread.A
8a90: 62 6f 72 74 28 29 20 70 72 6f 74 65 63 74 69 6f bort() protectio
8aa0: 6e 2e 20 2a 2f 0d 0a 20 20 20 20 20 20 20 20 7b n. */.. {
8ab0: 0d 0a 23 69 66 20 50 4c 41 54 46 4f 52 4d 5f 43 ..#if PLATFORM_C
8ac0: 4f 4d 50 41 43 54 46 52 41 4d 45 57 4f 52 4b 0d OMPACTFRAMEWORK.
8ad0: 0a 20 20 20 20 20 20 20 20 20 20 20 20 6c 6f 63 . loc
8ae0: 6b 20 28 68 64 6c 2e 73 79 6e 63 52 6f 6f 74 29 k (hdl.syncRoot)
8af0: 0d 0a 23 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 ..#else..
8b00: 20 20 20 20 20 6c 6f 63 6b 20 28 68 64 6c 29 0d lock (hdl).
8b10: 0a 23 65 6e 64 69 66 0d 0a 20 20 20 20 20 20 20 .#endif..
8b20: 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 {..
8b30: 20 20 20 20 20 20 20 20 69 66 20 28 63 61 6e 54 if (canT
8b40: 68 72 6f 77 20 26 26 20 68 64 6c 2e 49 73 49 6e hrow && hdl.IsIn
8b50: 76 61 6c 69 64 29 0d 0a 20 20 20 20 20 20 20 20 valid)..
8b60: 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f thro
8b70: 77 20 6e 65 77 20 49 6e 76 61 6c 69 64 4f 70 65 w new InvalidOpe
8b80: 72 61 74 69 6f 6e 45 78 63 65 70 74 69 6f 6e 28 rationException(
8b90: 22 54 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 "The connection
8ba0: 68 61 6e 64 6c 65 20 69 73 20 69 6e 76 61 6c 69 handle is invali
8bb0: 64 2e 22 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 d.");....
8bc0: 20 20 20 20 20 20 20 20 20 69 66 20 28 63 61 6e if (can
8bd0: 54 68 72 6f 77 20 26 26 20 68 64 6c 2e 49 73 43 Throw && hdl.IsC
8be0: 6c 6f 73 65 64 29 0d 0a 20 20 20 20 20 20 20 20 losed)..
8bf0: 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f thro
8c00: 77 20 6e 65 77 20 49 6e 76 61 6c 69 64 4f 70 65 w new InvalidOpe
8c10: 72 61 74 69 6f 6e 45 78 63 65 70 74 69 6f 6e 28 rationException(
8c20: 22 54 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 "The connection
8c30: 68 61 6e 64 6c 65 20 69 73 20 63 6c 6f 73 65 64 handle is closed
8c40: 2e 22 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 .");....
8c50: 20 20 20 20 20 20 20 20 69 66 20 28 21 68 64 6c if (!hdl
8c60: 2e 49 73 49 6e 76 61 6c 69 64 20 26 26 20 21 68 .IsInvalid && !h
8c70: 64 6c 2e 49 73 43 6c 6f 73 65 64 29 0d 0a 20 20 dl.IsClosed)..
8c80: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d {.
8c90: 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .
8ca0: 20 20 20 20 20 49 6e 74 50 74 72 20 73 74 6d 74 IntPtr stmt
8cb0: 20 3d 20 49 6e 74 50 74 72 2e 5a 65 72 6f 3b 0d = IntPtr.Zero;.
8cc0: 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .
8cd0: 20 20 20 20 20 53 51 4c 69 74 65 45 72 72 6f 72 SQLiteError
8ce0: 43 6f 64 65 20 6e 3b 0d 0a 0d 0a 20 20 20 20 20 Code n;....
8cf0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 64 d
8d00: 6f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 o..
8d10: 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 {..
8d20: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
8d30: 20 20 73 74 6d 74 20 3d 20 55 6e 73 61 66 65 4e stmt = UnsafeN
8d40: 61 74 69 76 65 4d 65 74 68 6f 64 73 2e 73 71 6c ativeMethods.sql
8d50: 69 74 65 33 5f 6e 65 78 74 5f 73 74 6d 74 28 64 ite3_next_stmt(d
8d60: 62 2c 20 73 74 6d 74 29 3b 0d 0a 20 20 20 20 20 b, stmt);..
8d70: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
8d80: 20 20 20 69 66 20 28 73 74 6d 74 20 21 3d 20 49 if (stmt != I
8d90: 6e 74 50 74 72 2e 5a 65 72 6f 29 0d 0a 20 20 20 ntPtr.Zero)..
8da0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
8db0: 20 20 20 20 20 7b 0d 0a 23 69 66 20 21 53 51 4c {..#if !SQL
8dc0: 49 54 45 5f 53 54 41 4e 44 41 52 44 0d 0a 20 20 ITE_STANDARD..
8dd0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
8de0: 20 20 20 20 20 20 20 20 20 20 6e 20 3d 20 55 6e n = Un
8df0: 73 61 66 65 4e 61 74 69 76 65 4d 65 74 68 6f 64 safeNativeMethod
8e00: 73 2e 73 71 6c 69 74 65 33 5f 72 65 73 65 74 5f s.sqlite3_reset_
8e10: 69 6e 74 65 72 6f 70 28 73 74 6d 74 29 3b 0d 0a interop(stmt);..
8e20: 23 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 #else..
8e30: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
8e40: 20 20 20 6e 20 3d 20 55 6e 73 61 66 65 4e 61 74 n = UnsafeNat
8e50: 69 76 65 4d 65 74 68 6f 64 73 2e 73 71 6c 69 74 iveMethods.sqlit
8e60: 65 33 5f 72 65 73 65 74 28 73 74 6d 74 29 3b 0d e3_reset(stmt);.
8e70: 0a 23 65 6e 64 69 66 0d 0a 20 20 20 20 20 20 20 .#endif..
8e80: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
8e90: 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 }..
8ea0: 20 20 20 20 20 20 20 20 7d 20 77 68 69 6c 65 20 } while
8eb0: 28 73 74 6d 74 20 21 3d 20 49 6e 74 50 74 72 2e (stmt != IntPtr.
8ec0: 5a 65 72 6f 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 Zero);....
8ed0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f //
8ee0: 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..
8ef0: 20 20 20 20 20 20 2f 2f 20 4e 4f 54 45 3a 20 49 // NOTE: I
8f00: 73 20 61 20 74 72 61 6e 73 61 63 74 69 6f 6e 20 s a transaction
8f10: 4e 4f 54 20 70 65 6e 64 69 6e 67 20 6f 6e 20 74 NOT pending on t
8f20: 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 3f 0d 0a he connection?..
8f30: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
8f40: 20 20 20 20 2f 2f 0d 0a 20 20 20 20 20 20 20 20 //..
8f50: 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 if (
8f60: 49 73 41 75 74 6f 63 6f 6d 6d 69 74 28 68 64 6c IsAutocommit(hdl
8f70: 2c 20 64 62 29 29 0d 0a 20 20 20 20 20 20 20 20 , db))..
8f80: 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 {..
8f90: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
8fa0: 20 20 20 20 20 20 20 72 65 73 75 6c 74 20 3d 20 result =
8fb0: 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 true;..
8fc0: 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 }..
8fd0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
8fe0: 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 else..
8ff0: 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 {..
9000: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9010: 20 20 20 20 20 20 20 6e 20 3d 20 55 6e 73 61 66 n = Unsaf
9020: 65 4e 61 74 69 76 65 4d 65 74 68 6f 64 73 2e 73 eNativeMethods.s
9030: 71 6c 69 74 65 33 5f 65 78 65 63 28 0d 0a 20 20 qlite3_exec(..
9040: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9050: 20 20 20 20 20 20 20 20 20 20 64 62 2c 20 54 6f db, To
9060: 55 54 46 38 28 22 52 4f 4c 4c 42 41 43 4b 22 29 UTF8("ROLLBACK")
9070: 2c 20 49 6e 74 50 74 72 2e 5a 65 72 6f 2c 20 49 , IntPtr.Zero, I
9080: 6e 74 50 74 72 2e 5a 65 72 6f 2c 0d 0a 20 20 20 ntPtr.Zero,..
9090: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
90a0: 20 20 20 20 20 20 20 20 20 72 65 66 20 73 74 6d ref stm
90b0: 74 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 t);....
90c0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 i
90d0: 66 20 28 6e 20 3d 3d 20 53 51 4c 69 74 65 45 72 f (n == SQLiteEr
90e0: 72 6f 72 43 6f 64 65 2e 4f 6b 29 0d 0a 20 20 20 rorCode.Ok)..
90f0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9100: 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 {..
9110: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9120: 20 20 20 20 72 65 73 75 6c 74 20 3d 20 74 72 75 result = tru
9130: 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 e;..
9140: 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 }..
9150: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9160: 20 20 20 20 20 20 20 65 6c 73 65 20 69 66 20 28 else if (
9170: 63 61 6e 54 68 72 6f 77 29 0d 0a 20 20 20 20 20 canThrow)..
9180: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9190: 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 {..
91a0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
91b0: 20 20 74 68 72 6f 77 20 6e 65 77 20 53 51 4c 69 throw new SQLi
91c0: 74 65 45 78 63 65 70 74 69 6f 6e 28 6e 2c 20 47 teException(n, G
91d0: 65 74 4c 61 73 74 45 72 72 6f 72 28 68 64 6c 2c etLastError(hdl,
91e0: 20 64 62 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 db));..
91f0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9200: 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 }..
9210: 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 }..
9220: 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 }..
9230: 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 }..
9240: 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 47 }.. G
9250: 43 2e 4b 65 65 70 41 6c 69 76 65 28 68 64 6c 29 C.KeepAlive(hdl)
9260: 3b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 ;.. retur
9270: 6e 20 72 65 73 75 6c 74 3b 0d 0a 20 20 20 20 7d n result;.. }
9280: 0d 0a 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c .... internal
9290: 20 73 74 61 74 69 63 20 62 6f 6f 6c 20 49 73 41 static bool IsA
92a0: 75 74 6f 63 6f 6d 6d 69 74 28 53 51 4c 69 74 65 utocommit(SQLite
92b0: 43 6f 6e 6e 65 63 74 69 6f 6e 48 61 6e 64 6c 65 ConnectionHandle
92c0: 20 68 64 6c 2c 20 49 6e 74 50 74 72 20 64 62 29 hdl, IntPtr db)
92d0: 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 .. {..
92e0: 20 69 66 20 28 28 68 64 6c 20 3d 3d 20 6e 75 6c if ((hdl == nul
92f0: 6c 29 20 7c 7c 20 28 64 62 20 3d 3d 20 49 6e 74 l) || (db == Int
9300: 50 74 72 2e 5a 65 72 6f 29 29 20 72 65 74 75 72 Ptr.Zero)) retur
9310: 6e 20 66 61 6c 73 65 3b 0d 0a 0d 0a 20 20 20 20 n false;....
9320: 20 20 20 20 62 6f 6f 6c 20 72 65 73 75 6c 74 20 bool result
9330: 3d 20 66 61 6c 73 65 3b 0d 0a 0d 0a 20 20 20 20 = false;....
9340: 20 20 20 20 74 72 79 0d 0a 20 20 20 20 20 20 20 try..
9350: 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 {..
9360: 2f 2f 20 64 6f 20 6e 6f 74 68 69 6e 67 2e 0d 0a // do nothing...
9370: 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 }..
9380: 20 20 20 66 69 6e 61 6c 6c 79 20 2f 2a 20 4e 4f finally /* NO
9390: 54 45 3a 20 54 68 72 65 61 64 2e 41 62 6f 72 74 TE: Thread.Abort
93a0: 28 29 20 70 72 6f 74 65 63 74 69 6f 6e 2e 20 2a () protection. *
93b0: 2f 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 23 69 /.. {..#i
93c0: 66 20 50 4c 41 54 46 4f 52 4d 5f 43 4f 4d 50 41 f PLATFORM_COMPA
93d0: 43 54 46 52 41 4d 45 57 4f 52 4b 0d 0a 20 20 20 CTFRAMEWORK..
93e0: 20 20 20 20 20 20 20 20 20 6c 6f 63 6b 20 28 68 lock (h
93f0: 64 6c 2e 73 79 6e 63 52 6f 6f 74 29 0d 0a 23 65 dl.syncRoot)..#e
9400: 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 lse..
9410: 20 6c 6f 63 6b 20 28 68 64 6c 29 0d 0a 23 65 6e lock (hdl)..#en
9420: 64 69 66 0d 0a 20 20 20 20 20 20 20 20 20 20 20 dif..
9430: 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 {..
9440: 20 20 20 20 69 66 20 28 21 68 64 6c 2e 49 73 49 if (!hdl.IsI
9450: 6e 76 61 6c 69 64 20 26 26 20 21 68 64 6c 2e 49 nvalid && !hdl.I
9460: 73 43 6c 6f 73 65 64 29 0d 0a 20 20 20 20 20 20 sClosed)..
9470: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 re
9480: 73 75 6c 74 20 3d 20 28 55 6e 73 61 66 65 4e 61 sult = (UnsafeNa
9490: 74 69 76 65 4d 65 74 68 6f 64 73 2e 73 71 6c 69 tiveMethods.sqli
94a0: 74 65 33 5f 67 65 74 5f 61 75 74 6f 63 6f 6d 6d te3_get_autocomm
94b0: 69 74 28 64 62 29 20 3d 3d 20 31 29 3b 0d 0a 20 it(db) == 1);..
94c0: 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 }..
94d0: 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 }..
94e0: 20 47 43 2e 4b 65 65 70 41 6c 69 76 65 28 68 64 GC.KeepAlive(hd
94f0: 6c 29 3b 20 2f 2a 20 4e 4f 54 45 3a 20 55 6e 72 l); /* NOTE: Unr
9500: 65 61 63 68 61 62 6c 65 20 63 6f 64 65 2e 20 2a eachable code. *
9510: 2f 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 /.. retur
9520: 6e 20 72 65 73 75 6c 74 3b 0d 0a 20 20 20 20 7d n result;.. }
9530: 0d 0a 20 20 7d 0d 0a 0d 0a 20 20 2f 2f 2f 20 3c .. }.... /// <
9540: 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 2f 2f 2f 0d summary>.. ///.
9550: 0a 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 . /// </summary
9560: 3e 0d 0a 20 20 70 75 62 6c 69 63 20 69 6e 74 65 >.. public inte
9570: 72 66 61 63 65 20 49 53 51 4c 69 74 65 53 63 68 rface ISQLiteSch
9580: 65 6d 61 45 78 74 65 6e 73 69 6f 6e 73 0d 0a 20 emaExtensions..
9590: 20 7b 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c 73 {.. /// <s
95a0: 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 2f ummary>.. /
95b0: 2f 2f 20 43 72 65 61 74 65 73 20 74 65 6d 70 6f // Creates tempo
95c0: 72 61 72 79 20 74 61 62 6c 65 73 20 6f 6e 20 74 rary tables on t
95d0: 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 73 6f he connection so
95e0: 20 73 63 68 65 6d 61 20 69 6e 66 6f 72 6d 61 74 schema informat
95f0: 69 6f 6e 20 63 61 6e 20 62 65 20 71 75 65 72 69 ion can be queri
9600: 65 64 2e 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c ed... /// <
9610: 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 /summary>..
9620: 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 /// <param name
9630: 3d 22 63 6f 6e 6e 65 63 74 69 6f 6e 22 3e 0d 0a ="connection">..
9640: 20 20 20 20 20 20 2f 2f 2f 20 54 68 65 20 63 6f /// The co
9650: 6e 6e 65 63 74 69 6f 6e 20 75 70 6f 6e 20 77 68 nnection upon wh
9660: 69 63 68 20 74 6f 20 62 75 69 6c 64 20 74 68 65 ich to build the
9670: 20 73 63 68 65 6d 61 20 74 61 62 6c 65 73 2e 0d schema tables..
9680: 0a 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 70 61 72 . /// </par
9690: 61 6d 3e 0d 0a 20 20 20 20 20 20 76 6f 69 64 20 am>.. void
96a0: 42 75 69 6c 64 54 65 6d 70 53 63 68 65 6d 61 28 BuildTempSchema(
96b0: 53 51 4c 69 74 65 43 6f 6e 6e 65 63 74 69 6f 6e SQLiteConnection
96c0: 20 63 6f 6e 6e 65 63 74 69 6f 6e 29 3b 0d 0a 20 connection);..
96d0: 20 7d 0d 0a 0d 0a 20 20 5b 46 6c 61 67 73 5d 0d }.... [Flags].
96e0: 0a 20 20 69 6e 74 65 72 6e 61 6c 20 65 6e 75 6d . internal enum
96f0: 20 53 51 4c 69 74 65 4f 70 65 6e 46 6c 61 67 73 SQLiteOpenFlags
9700: 45 6e 75 6d 0d 0a 20 20 7b 0d 0a 20 20 20 20 4e Enum.. {.. N
9710: 6f 6e 65 20 3d 20 30 2c 0d 0a 20 20 20 20 52 65 one = 0,.. Re
9720: 61 64 4f 6e 6c 79 20 3d 20 30 78 30 31 2c 0d 0a adOnly = 0x01,..
9730: 20 20 20 20 52 65 61 64 57 72 69 74 65 20 3d 20 ReadWrite =
9740: 30 78 30 32 2c 0d 0a 20 20 20 20 43 72 65 61 74 0x02,.. Creat
9750: 65 20 3d 20 30 78 30 34 2c 0d 0a 20 20 20 20 55 e = 0x04,.. U
9760: 72 69 20 3d 20 30 78 34 30 2c 0d 0a 20 20 20 20 ri = 0x40,..
9770: 53 68 61 72 65 64 43 61 63 68 65 20 3d 20 30 78 SharedCache = 0x
9780: 30 31 30 30 30 30 30 30 2c 0d 0a 20 20 20 20 44 01000000,.. D
9790: 65 66 61 75 6c 74 20 3d 20 30 78 30 36 2c 0d 0a efault = 0x06,..
97a0: 20 20 7d 0d 0a 0d 0a 20 20 2f 2f 2f 20 3c 73 75 }.... /// <su
97b0: 6d 6d 61 72 79 3e 0d 0a 20 20 2f 2f 2f 20 54 68 mmary>.. /// Th
97c0: 65 20 65 78 74 72 61 20 62 65 68 61 76 69 6f 72 e extra behavior
97d0: 61 6c 20 66 6c 61 67 73 20 74 68 61 74 20 63 61 al flags that ca
97e0: 6e 20 62 65 20 61 70 70 6c 69 65 64 20 74 6f 20 n be applied to
97f0: 61 20 63 6f 6e 6e 65 63 74 69 6f 6e 2e 0d 0a 20 a connection...
9800: 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d /// </summary>.
9810: 0a 20 20 5b 46 6c 61 67 73 28 29 5d 0d 0a 20 20 . [Flags()]..
9820: 70 75 62 6c 69 63 20 65 6e 75 6d 20 53 51 4c 69 public enum SQLi
9830: 74 65 43 6f 6e 6e 65 63 74 69 6f 6e 46 6c 61 67 teConnectionFlag
9840: 73 20 3a 20 6c 6f 6e 67 0d 0a 20 20 7b 0d 0a 20 s : long.. {..
9850: 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 /// <summar
9860: 79 3e 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 4e 6f y>.. /// No
9870: 20 65 78 74 72 61 20 66 6c 61 67 73 2e 0d 0a 20 extra flags...
9880: 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 /// </summa
9890: 72 79 3e 0d 0a 20 20 20 20 20 20 4e 6f 6e 65 20 ry>.. None
98a0: 3d 20 30 78 30 2c 0d 0a 0d 0a 20 20 20 20 20 20 = 0x0,....
98b0: 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 /// <summary>..
98c0: 20 20 20 20 20 2f 2f 2f 20 45 6e 61 62 6c 65 20 /// Enable
98d0: 6c 6f 67 67 69 6e 67 20 6f 66 20 61 6c 6c 20 53 logging of all S
98e0: 51 4c 20 73 74 61 74 65 6d 65 6e 74 73 20 74 6f QL statements to
98f0: 20 62 65 20 70 72 65 70 61 72 65 64 2e 0d 0a 20 be prepared...
9900: 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 /// </summa
9910: 72 79 3e 0d 0a 20 20 20 20 20 20 4c 6f 67 50 72 ry>.. LogPr
9920: 65 70 61 72 65 20 3d 20 30 78 31 2c 0d 0a 0d 0a epare = 0x1,....
9930: 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 /// <summa
9940: 72 79 3e 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 45 ry>.. /// E
9950: 6e 61 62 6c 65 20 6c 6f 67 67 69 6e 67 20 6f 66 nable logging of
9960: 20 61 6c 6c 20 62 6f 75 6e 64 20 70 61 72 61 6d all bound param
9970: 65 74 65 72 20 74 79 70 65 73 20 61 6e 64 20 72 eter types and r
9980: 61 77 20 76 61 6c 75 65 73 2e 0d 0a 20 20 20 20 aw values...
9990: 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e /// </summary>
99a0: 0d 0a 20 20 20 20 20 20 4c 6f 67 50 72 65 42 69 .. LogPreBi
99b0: 6e 64 20 3d 20 30 78 32 2c 0d 0a 0d 0a 20 20 20 nd = 0x2,....
99c0: 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e /// <summary>
99d0: 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 45 6e 61 62 .. /// Enab
99e0: 6c 65 20 6c 6f 67 67 69 6e 67 20 6f 66 20 61 6c le logging of al
99f0: 6c 20 62 6f 75 6e 64 20 70 61 72 61 6d 65 74 65 l bound paramete
9a00: 72 20 73 74 72 6f 6e 67 6c 79 20 74 79 70 65 64 r strongly typed
9a10: 20 76 61 6c 75 65 73 2e 0d 0a 20 20 20 20 20 20 values...
9a20: 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a /// </summary>..
9a30: 20 20 20 20 20 20 4c 6f 67 42 69 6e 64 20 3d 20 LogBind =
9a40: 30 78 34 2c 0d 0a 0d 0a 20 20 20 20 20 20 2f 2f 0x4,.... //
9a50: 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 / <summary>..
9a60: 20 20 20 2f 2f 2f 20 45 6e 61 62 6c 65 20 6c 6f /// Enable lo
9a70: 67 67 69 6e 67 20 6f 66 20 61 6c 6c 20 65 78 63 gging of all exc
9a80: 65 70 74 69 6f 6e 73 20 63 61 75 67 68 74 20 66 eptions caught f
9a90: 72 6f 6d 20 75 73 65 72 2d 70 72 6f 76 69 64 65 rom user-provide
9aa0: 64 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 6d 61 6e d.. /// man
9ab0: 61 67 65 64 20 63 6f 64 65 20 63 61 6c 6c 65 64 aged code called
9ac0: 20 66 72 6f 6d 20 6e 61 74 69 76 65 20 63 6f 64 from native cod
9ad0: 65 20 76 69 61 20 64 65 6c 65 67 61 74 65 73 2e e via delegates.
9ae0: 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 .. /// </su
9af0: 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 4c 6f mmary>.. Lo
9b00: 67 43 61 6c 6c 62 61 63 6b 45 78 63 65 70 74 69 gCallbackExcepti
9b10: 6f 6e 20 3d 20 30 78 38 2c 0d 0a 0d 0a 20 20 20 on = 0x8,....
9b20: 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e /// <summary>
9b30: 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 45 6e 61 62 .. /// Enab
9b40: 6c 65 20 6c 6f 67 67 69 6e 67 20 6f 66 20 62 61 le logging of ba
9b50: 63 6b 75 70 20 41 50 49 20 65 72 72 6f 72 73 2e ckup API errors.
9b60: 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 .. /// </su
9b70: 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 4c 6f mmary>.. Lo
9b80: 67 42 61 63 6b 75 70 20 3d 20 30 78 31 30 2c 0d gBackup = 0x10,.
9b90: 0a 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 ... /// <su
9ba0: 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 2f 2f mmary>.. //
9bb0: 2f 20 53 6b 69 70 20 61 64 64 69 6e 67 20 74 68 / Skip adding th
9bc0: 65 20 65 78 74 65 6e 73 69 6f 6e 20 66 75 6e 63 e extension func
9bd0: 74 69 6f 6e 73 20 70 72 6f 76 69 64 65 64 20 62 tions provided b
9be0: 79 20 74 68 65 20 6e 61 74 69 76 65 0d 0a 20 20 y the native..
9bf0: 20 20 20 20 2f 2f 2f 20 69 6e 74 65 72 6f 70 20 /// interop
9c00: 61 73 73 65 6d 62 6c 79 2e 0d 0a 20 20 20 20 20 assembly...
9c10: 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d /// </summary>.
9c20: 0a 20 20 20 20 20 20 4e 6f 45 78 74 65 6e 73 69 . NoExtensi
9c30: 6f 6e 46 75 6e 63 74 69 6f 6e 73 20 3d 20 30 78 onFunctions = 0x
9c40: 32 30 2c 0d 0a 0d 0a 20 20 20 20 20 20 2f 2f 2f 20,.... ///
9c50: 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 <summary>..
9c60: 20 20 2f 2f 2f 20 57 68 65 6e 20 62 69 6e 64 69 /// When bindi
9c70: 6e 67 20 70 61 72 61 6d 65 74 65 72 20 76 61 6c ng parameter val
9c80: 75 65 73 20 77 69 74 68 20 74 68 65 20 3c 73 65 ues with the <se
9c90: 65 20 63 72 65 66 3d 22 55 49 6e 74 33 32 22 20 e cref="UInt32"
9ca0: 2f 3e 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 74 79 />.. /// ty
9cb0: 70 65 2c 20 75 73 65 20 74 68 65 20 69 6e 74 65 pe, use the inte
9cc0: 72 6f 70 20 6d 65 74 68 6f 64 20 74 68 61 74 20 rop method that
9cd0: 61 63 63 65 70 74 73 20 61 6e 20 3c 73 65 65 20 accepts an <see
9ce0: 63 72 65 66 3d 22 49 6e 74 36 34 22 20 2f 3e 0d cref="Int64" />.
9cf0: 0a 20 20 20 20 20 20 2f 2f 2f 20 76 61 6c 75 65 . /// value
9d00: 2e 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 ... /// </s
9d10: 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 42 ummary>.. B
9d20: 69 6e 64 55 49 6e 74 33 32 41 73 49 6e 74 36 34 indUInt32AsInt64
9d30: 20 3d 20 30 78 34 30 2c 0d 0a 0d 0a 20 20 20 20 = 0x40,....
9d40: 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d /// <summary>.
9d50: 0a 20 20 20 20 20 20 2f 2f 2f 20 57 68 65 6e 20 . /// When
9d60: 62 69 6e 64 69 6e 67 20 70 61 72 61 6d 65 74 65 binding paramete
9d70: 72 20 76 61 6c 75 65 73 2c 20 61 6c 77 61 79 73 r values, always
9d80: 20 62 69 6e 64 20 74 68 65 6d 20 61 73 20 74 68 bind them as th
9d90: 6f 75 67 68 20 74 68 65 79 20 77 65 72 65 0d 0a ough they were..
9da0: 20 20 20 20 20 20 2f 2f 2f 20 70 6c 61 69 6e 20 /// plain
9db0: 74 65 78 74 20 28 69 2e 65 2e 20 6e 6f 20 6e 75 text (i.e. no nu
9dc0: 6d 65 72 69 63 2c 20 64 61 74 65 2f 74 69 6d 65 meric, date/time
9dd0: 2c 20 6f 72 20 6f 74 68 65 72 20 63 6f 6e 76 65 , or other conve
9de0: 72 73 69 6f 6e 73 20 73 68 6f 75 6c 64 0d 0a 20 rsions should..
9df0: 20 20 20 20 20 2f 2f 2f 20 62 65 20 61 74 74 65 /// be atte
9e00: 6d 70 74 65 64 29 2e 0d 0a 20 20 20 20 20 20 2f mpted)... /
9e10: 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 // </summary>..
9e20: 20 20 20 20 20 42 69 6e 64 41 6c 6c 41 73 54 65 BindAllAsTe
9e30: 78 74 20 3d 20 30 78 38 30 2c 0d 0a 0d 0a 20 20 xt = 0x80,....
9e40: 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 /// <summary
9e50: 3e 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 57 68 65 >.. /// Whe
9e60: 6e 20 72 65 74 75 72 6e 69 6e 67 20 63 6f 6c 75 n returning colu
9e70: 6d 6e 20 76 61 6c 75 65 73 2c 20 61 6c 77 61 79 mn values, alway
9e80: 73 20 72 65 74 75 72 6e 20 74 68 65 6d 20 61 73 s return them as
9e90: 20 74 68 6f 75 67 68 20 74 68 65 79 20 77 65 72 though they wer
9ea0: 65 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 70 6c 61 e.. /// pla
9eb0: 69 6e 20 74 65 78 74 20 28 69 2e 65 2e 20 6e 6f in text (i.e. no
9ec0: 20 6e 75 6d 65 72 69 63 2c 20 64 61 74 65 2f 74 numeric, date/t
9ed0: 69 6d 65 2c 20 6f 72 20 6f 74 68 65 72 20 63 6f ime, or other co
9ee0: 6e 76 65 72 73 69 6f 6e 73 20 73 68 6f 75 6c 64 nversions should
9ef0: 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 62 65 20 61 .. /// be a
9f00: 74 74 65 6d 70 74 65 64 29 2e 0d 0a 20 20 20 20 ttempted)...
9f10: 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e /// </summary>
9f20: 0d 0a 20 20 20 20 20 20 47 65 74 41 6c 6c 41 73 .. GetAllAs
9f30: 54 65 78 74 20 3d 20 30 78 31 30 30 2c 0d 0a 0d Text = 0x100,...
9f40: 0a 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d . /// <summ
9f50: 61 72 79 3e 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 ary>.. ///
9f60: 50 72 65 76 65 6e 74 20 74 68 69 73 20 3c 73 65 Prevent this <se
9f70: 65 20 63 72 65 66 3d 22 53 51 4c 69 74 65 43 6f e cref="SQLiteCo
9f80: 6e 6e 65 63 74 69 6f 6e 22 20 2f 3e 20 6f 62 6a nnection" /> obj
9f90: 65 63 74 20 69 6e 73 74 61 6e 63 65 20 66 72 6f ect instance fro
9fa0: 6d 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 6c 6f 61 m.. /// loa
9fb0: 64 69 6e 67 20 65 78 74 65 6e 73 69 6f 6e 73 2e ding extensions.
9fc0: 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 .. /// </su
9fd0: 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 4e 6f mmary>.. No
9fe0: 4c 6f 61 64 45 78 74 65 6e 73 69 6f 6e 20 3d 20 LoadExtension =
9ff0: 30 78 32 30 30 2c 0d 0a 0d 0a 23 69 66 20 49 4e 0x200,....#if IN
a000: 54 45 52 4f 50 5f 56 49 52 54 55 41 4c 5f 54 41 TEROP_VIRTUAL_TA
a010: 42 4c 45 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c BLE.. /// <
a020: 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 summary>..
a030: 2f 2f 2f 20 50 72 65 76 65 6e 74 20 74 68 69 73 /// Prevent this
a040: 20 3c 73 65 65 20 63 72 65 66 3d 22 53 51 4c 69 <see cref="SQLi
a050: 74 65 43 6f 6e 6e 65 63 74 69 6f 6e 22 20 2f 3e teConnection" />
a060: 20 6f 62 6a 65 63 74 20 69 6e 73 74 61 6e 63 65 object instance
a070: 20 66 72 6f 6d 0d 0a 20 20 20 20 20 20 2f 2f 2f from.. ///
a080: 20 63 72 65 61 74 69 6e 67 20 76 69 72 74 75 61 creating virtua
a090: 6c 20 74 61 62 6c 65 20 6d 6f 64 75 6c 65 73 2e l table modules.
a0a0: 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 .. /// </su
a0b0: 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 4e 6f mmary>.. No
a0c0: 43 72 65 61 74 65 4d 6f 64 75 6c 65 20 3d 20 30 CreateModule = 0
a0d0: 78 34 30 30 2c 0d 0a 23 65 6e 64 69 66 0d 0a 0d x400,..#endif...
a0e0: 0a 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d . /// <summ
a0f0: 61 72 79 3e 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 ary>.. ///
a100: 53 6b 69 70 20 62 69 6e 64 69 6e 67 20 61 6e 79 Skip binding any
a110: 20 66 75 6e 63 74 69 6f 6e 73 20 70 72 6f 76 69 functions provi
a120: 64 65 64 20 62 79 20 6f 74 68 65 72 20 6d 61 6e ded by other man
a130: 61 67 65 64 20 61 73 73 65 6d 62 6c 69 65 73 20 aged assemblies
a140: 77 68 65 6e 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 when.. ///
a150: 6f 70 65 6e 69 6e 67 20 74 68 65 20 63 6f 6e 6e opening the conn
a160: 65 63 74 69 6f 6e 2e 0d 0a 20 20 20 20 20 20 2f ection... /
a170: 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 // </summary>..
a180: 20 20 20 20 20 4e 6f 42 69 6e 64 46 75 6e 63 74 NoBindFunct
a190: 69 6f 6e 73 20 3d 20 30 78 38 30 30 2c 0d 0a 0d ions = 0x800,...
a1a0: 0a 23 69 66 20 49 4e 54 45 52 4f 50 5f 56 49 52 .#if INTEROP_VIR
a1b0: 54 55 41 4c 5f 54 41 42 4c 45 0d 0a 20 20 20 20 TUAL_TABLE..
a1c0: 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d /// <summary>.
a1d0: 0a 20 20 20 20 20 20 2f 2f 2f 20 53 6b 69 70 20 . /// Skip
a1e0: 73 65 74 74 69 6e 67 20 74 68 65 20 6c 6f 67 67 setting the logg
a1f0: 69 6e 67 20 72 65 6c 61 74 65 64 20 70 72 6f 70 ing related prop
a200: 65 72 74 69 65 73 20 6f 66 20 74 68 65 0d 0a 20 erties of the..
a210: 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 20 63 72 /// <see cr
a220: 65 66 3d 22 53 51 4c 69 74 65 4d 6f 64 75 6c 65 ef="SQLiteModule
a230: 22 20 2f 3e 20 6f 62 6a 65 63 74 20 69 6e 73 74 " /> object inst
a240: 61 6e 63 65 20 74 68 61 74 20 77 61 73 20 70 61 ance that was pa
a250: 73 73 65 64 20 74 6f 0d 0a 20 20 20 20 20 20 2f ssed to.. /
a260: 2f 2f 20 74 68 65 20 3c 73 65 65 20 63 72 65 66 // the <see cref
a270: 3d 22 53 51 4c 69 74 65 43 6f 6e 6e 65 63 74 69 ="SQLiteConnecti
a280: 6f 6e 2e 43 72 65 61 74 65 4d 6f 64 75 6c 65 22 on.CreateModule"
a290: 20 2f 3e 20 6d 65 74 68 6f 64 2e 0d 0a 20 20 20 /> method...
a2a0: 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 /// </summary
a2b0: 3e 0d 0a 20 20 20 20 20 20 4e 6f 4c 6f 67 4d 6f >.. NoLogMo
a2c0: 64 75 6c 65 20 3d 20 30 78 31 30 30 30 2c 0d 0a dule = 0x1000,..
a2d0: 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d .. /// <sum
a2e0: 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 2f 2f 2f mary>.. ///
a2f0: 20 45 6e 61 62 6c 65 20 6c 6f 67 67 69 6e 67 20 Enable logging
a300: 6f 66 20 61 6c 6c 20 76 69 72 74 75 61 6c 20 74 of all virtual t
a310: 61 62 6c 65 20 6d 6f 64 75 6c 65 20 65 72 72 6f able module erro
a320: 72 73 20 73 65 65 6e 20 62 79 20 74 68 65 0d 0a rs seen by the..
a330: 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 20 63 /// <see c
a340: 72 65 66 3d 22 53 51 4c 69 74 65 4d 6f 64 75 6c ref="SQLiteModul
a350: 65 2e 53 65 74 54 61 62 6c 65 45 72 72 6f 72 28 e.SetTableError(
a360: 49 6e 74 50 74 72 2c 53 74 72 69 6e 67 29 22 20 IntPtr,String)"
a370: 2f 3e 20 6d 65 74 68 6f 64 2e 0d 0a 20 20 20 20 /> method...
a380: 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e /// </summary>
a390: 0d 0a 20 20 20 20 20 20 4c 6f 67 4d 6f 64 75 6c .. LogModul
a3a0: 65 45 72 72 6f 72 20 3d 20 30 78 32 30 30 30 2c eError = 0x2000,
a3b0: 0d 0a 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c 73 .... /// <s
a3c0: 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 2f ummary>.. /
a3d0: 2f 2f 20 45 6e 61 62 6c 65 20 6c 6f 67 67 69 6e // Enable loggin
a3e0: 67 20 6f 66 20 63 65 72 74 61 69 6e 20 76 69 72 g of certain vir
a3f0: 74 75 61 6c 20 74 61 62 6c 65 20 6d 6f 64 75 6c tual table modul
a400: 65 20 65 78 63 65 70 74 69 6f 6e 73 20 74 68 61 e exceptions tha
a410: 74 20 63 61 6e 6e 6f 74 0d 0a 20 20 20 20 20 20 t cannot..
a420: 2f 2f 2f 20 62 65 20 65 61 73 69 6c 79 20 64 69 /// be easily di
a430: 73 63 6f 76 65 72 65 64 20 76 69 61 20 6f 74 68 scovered via oth
a440: 65 72 20 6d 65 61 6e 73 2e 0d 0a 20 20 20 20 20 er means...
a450: 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d /// </summary>.
a460: 0a 20 20 20 20 20 20 4c 6f 67 4d 6f 64 75 6c 65 . LogModule
a470: 45 78 63 65 70 74 69 6f 6e 20 3d 20 30 78 34 30 Exception = 0x40
a480: 30 30 2c 0d 0a 23 65 6e 64 69 66 0d 0a 0d 0a 20 00,..#endif....
a490: 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 /// <summar
a4a0: 79 3e 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 45 6e y>.. /// En
a4b0: 61 62 6c 65 20 74 72 61 63 69 6e 67 20 6f 66 20 able tracing of
a4c0: 70 6f 74 65 6e 74 69 61 6c 6c 79 20 69 6d 70 6f potentially impo
a4d0: 72 74 61 6e 74 20 5b 6e 6f 6e 2d 66 61 74 61 6c rtant [non-fatal
a4e0: 5d 20 65 72 72 6f 72 20 63 6f 6e 64 69 74 69 6f ] error conditio
a4f0: 6e 73 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 74 68 ns.. /// th
a500: 61 74 20 63 61 6e 6e 6f 74 20 62 65 20 65 61 73 at cannot be eas
a510: 69 6c 79 20 72 65 70 6f 72 74 65 64 20 74 68 72 ily reported thr
a520: 6f 75 67 68 20 6f 74 68 65 72 20 6d 65 61 6e 73 ough other means
a530: 2e 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 ... /// </s
a540: 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 54 ummary>.. T
a550: 72 61 63 65 57 61 72 6e 69 6e 67 20 3d 20 30 78 raceWarning = 0x
a560: 38 30 30 30 2c 0d 0a 0d 0a 20 20 20 20 20 20 2f 8000,.... /
a570: 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 // <summary>..
a580: 20 20 20 20 2f 2f 2f 20 57 68 65 6e 20 62 69 6e /// When bin
a590: 64 69 6e 67 20 70 61 72 61 6d 65 74 65 72 20 76 ding parameter v
a5a0: 61 6c 75 65 73 2c 20 61 6c 77 61 79 73 20 75 73 alues, always us
a5b0: 65 20 74 68 65 20 69 6e 76 61 72 69 61 6e 74 20 e the invariant
a5c0: 63 75 6c 74 75 72 65 20 77 68 65 6e 0d 0a 20 20 culture when..
a5d0: 20 20 20 20 2f 2f 2f 20 63 6f 6e 76 65 72 74 69 /// converti
a5e0: 6e 67 20 74 68 65 69 72 20 76 61 6c 75 65 73 20 ng their values
a5f0: 66 72 6f 6d 20 73 74 72 69 6e 67 73 2e 0d 0a 20 from strings...
a600: 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 /// </summa
a610: 72 79 3e 0d 0a 20 20 20 20 20 20 43 6f 6e 76 65 ry>.. Conve
a620: 72 74 49 6e 76 61 72 69 61 6e 74 54 65 78 74 20 rtInvariantText
a630: 3d 20 30 78 31 30 30 30 30 2c 0d 0a 0d 0a 20 20 = 0x10000,....
a640: 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 /// <summary
a650: 3e 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 57 68 65 >.. /// Whe
a660: 6e 20 62 69 6e 64 69 6e 67 20 70 61 72 61 6d 65 n binding parame
a670: 74 65 72 20 76 61 6c 75 65 73 2c 20 61 6c 77 61 ter values, alwa
a680: 79 73 20 75 73 65 20 74 68 65 20 69 6e 76 61 72 ys use the invar
a690: 69 61 6e 74 20 63 75 6c 74 75 72 65 20 77 68 65 iant culture whe
a6a0: 6e 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 63 6f 6e n.. /// con
a6b0: 76 65 72 74 69 6e 67 20 74 68 65 69 72 20 76 61 verting their va
a6c0: 6c 75 65 73 20 74 6f 20 73 74 72 69 6e 67 73 2e lues to strings.
a6d0: 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 .. /// </su
a6e0: 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 42 69 mmary>.. Bi
a6f0: 6e 64 49 6e 76 61 72 69 61 6e 74 54 65 78 74 20 ndInvariantText
a700: 3d 20 30 78 32 30 30 30 30 2c 0d 0a 0d 0a 20 20 = 0x20000,....
a710: 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 /// <summary
a720: 3e 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 44 69 73 >.. /// Dis
a730: 61 62 6c 65 20 75 73 69 6e 67 20 74 68 65 20 63 able using the c
a740: 6f 6e 6e 65 63 74 69 6f 6e 20 70 6f 6f 6c 20 62 onnection pool b
a750: 79 20 64 65 66 61 75 6c 74 2e 20 20 49 66 20 74 y default. If t
a760: 68 65 20 22 50 6f 6f 6c 69 6e 67 22 0d 0a 20 20 he "Pooling"..
a770: 20 20 20 20 2f 2f 2f 20 63 6f 6e 6e 65 63 74 69 /// connecti
a780: 6f 6e 20 73 74 72 69 6e 67 20 70 72 6f 70 65 72 on string proper
a790: 74 79 20 69 73 20 73 70 65 63 69 66 69 65 64 2c ty is specified,
a7a0: 20 69 74 73 20 76 61 6c 75 65 20 77 69 6c 6c 20 its value will
a7b0: 6f 76 65 72 72 69 64 65 0d 0a 20 20 20 20 20 20 override..
a7c0: 2f 2f 2f 20 74 68 69 73 20 66 6c 61 67 2e 20 20 /// this flag.
a7d0: 54 68 65 20 70 72 65 63 69 73 65 20 6f 75 74 63 The precise outc
a7e0: 6f 6d 65 20 6f 66 20 63 6f 6d 62 69 6e 69 6e 67 ome of combining
a7f0: 20 74 68 69 73 20 66 6c 61 67 20 77 69 74 68 20 this flag with
a800: 74 68 65 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c the.. /// <
a810: 73 65 65 20 63 72 65 66 3d 22 55 73 65 43 6f 6e see cref="UseCon
a820: 6e 65 63 74 69 6f 6e 50 6f 6f 6c 22 20 2f 3e 20 nectionPool" />
a830: 66 6c 61 67 20 69 73 20 75 6e 73 70 65 63 69 66 flag is unspecif
a840: 69 65 64 3b 20 68 6f 77 65 76 65 72 2c 0d 0a 20 ied; however,..
a850: 20 20 20 20 20 2f 2f 2f 20 6f 6e 65 20 6f 66 20 /// one of
a860: 74 68 65 20 66 6c 61 67 73 20 77 69 6c 6c 20 62 the flags will b
a870: 65 20 69 6e 20 65 66 66 65 63 74 2e 0d 0a 20 20 e in effect...
a880: 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 /// </summar
a890: 79 3e 0d 0a 20 20 20 20 20 20 4e 6f 43 6f 6e 6e y>.. NoConn
a8a0: 65 63 74 69 6f 6e 50 6f 6f 6c 20 3d 20 30 78 34 ectionPool = 0x4
a8b0: 30 30 30 30 2c 0d 0a 0d 0a 20 20 20 20 20 20 2f 0000,.... /
a8c0: 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 // <summary>..
a8d0: 20 20 20 20 2f 2f 2f 20 45 6e 61 62 6c 65 20 75 /// Enable u
a8e0: 73 69 6e 67 20 74 68 65 20 63 6f 6e 6e 65 63 74 sing the connect
a8f0: 69 6f 6e 20 70 6f 6f 6c 20 62 79 20 64 65 66 61 ion pool by defa
a900: 75 6c 74 2e 20 20 49 66 20 74 68 65 20 22 50 6f ult. If the "Po
a910: 6f 6c 69 6e 67 22 0d 0a 20 20 20 20 20 20 2f 2f oling".. //
a920: 2f 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 73 74 72 / connection str
a930: 69 6e 67 20 70 72 6f 70 65 72 74 79 20 69 73 20 ing property is
a940: 73 70 65 63 69 66 69 65 64 2c 20 69 74 73 20 76 specified, its v
a950: 61 6c 75 65 20 77 69 6c 6c 20 6f 76 65 72 72 69 alue will overri
a960: 64 65 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 74 68 de.. /// th
a970: 69 73 20 66 6c 61 67 2e 20 20 54 68 65 20 70 72 is flag. The pr
a980: 65 63 69 73 65 20 6f 75 74 63 6f 6d 65 20 6f 66 ecise outcome of
a990: 20 63 6f 6d 62 69 6e 69 6e 67 20 74 68 69 73 20 combining this
a9a0: 66 6c 61 67 20 77 69 74 68 20 74 68 65 0d 0a 20 flag with the..
a9b0: 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 20 63 72 /// <see cr
a9c0: 65 66 3d 22 4e 6f 43 6f 6e 6e 65 63 74 69 6f 6e ef="NoConnection
a9d0: 50 6f 6f 6c 22 20 2f 3e 20 66 6c 61 67 20 69 73 Pool" /> flag is
a9e0: 20 75 6e 73 70 65 63 69 66 69 65 64 3b 20 68 6f unspecified; ho
a9f0: 77 65 76 65 72 2c 0d 0a 20 20 20 20 20 20 2f 2f wever,.. //
aa00: 2f 20 6f 6e 65 20 6f 66 20 74 68 65 20 66 6c 61 / one of the fla
aa10: 67 73 20 77 69 6c 6c 20 62 65 20 69 6e 20 65 66 gs will be in ef
aa20: 66 65 63 74 2e 0d 0a 20 20 20 20 20 20 2f 2f 2f fect... ///
aa30: 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 </summary>..
aa40: 20 20 20 55 73 65 43 6f 6e 6e 65 63 74 69 6f 6e UseConnection
aa50: 50 6f 6f 6c 20 3d 20 30 78 38 30 30 30 30 2c 0d Pool = 0x80000,.
aa60: 0a 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 ... /// <su
aa70: 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 2f 2f mmary>.. //
aa80: 2f 20 45 6e 61 62 6c 65 20 75 73 69 6e 67 20 70 / Enable using p
aa90: 65 72 2d 63 6f 6e 6e 65 63 74 69 6f 6e 20 6d 61 er-connection ma
aaa0: 70 70 69 6e 67 73 20 62 65 74 77 65 65 6e 20 74 ppings between t
aab0: 79 70 65 20 6e 61 6d 65 73 20 61 6e 64 0d 0a 20 ype names and..
aac0: 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 20 63 72 /// <see cr
aad0: 65 66 3d 22 44 62 54 79 70 65 22 20 2f 3e 20 76 ef="DbType" /> v
aae0: 61 6c 75 65 73 2e 20 20 41 6c 73 6f 20 73 65 65 alues. Also see
aaf0: 20 74 68 65 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 the.. ///
ab00: 3c 73 65 65 20 63 72 65 66 3d 22 53 51 4c 69 74 <see cref="SQLit
ab10: 65 43 6f 6e 6e 65 63 74 69 6f 6e 2e 43 6c 65 61 eConnection.Clea
ab20: 72 54 79 70 65 4d 61 70 70 69 6e 67 73 22 20 2f rTypeMappings" /
ab30: 3e 2c 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c 73 >,.. /// <s
ab40: 65 65 20 63 72 65 66 3d 22 53 51 4c 69 74 65 43 ee cref="SQLiteC
ab50: 6f 6e 6e 65 63 74 69 6f 6e 2e 47 65 74 54 79 70 onnection.GetTyp
ab60: 65 4d 61 70 70 69 6e 67 73 22 20 2f 3e 2c 20 61 eMappings" />, a
ab70: 6e 64 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c 73 nd.. /// <s
ab80: 65 65 20 63 72 65 66 3d 22 53 51 4c 69 74 65 43 ee cref="SQLiteC
ab90: 6f 6e 6e 65 63 74 69 6f 6e 2e 41 64 64 54 79 70 onnection.AddTyp
aba0: 65 4d 61 70 70 69 6e 67 22 20 2f 3e 20 6d 65 74 eMapping" /> met
abb0: 68 6f 64 73 2e 20 20 54 68 65 73 65 0d 0a 20 20 hods. These..
abc0: 20 20 20 20 2f 2f 2f 20 70 65 72 2d 63 6f 6e 6e /// per-conn
abd0: 65 63 74 69 6f 6e 20 6d 61 70 70 69 6e 67 73 2c ection mappings,
abe0: 20 77 68 65 6e 20 70 72 65 73 65 6e 74 2c 20 6f when present, o
abf0: 76 65 72 72 69 64 65 20 74 68 65 20 63 6f 72 72 verride the corr
ac00: 65 73 70 6f 6e 64 69 6e 67 0d 0a 20 20 20 20 20 esponding..
ac10: 20 2f 2f 2f 20 67 6c 6f 62 61 6c 20 6d 61 70 70 /// global mapp
ac20: 69 6e 67 73 2e 0d 0a 20 20 20 20 20 20 2f 2f 2f ings... ///
ac30: 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 </summary>..
ac40: 20 20 20 55 73 65 43 6f 6e 6e 65 63 74 69 6f 6e UseConnection
ac50: 54 79 70 65 73 20 3d 20 30 78 31 30 30 30 30 30 Types = 0x100000
ac60: 2c 0d 0a 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c ,.... /// <
ac70: 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 summary>..
ac80: 2f 2f 2f 20 44 69 73 61 62 6c 65 20 75 73 69 6e /// Disable usin
ac90: 67 20 67 6c 6f 62 61 6c 20 6d 61 70 70 69 6e 67 g global mapping
aca0: 73 20 62 65 74 77 65 65 6e 20 74 79 70 65 20 6e s between type n
acb0: 61 6d 65 73 20 61 6e 64 0d 0a 20 20 20 20 20 20 ames and..
acc0: 2f 2f 2f 20 3c 73 65 65 20 63 72 65 66 3d 22 44 /// <see cref="D
acd0: 62 54 79 70 65 22 20 2f 3e 20 76 61 6c 75 65 73 bType" /> values
ace0: 2e 20 20 54 68 69 73 20 6d 61 79 20 62 65 20 75 . This may be u
acf0: 73 65 66 75 6c 20 69 6e 20 73 6f 6d 65 20 76 65 seful in some ve
ad00: 72 79 20 6e 61 72 72 6f 77 0d 0a 20 20 20 20 20 ry narrow..
ad10: 20 2f 2f 2f 20 63 61 73 65 73 3b 20 68 6f 77 65 /// cases; howe
ad20: 76 65 72 2c 20 69 66 20 74 68 65 72 65 20 61 72 ver, if there ar
ad30: 65 20 6e 6f 20 70 65 72 2d 63 6f 6e 6e 65 63 74 e no per-connect
ad40: 69 6f 6e 20 74 79 70 65 20 6d 61 70 70 69 6e 67 ion type mapping
ad50: 73 2c 20 74 68 65 0d 0a 20 20 20 20 20 20 2f 2f s, the.. //
ad60: 2f 20 66 61 6c 6c 62 61 63 6b 20 64 65 66 61 75 / fallback defau
ad70: 6c 74 73 20 77 69 6c 6c 20 62 65 20 75 73 65 64 lts will be used
ad80: 20 66 6f 72 20 62 6f 74 68 20 74 79 70 65 20 6e for both type n
ad90: 61 6d 65 73 20 61 6e 64 20 74 68 65 69 72 0d 0a ames and their..
ada0: 20 20 20 20 20 20 2f 2f 2f 20 61 73 73 6f 63 69 /// associ
adb0: 61 74 65 64 20 3c 73 65 65 20 63 72 65 66 3d 22 ated <see cref="
adc0: 44 62 54 79 70 65 22 20 2f 3e 20 76 61 6c 75 65 DbType" /> value
add0: 73 2e 20 20 54 68 65 72 65 66 6f 72 65 2c 20 75 s. Therefore, u
ade0: 73 65 20 6f 66 20 74 68 69 73 20 66 6c 61 67 0d se of this flag.
adf0: 0a 20 20 20 20 20 20 2f 2f 2f 20 69 73 20 6e 6f . /// is no
ae00: 74 20 72 65 63 6f 6d 6d 65 6e 64 65 64 2e 0d 0a t recommended...
ae10: 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d /// </summ
ae20: 61 72 79 3e 0d 0a 20 20 20 20 20 20 4e 6f 47 6c ary>.. NoGl
ae30: 6f 62 61 6c 54 79 70 65 73 20 3d 20 30 78 32 30 obalTypes = 0x20
ae40: 30 30 30 30 2c 0d 0a 0d 0a 20 20 20 20 20 20 2f 0000,.... /
ae50: 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 // <summary>..
ae60: 20 20 20 20 2f 2f 2f 20 57 68 65 6e 20 74 68 65 /// When the
ae70: 20 3c 73 65 65 20 63 72 65 66 3d 22 53 51 4c 69 <see cref="SQLi
ae80: 74 65 44 61 74 61 52 65 61 64 65 72 2e 48 61 73 teDataReader.Has
ae90: 52 6f 77 73 22 20 2f 3e 20 70 72 6f 70 65 72 74 Rows" /> propert
aea0: 79 20 69 73 20 75 73 65 64 2c 20 69 74 0d 0a 20 y is used, it..
aeb0: 20 20 20 20 20 2f 2f 2f 20 73 68 6f 75 6c 64 20 /// should
aec0: 72 65 74 75 72 6e 20 6e 6f 6e 2d 7a 65 72 6f 20 return non-zero
aed0: 69 66 20 74 68 65 72 65 20 77 65 72 65 20 65 76 if there were ev
aee0: 65 72 20 61 6e 79 20 72 6f 77 73 20 69 6e 20 74 er any rows in t
aef0: 68 65 20 61 73 73 6f 63 69 61 74 65 64 0d 0a 20 he associated..
af00: 20 20 20 20 20 2f 2f 2f 20 72 65 73 75 6c 74 20 /// result
af10: 73 65 74 73 2e 0d 0a 20 20 20 20 20 20 2f 2f 2f sets... ///
af20: 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 </summary>..
af30: 20 20 20 53 74 69 63 6b 79 48 61 73 52 6f 77 73 StickyHasRows
af40: 20 3d 20 30 78 34 30 30 30 30 30 2c 0d 0a 0d 0a = 0x400000,....
af50: 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 /// <summa
af60: 72 79 3e 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 45 ry>.. /// E
af70: 6e 61 62 6c 65 20 22 73 74 72 69 63 74 22 20 74 nable "strict" t
af80: 72 61 6e 73 61 63 74 69 6f 6e 20 65 6e 6c 69 73 ransaction enlis
af90: 74 6d 65 6e 74 20 73 65 6d 61 6e 74 69 63 73 2e tment semantics.
afa0: 20 20 53 65 74 74 69 6e 67 20 74 68 69 73 20 66 Setting this f
afb0: 6c 61 67 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 77 lag.. /// w
afc0: 69 6c 6c 20 63 61 75 73 65 20 61 6e 20 65 78 63 ill cause an exc
afd0: 65 70 74 69 6f 6e 20 74 6f 20 62 65 20 74 68 72 eption to be thr
afe0: 6f 77 6e 20 69 66 20 61 6e 20 61 74 74 65 6d 70 own if an attemp
aff0: 74 20 69 73 20 6d 61 64 65 20 74 6f 20 65 6e 6c t is made to enl
b000: 69 73 74 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 69 ist.. /// i
b010: 6e 20 61 20 74 72 61 6e 73 61 63 74 69 6f 6e 20 n a transaction
b020: 77 69 74 68 20 61 6e 20 75 6e 61 76 61 69 6c 61 with an unavaila
b030: 62 6c 65 20 6f 72 20 75 6e 73 75 70 70 6f 72 74 ble or unsupport
b040: 65 64 20 69 73 6f 6c 61 74 69 6f 6e 20 6c 65 76 ed isolation lev
b050: 65 6c 2e 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 49 el... /// I
b060: 6e 20 74 68 65 20 66 75 74 75 72 65 2c 20 6d 6f n the future, mo
b070: 72 65 20 65 78 74 65 6e 73 69 76 65 20 63 68 65 re extensive che
b080: 63 6b 73 20 6d 61 79 20 62 65 20 65 6e 61 62 6c cks may be enabl
b090: 65 64 20 62 79 20 74 68 69 73 20 66 6c 61 67 20 ed by this flag
b0a0: 61 73 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 77 65 as.. /// we
b0b0: 6c 6c 2e 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c ll... /// <
b0c0: 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 /summary>..
b0d0: 20 53 74 72 69 63 74 45 6e 6c 69 73 74 6d 65 6e StrictEnlistmen
b0e0: 74 20 3d 20 30 78 38 30 30 30 30 30 2c 0d 0a 0d t = 0x800000,...
b0f0: 0a 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d . /// <summ
b100: 61 72 79 3e 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 ary>.. ///
b110: 45 6e 61 62 6c 65 20 6d 61 70 70 69 6e 67 20 6f Enable mapping o
b120: 66 20 75 6e 73 75 70 70 6f 72 74 65 64 20 74 72 f unsupported tr
b130: 61 6e 73 61 63 74 69 6f 6e 20 69 73 6f 6c 61 74 ansaction isolat
b140: 69 6f 6e 20 6c 65 76 65 6c 73 20 74 6f 20 74 68 ion levels to th
b150: 65 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 63 6c 6f e.. /// clo
b160: 73 65 73 74 20 73 75 70 70 6f 72 74 65 64 20 74 sest supported t
b170: 72 61 6e 73 61 63 74 69 6f 6e 20 69 73 6f 6c 61 ransaction isola
b180: 74 69 6f 6e 20 6c 65 76 65 6c 2e 0d 0a 20 20 20 tion level...
b190: 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 /// </summary
b1a0: 3e 0d 0a 20 20 20 20 20 20 4d 61 70 49 73 6f 6c >.. MapIsol
b1b0: 61 74 69 6f 6e 4c 65 76 65 6c 73 20 3d 20 30 78 ationLevels = 0x
b1c0: 31 30 30 30 30 30 30 2c 0d 0a 0d 0a 20 20 20 20 1000000,....
b1d0: 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d /// <summary>.
b1e0: 0a 20 20 20 20 20 20 2f 2f 2f 20 57 68 65 6e 20 . /// When
b1f0: 72 65 74 75 72 6e 69 6e 67 20 63 6f 6c 75 6d 6e returning column
b200: 20 76 61 6c 75 65 73 2c 20 61 74 74 65 6d 70 74 values, attempt
b210: 20 74 6f 20 64 65 74 65 63 74 20 74 68 65 20 61 to detect the a
b220: 66 66 69 6e 69 74 79 20 6f 66 0d 0a 20 20 20 20 ffinity of..
b230: 20 20 2f 2f 2f 20 74 65 78 74 75 61 6c 20 76 61 /// textual va
b240: 6c 75 65 73 20 62 79 20 63 68 65 63 6b 69 6e 67 lues by checking
b250: 20 69 66 20 74 68 65 79 20 66 75 6c 6c 79 20 63 if they fully c
b260: 6f 6e 66 6f 72 6d 20 74 6f 20 74 68 6f 73 65 20 onform to those
b270: 6f 66 20 74 68 65 0d 0a 20 20 20 20 20 20 2f 2f of the.. //
b280: 2f 20 3c 73 65 65 20 63 72 65 66 3d 22 54 79 70 / <see cref="Typ
b290: 65 41 66 66 69 6e 69 74 79 2e 4e 75 6c 6c 22 20 eAffinity.Null"
b2a0: 2f 3e 2c 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c />,.. /// <
b2b0: 73 65 65 20 63 72 65 66 3d 22 54 79 70 65 41 66 see cref="TypeAf
b2c0: 66 69 6e 69 74 79 2e 49 6e 74 36 34 22 20 2f 3e finity.Int64" />
b2d0: 2c 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 ,.. /// <se
b2e0: 65 20 63 72 65 66 3d 22 54 79 70 65 41 66 66 69 e cref="TypeAffi
b2f0: 6e 69 74 79 2e 44 6f 75 62 6c 65 22 20 2f 3e 2c nity.Double" />,
b300: 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 6f 72 20 3c .. /// or <
b310: 73 65 65 20 63 72 65 66 3d 22 54 79 70 65 41 66 see cref="TypeAf
b320: 66 69 6e 69 74 79 2e 44 61 74 65 54 69 6d 65 22 finity.DateTime"
b330: 20 2f 3e 20 74 79 70 65 73 2e 0d 0a 20 20 20 20 /> types...
b340: 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e /// </summary>
b350: 0d 0a 20 20 20 20 20 20 44 65 74 65 63 74 54 65 .. DetectTe
b360: 78 74 41 66 66 69 6e 69 74 79 20 3d 20 30 78 32 xtAffinity = 0x2
b370: 30 30 30 30 30 30 2c 0d 0a 0d 0a 20 20 20 20 20 000000,....
b380: 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a /// <summary>..
b390: 20 20 20 20 20 20 2f 2f 2f 20 57 68 65 6e 20 72 /// When r
b3a0: 65 74 75 72 6e 69 6e 67 20 63 6f 6c 75 6d 6e 20 eturning column
b3b0: 76 61 6c 75 65 73 2c 20 61 74 74 65 6d 70 74 20 values, attempt
b3c0: 74 6f 20 64 65 74 65 63 74 20 74 68 65 20 74 79 to detect the ty
b3d0: 70 65 20 6f 66 0d 0a 20 20 20 20 20 20 2f 2f 2f pe of.. ///
b3e0: 20 73 74 72 69 6e 67 20 76 61 6c 75 65 73 20 62 string values b
b3f0: 79 20 63 68 65 63 6b 69 6e 67 20 69 66 20 74 68 y checking if th
b400: 65 79 20 66 75 6c 6c 79 20 63 6f 6e 66 6f 72 6d ey fully conform
b410: 20 74 6f 20 74 68 6f 73 65 20 6f 66 0d 0a 20 20 to those of..
b420: 20 20 20 20 2f 2f 2f 20 74 68 65 20 3c 73 65 65 /// the <see
b430: 20 63 72 65 66 3d 22 54 79 70 65 41 66 66 69 6e cref="TypeAffin
b440: 69 74 79 2e 4e 75 6c 6c 22 20 2f 3e 2c 0d 0a 20 ity.Null" />,..
b450: 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 20 63 72 /// <see cr
b460: 65 66 3d 22 54 79 70 65 41 66 66 69 6e 69 74 79 ef="TypeAffinity
b470: 2e 49 6e 74 36 34 22 20 2f 3e 2c 0d 0a 20 20 20 .Int64" />,..
b480: 20 20 20 2f 2f 2f 20 3c 73 65 65 20 63 72 65 66 /// <see cref
b490: 3d 22 54 79 70 65 41 66 66 69 6e 69 74 79 2e 44 ="TypeAffinity.D
b4a0: 6f 75 62 6c 65 22 20 2f 3e 2c 0d 0a 20 20 20 20 ouble" />,..
b4b0: 20 20 2f 2f 2f 20 6f 72 20 3c 73 65 65 20 63 72 /// or <see cr
b4c0: 65 66 3d 22 54 79 70 65 41 66 66 69 6e 69 74 79 ef="TypeAffinity
b4d0: 2e 44 61 74 65 54 69 6d 65 22 20 2f 3e 20 74 79 .DateTime" /> ty
b4e0: 70 65 73 2e 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 pes... ///
b4f0: 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 </summary>..
b500: 20 20 44 65 74 65 63 74 53 74 72 69 6e 67 54 79 DetectStringTy
b510: 70 65 20 3d 20 30 78 34 30 30 30 30 30 30 2c 0d pe = 0x4000000,.
b520: 0a 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 ... /// <su
b530: 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 2f 2f mmary>.. //
b540: 2f 20 53 6b 69 70 20 71 75 65 72 79 69 6e 67 20 / Skip querying
b550: 72 75 6e 74 69 6d 65 20 63 6f 6e 66 69 67 75 72 runtime configur
b560: 61 74 69 6f 6e 20 73 65 74 74 69 6e 67 73 20 66 ation settings f
b570: 6f 72 20 75 73 65 20 62 79 20 74 68 65 0d 0a 20 or use by the..
b580: 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 20 63 72 /// <see cr
b590: 65 66 3d 22 53 51 4c 69 74 65 43 6f 6e 76 65 72 ef="SQLiteConver
b5a0: 74 22 20 2f 3e 20 63 6c 61 73 73 2c 20 69 6e 63 t" /> class, inc
b5b0: 6c 75 64 69 6e 67 20 74 68 65 20 64 65 66 61 75 luding the defau
b5c0: 6c 74 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c 73 lt.. /// <s
b5d0: 65 65 20 63 72 65 66 3d 22 44 62 54 79 70 65 22 ee cref="DbType"
b5e0: 20 2f 3e 20 76 61 6c 75 65 20 61 6e 64 20 64 65 /> value and de
b5f0: 66 61 75 6c 74 20 64 61 74 61 62 61 73 65 20 74 fault database t
b600: 79 70 65 20 6e 61 6d 65 2e 0d 0a 20 20 20 20 20 ype name...
b610: 20 2f 2f 2f 20 3c 62 3e 4e 4f 54 45 3a 20 49 66 /// <b>NOTE: If
b620: 20 74 68 65 20 3c 73 65 65 20 63 72 65 66 3d 22 the <see cref="
b630: 53 51 4c 69 74 65 43 6f 6e 6e 65 63 74 69 6f 6e SQLiteConnection
b640: 2e 44 65 66 61 75 6c 74 44 62 54 79 70 65 22 20 .DefaultDbType"
b650: 2f 3e 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 61 6e />.. /// an
b660: 64 2f 6f 72 20 3c 73 65 65 20 63 72 65 66 3d 22 d/or <see cref="
b670: 53 51 4c 69 74 65 43 6f 6e 6e 65 63 74 69 6f 6e SQLiteConnection
b680: 2e 44 65 66 61 75 6c 74 54 79 70 65 4e 61 6d 65 .DefaultTypeName
b690: 22 20 2f 3e 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 " />.. ///
b6a0: 70 72 6f 70 65 72 74 69 65 73 20 61 72 65 20 6e properties are n
b6b0: 6f 74 20 73 65 74 20 65 78 70 6c 69 63 69 74 6c ot set explicitl
b6c0: 79 20 6e 6f 72 20 73 65 74 20 76 69 61 20 74 68 y nor set via th
b6d0: 65 69 72 20 63 6f 6e 6e 65 63 74 69 6f 6e 0d 0a eir connection..
b6e0: 20 20 20 20 20 20 2f 2f 2f 20 73 74 72 69 6e 67 /// string
b6f0: 20 70 72 6f 70 65 72 74 69 65 73 20 61 6e 64 20 properties and
b700: 72 65 70 65 61 74 65 64 20 63 61 6c 6c 73 20 74 repeated calls t
b710: 6f 20 64 65 74 65 72 6d 69 6e 65 20 74 68 65 73 o determine thes
b720: 65 20 72 75 6e 74 69 6d 65 0d 0a 20 20 20 20 20 e runtime..
b730: 20 2f 2f 2f 20 63 6f 6e 66 69 67 75 72 61 74 69 /// configurati
b740: 6f 6e 20 73 65 74 74 69 6e 67 73 20 61 72 65 20 on settings are
b750: 73 65 65 6e 20 74 6f 20 62 65 20 61 20 70 72 6f seen to be a pro
b760: 62 6c 65 6d 2c 20 74 68 69 73 20 66 6c 61 67 0d blem, this flag.
b770: 0a 20 20 20 20 20 20 2f 2f 2f 20 73 68 6f 75 6c . /// shoul
b780: 64 20 62 65 20 73 65 74 2e 3c 2f 62 3e 0d 0a 20 d be set.</b>..
b790: 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 /// </summa
b7a0: 72 79 3e 0d 0a 20 20 20 20 20 20 4e 6f 43 6f 6e ry>.. NoCon
b7b0: 76 65 72 74 53 65 74 74 69 6e 67 73 20 3d 20 30 vertSettings = 0
b7c0: 78 38 30 30 30 30 30 30 2c 0d 0a 0d 0a 20 20 20 x8000000,....
b7d0: 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e /// <summary>
b7e0: 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 57 68 65 6e .. /// When
b7f0: 20 62 69 6e 64 69 6e 67 20 70 61 72 61 6d 65 74 binding paramet
b800: 65 72 20 76 61 6c 75 65 73 20 77 69 74 68 20 74 er values with t
b810: 68 65 20 3c 73 65 65 20 63 72 65 66 3d 22 44 61 he <see cref="Da
b820: 74 65 54 69 6d 65 22 20 2f 3e 0d 0a 20 20 20 20 teTime" />..
b830: 20 20 2f 2f 2f 20 74 79 70 65 2c 20 74 61 6b 65 /// type, take
b840: 20 74 68 65 69 72 20 3c 73 65 65 20 63 72 65 66 their <see cref
b850: 3d 22 44 61 74 65 54 69 6d 65 4b 69 6e 64 22 20 ="DateTimeKind"
b860: 2f 3e 20 69 6e 74 6f 20 61 63 63 6f 75 6e 74 20 /> into account
b870: 61 73 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 77 65 as.. /// we
b880: 6c 6c 20 61 73 20 74 68 61 74 20 6f 66 20 74 68 ll as that of th
b890: 65 20 61 73 73 6f 63 69 61 74 65 64 20 3c 73 65 e associated <se
b8a0: 65 20 63 72 65 66 3d 22 53 51 4c 69 74 65 43 6f e cref="SQLiteCo
b8b0: 6e 6e 65 63 74 69 6f 6e 22 20 2f 3e 2e 0d 0a 20 nnection" />...
b8c0: 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 /// </summa
b8d0: 72 79 3e 0d 0a 20 20 20 20 20 20 42 69 6e 64 44 ry>.. BindD
b8e0: 61 74 65 54 69 6d 65 57 69 74 68 4b 69 6e 64 20 ateTimeWithKind
b8f0: 3d 20 30 78 31 30 30 30 30 30 30 30 2c 0d 0a 0d = 0x10000000,...
b900: 0a 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d . /// <summ
b910: 61 72 79 3e 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 ary>.. ///
b920: 49 66 20 61 6e 20 65 78 63 65 70 74 69 6f 6e 20 If an exception
b930: 69 73 20 63 61 75 67 68 74 20 77 68 65 6e 20 72 is caught when r
b940: 61 69 73 69 6e 67 20 74 68 65 0d 0a 20 20 20 20 aising the..
b950: 20 20 2f 2f 2f 20 3c 73 65 65 20 63 72 65 66 3d /// <see cref=
b960: 22 53 51 4c 69 74 65 43 6f 6e 6e 65 63 74 69 6f "SQLiteConnectio
b970: 6e 2e 43 6f 6d 6d 69 74 22 20 2f 3e 20 65 76 65 n.Commit" /> eve
b980: 6e 74 2c 20 74 68 65 20 74 72 61 6e 73 61 63 74 nt, the transact
b990: 69 6f 6e 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 73 ion.. /// s
b9a0: 68 6f 75 6c 64 20 62 65 20 72 6f 6c 6c 65 64 20 hould be rolled
b9b0: 62 61 63 6b 2e 20 20 49 66 20 74 68 69 73 20 69 back. If this i
b9c0: 73 20 6e 6f 74 20 73 70 65 63 69 66 69 65 64 2c s not specified,
b9d0: 20 74 68 65 20 74 72 61 6e 73 61 63 74 69 6f 6e the transaction
b9e0: 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 77 69 6c 6c .. /// will
b9f0: 20 63 6f 6e 74 69 6e 75 65 20 74 68 65 20 63 6f continue the co
ba00: 6d 6d 69 74 20 70 72 6f 63 65 73 73 20 69 6e 73 mmit process ins
ba10: 74 65 61 64 2e 0d 0a 20 20 20 20 20 20 2f 2f 2f tead... ///
ba20: 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 </summary>..
ba30: 20 20 20 52 6f 6c 6c 62 61 63 6b 4f 6e 45 78 63 RollbackOnExc
ba40: 65 70 74 69 6f 6e 20 3d 20 30 78 32 30 30 30 30 eption = 0x20000
ba50: 30 30 30 2c 0d 0a 0d 0a 20 20 20 20 20 20 2f 2f 000,.... //
ba60: 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 / <summary>..
ba70: 20 20 20 2f 2f 2f 20 49 66 20 61 6e 20 65 78 63 /// If an exc
ba80: 65 70 74 69 6f 6e 20 69 73 20 63 61 75 67 68 74 eption is caught
ba90: 20 77 68 65 6e 20 72 61 69 73 69 6e 67 20 74 68 when raising th
baa0: 65 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 e.. /// <se
bab0: 65 20 63 72 65 66 3d 22 53 51 4c 69 74 65 43 6f e cref="SQLiteCo
bac0: 6e 6e 65 63 74 69 6f 6e 2e 41 75 74 68 6f 72 69 nnection.Authori
bad0: 7a 65 22 20 2f 3e 20 65 76 65 6e 74 2c 20 74 68 ze" /> event, th
bae0: 65 20 61 63 74 69 6f 6e 20 73 68 6f 75 6c 64 0d e action should.
baf0: 0a 20 20 20 20 20 20 2f 2f 2f 20 73 68 6f 75 6c . /// shoul
bb00: 64 20 62 65 20 64 65 6e 69 65 64 2e 20 20 49 66 d be denied. If
bb10: 20 74 68 69 73 20 69 73 20 6e 6f 74 20 73 70 65 this is not spe
bb20: 63 69 66 69 65 64 2c 20 74 68 65 20 61 63 74 69 cified, the acti
bb30: 6f 6e 20 77 69 6c 6c 20 62 65 0d 0a 20 20 20 20 on will be..
bb40: 20 20 2f 2f 2f 20 61 6c 6c 6f 77 65 64 20 69 6e /// allowed in
bb50: 73 74 65 61 64 2e 0d 0a 20 20 20 20 20 20 2f 2f stead... //
bb60: 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 / </summary>..
bb70: 20 20 20 20 44 65 6e 79 4f 6e 45 78 63 65 70 74 DenyOnExcept
bb80: 69 6f 6e 20 3d 20 30 78 34 30 30 30 30 30 30 30 ion = 0x40000000
bb90: 2c 0d 0a 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c ,.... /// <
bba0: 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 summary>..
bbb0: 2f 2f 2f 20 49 66 20 61 6e 20 65 78 63 65 70 74 /// If an except
bbc0: 69 6f 6e 20 69 73 20 63 61 75 67 68 74 20 77 68 ion is caught wh
bbd0: 65 6e 20 72 61 69 73 69 6e 67 20 74 68 65 0d 0a en raising the..
bbe0: 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 20 63 /// <see c
bbf0: 72 65 66 3d 22 53 51 4c 69 74 65 43 6f 6e 6e 65 ref="SQLiteConne
bc00: 63 74 69 6f 6e 2e 50 72 6f 67 72 65 73 73 22 20 ction.Progress"
bc10: 2f 3e 20 65 76 65 6e 74 2c 20 74 68 65 20 6f 70 /> event, the op
bc20: 65 72 61 74 69 6f 6e 0d 0a 20 20 20 20 20 20 2f eration.. /
bc30: 2f 2f 20 73 68 6f 75 6c 64 20 62 65 20 69 6e 74 // should be int
bc40: 65 72 72 75 70 74 65 64 2e 20 20 49 66 20 74 68 errupted. If th
bc50: 69 73 20 69 73 20 6e 6f 74 20 73 70 65 63 69 66 is is not specif
bc60: 69 65 64 2c 20 74 68 65 20 6f 70 65 72 61 74 69 ied, the operati
bc70: 6f 6e 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 77 69 on.. /// wi
bc80: 6c 6c 20 73 69 6d 70 6c 79 20 63 6f 6e 74 69 6e ll simply contin
bc90: 75 65 2e 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c ue... /// <
bca0: 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 /summary>..
bcb0: 20 49 6e 74 65 72 72 75 70 74 4f 6e 45 78 63 65 InterruptOnExce
bcc0: 70 74 69 6f 6e 20 3d 20 30 78 38 30 30 30 30 30 ption = 0x800000
bcd0: 30 30 2c 0d 0a 0d 0a 20 20 20 20 20 20 2f 2f 2f 00,.... ///
bce0: 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 <summary>..
bcf0: 20 20 2f 2f 2f 20 41 74 74 65 6d 70 74 20 74 6f /// Attempt to
bd00: 20 75 6e 62 69 6e 64 20 61 6c 6c 20 66 75 6e 63 unbind all func
bd10: 74 69 6f 6e 73 20 70 72 6f 76 69 64 65 64 20 62 tions provided b
bd20: 79 20 6f 74 68 65 72 20 6d 61 6e 61 67 65 64 20 y other managed
bd30: 61 73 73 65 6d 62 6c 69 65 73 0d 0a 20 20 20 20 assemblies..
bd40: 20 20 2f 2f 2f 20 77 68 65 6e 20 63 6c 6f 73 69 /// when closi
bd50: 6e 67 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f ng the connectio
bd60: 6e 2e 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c 2f n... /// </
bd70: 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 summary>..
bd80: 55 6e 62 69 6e 64 46 75 6e 63 74 69 6f 6e 73 4f UnbindFunctionsO
bd90: 6e 43 6c 6f 73 65 20 3d 20 30 78 31 30 30 30 30 nClose = 0x10000
bda0: 30 30 30 30 2c 0d 0a 0d 0a 20 20 20 20 20 20 2f 0000,.... /
bdb0: 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 // <summary>..
bdc0: 20 20 20 20 2f 2f 2f 20 57 68 65 6e 20 72 65 74 /// When ret
bdd0: 75 72 6e 69 6e 67 20 63 6f 6c 75 6d 6e 20 76 61 urning column va
bde0: 6c 75 65 73 20 61 73 20 61 20 3c 73 65 65 20 63 lues as a <see c
bdf0: 72 65 66 3d 22 53 74 72 69 6e 67 22 20 2f 3e 2c ref="String" />,
be00: 20 73 6b 69 70 0d 0a 20 20 20 20 20 20 2f 2f 2f skip.. ///
be10: 20 76 65 72 69 66 79 69 6e 67 20 74 68 65 69 72 verifying their
be20: 20 61 66 66 69 6e 69 74 79 2e 0d 0a 20 20 20 20 affinity...
be30: 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e /// </summary>
be40: 0d 0a 20 20 20 20 20 20 4e 6f 56 65 72 69 66 79 .. NoVerify
be50: 54 65 78 74 41 66 66 69 6e 69 74 79 20 3d 20 30 TextAffinity = 0
be60: 78 32 30 30 30 30 30 30 30 30 2c 0d 0a 0d 0a 20 x200000000,....
be70: 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 /// <summar
be80: 79 3e 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 57 68 y>.. /// Wh
be90: 65 6e 20 62 69 6e 64 69 6e 67 20 70 61 72 61 6d en binding param
bea0: 65 74 65 72 20 76 61 6c 75 65 73 20 6f 72 20 72 eter values or r
beb0: 65 74 75 72 6e 69 6e 67 20 63 6f 6c 75 6d 6e 20 eturning column
bec0: 76 61 6c 75 65 73 2c 20 61 6c 77 61 79 73 0d 0a values, always..
bed0: 20 20 20 20 20 20 2f 2f 2f 20 74 72 65 61 74 20 /// treat
bee0: 74 68 65 6d 20 61 73 20 74 68 6f 75 67 68 20 74 them as though t
bef0: 68 65 79 20 77 65 72 65 20 70 6c 61 69 6e 20 74 hey were plain t
bf00: 65 78 74 20 28 69 2e 65 2e 20 6e 6f 20 6e 75 6d ext (i.e. no num
bf10: 65 72 69 63 2c 0d 0a 20 20 20 20 20 20 2f 2f 2f eric,.. ///
bf20: 20 64 61 74 65 2f 74 69 6d 65 2c 20 6f 72 20 6f date/time, or o
bf30: 74 68 65 72 20 63 6f 6e 76 65 72 73 69 6f 6e 73 ther conversions
bf40: 20 73 68 6f 75 6c 64 20 62 65 20 61 74 74 65 6d should be attem
bf50: 70 74 65 64 29 2e 0d 0a 20 20 20 20 20 20 2f 2f pted)... //
bf60: 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 / </summary>..
bf70: 20 20 20 20 42 69 6e 64 41 6e 64 47 65 74 41 6c BindAndGetAl
bf80: 6c 41 73 54 65 78 74 20 3d 20 42 69 6e 64 41 6c lAsText = BindAl
bf90: 6c 41 73 54 65 78 74 20 7c 20 47 65 74 41 6c 6c lAsText | GetAll
bfa0: 41 73 54 65 78 74 2c 0d 0a 0d 0a 20 20 20 20 20 AsText,....
bfb0: 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a /// <summary>..
bfc0: 20 20 20 20 20 20 2f 2f 2f 20 57 68 65 6e 20 62 /// When b
bfd0: 69 6e 64 69 6e 67 20 70 61 72 61 6d 65 74 65 72 inding parameter
bfe0: 20 76 61 6c 75 65 73 2c 20 61 6c 77 61 79 73 20 values, always
bff0: 75 73 65 20 74 68 65 20 69 6e 76 61 72 69 61 6e use the invarian
c000: 74 20 63 75 6c 74 75 72 65 20 77 68 65 6e 0d 0a t culture when..
c010: 20 20 20 20 20 20 2f 2f 2f 20 63 6f 6e 76 65 72 /// conver
c020: 74 69 6e 67 20 74 68 65 69 72 20 76 61 6c 75 65 ting their value
c030: 73 20 74 6f 20 73 74 72 69 6e 67 73 20 6f 72 20 s to strings or
c040: 66 72 6f 6d 20 73 74 72 69 6e 67 73 2e 0d 0a 20 from strings...
c050: 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 /// </summa
c060: 72 79 3e 0d 0a 20 20 20 20 20 20 43 6f 6e 76 65 ry>.. Conve
c070: 72 74 41 6e 64 42 69 6e 64 49 6e 76 61 72 69 61 rtAndBindInvaria
c080: 6e 74 54 65 78 74 20 3d 20 43 6f 6e 76 65 72 74 ntText = Convert
c090: 49 6e 76 61 72 69 61 6e 74 54 65 78 74 20 7c 20 InvariantText |
c0a0: 42 69 6e 64 49 6e 76 61 72 69 61 6e 74 54 65 78 BindInvariantTex
c0b0: 74 2c 0d 0a 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 t,.... ///
c0c0: 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 <summary>..
c0d0: 20 2f 2f 2f 20 57 68 65 6e 20 62 69 6e 64 69 6e /// When bindin
c0e0: 67 20 70 61 72 61 6d 65 74 65 72 20 76 61 6c 75 g parameter valu
c0f0: 65 73 20 6f 72 20 72 65 74 75 72 6e 69 6e 67 20 es or returning
c100: 63 6f 6c 75 6d 6e 20 76 61 6c 75 65 73 2c 20 61 column values, a
c110: 6c 77 61 79 73 0d 0a 20 20 20 20 20 20 2f 2f 2f lways.. ///
c120: 20 74 72 65 61 74 20 74 68 65 6d 20 61 73 20 74 treat them as t
c130: 68 6f 75 67 68 20 74 68 65 79 20 77 65 72 65 20 hough they were
c140: 70 6c 61 69 6e 20 74 65 78 74 20 28 69 2e 65 2e plain text (i.e.
c150: 20 6e 6f 20 6e 75 6d 65 72 69 63 2c 0d 0a 20 20 no numeric,..
c160: 20 20 20 20 2f 2f 2f 20 64 61 74 65 2f 74 69 6d /// date/tim
c170: 65 2c 20 6f 72 20 6f 74 68 65 72 20 63 6f 6e 76 e, or other conv
c180: 65 72 73 69 6f 6e 73 20 73 68 6f 75 6c 64 20 62 ersions should b
c190: 65 20 61 74 74 65 6d 70 74 65 64 29 20 61 6e 64 e attempted) and
c1a0: 20 61 6c 77 61 79 73 0d 0a 20 20 20 20 20 20 2f always.. /
c1b0: 2f 2f 20 75 73 65 20 74 68 65 20 69 6e 76 61 72 // use the invar
c1c0: 69 61 6e 74 20 63 75 6c 74 75 72 65 20 77 68 65 iant culture whe
c1d0: 6e 20 63 6f 6e 76 65 72 74 69 6e 67 20 74 68 65 n converting the
c1e0: 69 72 20 76 61 6c 75 65 73 20 74 6f 20 73 74 72 ir values to str
c1f0: 69 6e 67 73 2e 0d 0a 20 20 20 20 20 20 2f 2f 2f ings... ///
c200: 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 </summary>..
c210: 20 20 20 42 69 6e 64 41 6e 64 47 65 74 41 6c 6c BindAndGetAll
c220: 41 73 49 6e 76 61 72 69 61 6e 74 54 65 78 74 20 AsInvariantText
c230: 3d 20 42 69 6e 64 41 6e 64 47 65 74 41 6c 6c 41 = BindAndGetAllA
c240: 73 54 65 78 74 20 7c 20 42 69 6e 64 49 6e 76 61 sText | BindInva
c250: 72 69 61 6e 74 54 65 78 74 2c 0d 0a 0d 0a 20 20 riantText,....
c260: 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 /// <summary
c270: 3e 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 57 68 65 >.. /// Whe
c280: 6e 20 62 69 6e 64 69 6e 67 20 70 61 72 61 6d 65 n binding parame
c290: 74 65 72 20 76 61 6c 75 65 73 20 6f 72 20 72 65 ter values or re
c2a0: 74 75 72 6e 69 6e 67 20 63 6f 6c 75 6d 6e 20 76 turning column v
c2b0: 61 6c 75 65 73 2c 20 61 6c 77 61 79 73 0d 0a 20 alues, always..
c2c0: 20 20 20 20 20 2f 2f 2f 20 74 72 65 61 74 20 74 /// treat t
c2d0: 68 65 6d 20 61 73 20 74 68 6f 75 67 68 20 74 68 hem as though th
c2e0: 65 79 20 77 65 72 65 20 70 6c 61 69 6e 20 74 65 ey were plain te
c2f0: 78 74 20 28 69 2e 65 2e 20 6e 6f 20 6e 75 6d 65 xt (i.e. no nume
c300: 72 69 63 2c 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 ric,.. ///
c310: 64 61 74 65 2f 74 69 6d 65 2c 20 6f 72 20 6f 74 date/time, or ot
c320: 68 65 72 20 63 6f 6e 76 65 72 73 69 6f 6e 73 20 her conversions
c330: 73 68 6f 75 6c 64 20 62 65 20 61 74 74 65 6d 70 should be attemp
c340: 74 65 64 29 20 61 6e 64 20 61 6c 77 61 79 73 0d ted) and always.
c350: 0a 20 20 20 20 20 20 2f 2f 2f 20 75 73 65 20 74 . /// use t
c360: 68 65 20 69 6e 76 61 72 69 61 6e 74 20 63 75 6c he invariant cul
c370: 74 75 72 65 20 77 68 65 6e 20 63 6f 6e 76 65 72 ture when conver
c380: 74 69 6e 67 20 74 68 65 69 72 20 76 61 6c 75 65 ting their value
c390: 73 20 74 6f 20 73 74 72 69 6e 67 73 0d 0a 20 20 s to strings..
c3a0: 20 20 20 20 2f 2f 2f 20 6f 72 20 66 72 6f 6d 20 /// or from
c3b0: 73 74 72 69 6e 67 73 2e 0d 0a 20 20 20 20 20 20 strings...
c3c0: 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a /// </summary>..
c3d0: 20 20 20 20 20 20 43 6f 6e 76 65 72 74 41 6e 64 ConvertAnd
c3e0: 42 69 6e 64 41 6e 64 47 65 74 41 6c 6c 41 73 49 BindAndGetAllAsI
c3f0: 6e 76 61 72 69 61 6e 74 54 65 78 74 20 3d 20 42 nvariantText = B
c400: 69 6e 64 41 6e 64 47 65 74 41 6c 6c 41 73 54 65 indAndGetAllAsTe
c410: 78 74 20 7c 0d 0a 20 20 20 20 20 20 20 20 20 20 xt |..
c420: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
c430: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
c440: 20 20 20 20 20 43 6f 6e 76 65 72 74 41 6e 64 42 ConvertAndB
c450: 69 6e 64 49 6e 76 61 72 69 61 6e 74 54 65 78 74 indInvariantText
c460: 2c 0d 0a 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c ,.... /// <
c470: 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 summary>..
c480: 2f 2f 2f 20 45 6e 61 62 6c 65 20 61 6c 6c 20 6c /// Enable all l
c490: 6f 67 67 69 6e 67 2e 0d 0a 20 20 20 20 20 20 2f ogging... /
c4a0: 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 23 // </summary>..#
c4b0: 69 66 20 49 4e 54 45 52 4f 50 5f 56 49 52 54 55 if INTEROP_VIRTU
c4c0: 41 4c 5f 54 41 42 4c 45 0d 0a 20 20 20 20 20 20 AL_TABLE..
c4d0: 4c 6f 67 41 6c 6c 20 3d 20 4c 6f 67 50 72 65 70 LogAll = LogPrep
c4e0: 61 72 65 20 7c 20 4c 6f 67 50 72 65 42 69 6e 64 are | LogPreBind
c4f0: 20 7c 20 4c 6f 67 42 69 6e 64 20 7c 0d 0a 20 20 | LogBind |..
c500: 20 20 20 20 20 20 20 20 20 20 20 20 20 4c 6f 67 Log
c510: 43 61 6c 6c 62 61 63 6b 45 78 63 65 70 74 69 6f CallbackExceptio
c520: 6e 20 7c 20 4c 6f 67 42 61 63 6b 75 70 20 7c 20 n | LogBackup |
c530: 4c 6f 67 4d 6f 64 75 6c 65 45 72 72 6f 72 20 7c LogModuleError |
c540: 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..
c550: 20 4c 6f 67 4d 6f 64 75 6c 65 45 78 63 65 70 74 LogModuleExcept
c560: 69 6f 6e 2c 0d 0a 23 65 6c 73 65 0d 0a 20 20 20 ion,..#else..
c570: 20 20 20 4c 6f 67 41 6c 6c 20 3d 20 4c 6f 67 50 LogAll = LogP
c580: 72 65 70 61 72 65 20 7c 20 4c 6f 67 50 72 65 42 repare | LogPreB
c590: 69 6e 64 20 7c 20 4c 6f 67 42 69 6e 64 20 7c 0d ind | LogBind |.
c5a0: 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .
c5b0: 4c 6f 67 43 61 6c 6c 62 61 63 6b 45 78 63 65 70 LogCallbackExcep
c5c0: 74 69 6f 6e 20 7c 20 4c 6f 67 42 61 63 6b 75 70 tion | LogBackup
c5d0: 2c 0d 0a 23 65 6e 64 69 66 0d 0a 0d 0a 20 20 20 ,..#endif....
c5e0: 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e /// <summary>
c5f0: 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 54 68 65 20 .. /// The
c600: 64 65 66 61 75 6c 74 20 65 78 74 72 61 20 66 6c default extra fl
c610: 61 67 73 20 66 6f 72 20 6e 65 77 20 63 6f 6e 6e ags for new conn
c620: 65 63 74 69 6f 6e 73 2e 0d 0a 20 20 20 20 20 20 ections...
c630: 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a /// </summary>..
c640: 23 69 66 20 49 4e 54 45 52 4f 50 5f 56 49 52 54 #if INTEROP_VIRT
c650: 55 41 4c 5f 54 41 42 4c 45 0d 0a 20 20 20 20 20 UAL_TABLE..
c660: 20 44 65 66 61 75 6c 74 20 3d 20 4c 6f 67 43 61 Default = LogCa
c670: 6c 6c 62 61 63 6b 45 78 63 65 70 74 69 6f 6e 20 llbackException
c680: 7c 20 4c 6f 67 4d 6f 64 75 6c 65 45 78 63 65 70 | LogModuleExcep
c690: 74 69 6f 6e 2c 0d 0a 23 65 6c 73 65 0d 0a 20 20 tion,..#else..
c6a0: 20 20 20 20 44 65 66 61 75 6c 74 20 3d 20 4c 6f Default = Lo
c6b0: 67 43 61 6c 6c 62 61 63 6b 45 78 63 65 70 74 69 gCallbackExcepti
c6c0: 6f 6e 2c 0d 0a 23 65 6e 64 69 66 0d 0a 0d 0a 20 on,..#endif....
c6d0: 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 /// <summar
c6e0: 79 3e 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 54 68 y>.. /// Th
c6f0: 65 20 64 65 66 61 75 6c 74 20 65 78 74 72 61 20 e default extra
c700: 66 6c 61 67 73 20 66 6f 72 20 6e 65 77 20 63 6f flags for new co
c710: 6e 6e 65 63 74 69 6f 6e 73 20 77 69 74 68 20 61 nnections with a
c720: 6c 6c 20 6c 6f 67 67 69 6e 67 20 65 6e 61 62 6c ll logging enabl
c730: 65 64 2e 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c ed... /// <
c740: 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 /summary>..
c750: 20 44 65 66 61 75 6c 74 41 6e 64 4c 6f 67 41 6c DefaultAndLogAl
c760: 6c 20 3d 20 44 65 66 61 75 6c 74 20 7c 20 4c 6f l = Default | Lo
c770: 67 41 6c 6c 0d 0a 20 20 7d 0d 0a 0d 0a 20 20 2f gAll.. }.... /
c780: 2f 20 54 68 65 73 65 20 61 72 65 20 74 68 65 20 / These are the
c790: 6f 70 74 69 6f 6e 73 20 74 6f 20 74 68 65 20 69 options to the i
c7a0: 6e 74 65 72 6e 61 6c 20 73 71 6c 69 74 65 33 5f nternal sqlite3_
c7b0: 63 6f 6e 66 69 67 20 63 61 6c 6c 2e 0d 0a 20 20 config call...
c7c0: 69 6e 74 65 72 6e 61 6c 20 65 6e 75 6d 20 53 51 internal enum SQ
c7d0: 4c 69 74 65 43 6f 6e 66 69 67 4f 70 73 45 6e 75 LiteConfigOpsEnu
c7e0: 6d 0d 0a 20 20 7b 0d 0a 20 20 20 20 53 51 4c 49 m.. {.. SQLI
c7f0: 54 45 5f 43 4f 4e 46 49 47 5f 4e 4f 4e 45 20 3d TE_CONFIG_NONE =
c800: 20 30 2c 20 2f 2f 20 6e 69 6c 0d 0a 20 20 20 20 0, // nil..
c810: 53 51 4c 49 54 45 5f 43 4f 4e 46 49 47 5f 53 49 SQLITE_CONFIG_SI
c820: 4e 47 4c 45 54 48 52 45 41 44 20 3d 20 31 2c 20 NGLETHREAD = 1,
c830: 2f 2f 20 6e 69 6c 0d 0a 20 20 20 20 53 51 4c 49 // nil.. SQLI
c840: 54 45 5f 43 4f 4e 46 49 47 5f 4d 55 4c 54 49 54 TE_CONFIG_MULTIT
c850: 48 52 45 41 44 20 3d 20 32 2c 20 2f 2f 20 6e 69 HREAD = 2, // ni
c860: 6c 0d 0a 20 20 20 20 53 51 4c 49 54 45 5f 43 4f l.. SQLITE_CO
c870: 4e 46 49 47 5f 53 45 52 49 41 4c 49 5a 45 44 20 NFIG_SERIALIZED
c880: 3d 20 33 2c 20 2f 2f 20 6e 69 6c 0d 0a 20 20 20 = 3, // nil..
c890: 20 53 51 4c 49 54 45 5f 43 4f 4e 46 49 47 5f 4d SQLITE_CONFIG_M
c8a0: 41 4c 4c 4f 43 20 3d 20 34 2c 20 2f 2f 20 73 71 ALLOC = 4, // sq
c8b0: 6c 69 74 65 33 5f 6d 65 6d 5f 6d 65 74 68 6f 64 lite3_mem_method
c8c0: 73 2a 0d 0a 20 20 20 20 53 51 4c 49 54 45 5f 43 s*.. SQLITE_C
c8d0: 4f 4e 46 49 47 5f 47 45 54 4d 41 4c 4c 4f 43 20 ONFIG_GETMALLOC
c8e0: 3d 20 35 2c 20 2f 2f 20 73 71 6c 69 74 65 33 5f = 5, // sqlite3_
c8f0: 6d 65 6d 5f 6d 65 74 68 6f 64 73 2a 0d 0a 20 20 mem_methods*..
c900: 20 20 53 51 4c 49 54 45 5f 43 4f 4e 46 49 47 5f SQLITE_CONFIG_
c910: 53 43 52 41 54 43 48 20 3d 20 36 2c 20 2f 2f 20 SCRATCH = 6, //
c920: 76 6f 69 64 2a 2c 20 69 6e 74 20 73 7a 2c 20 69 void*, int sz, i
c930: 6e 74 20 4e 0d 0a 20 20 20 20 53 51 4c 49 54 45 nt N.. SQLITE
c940: 5f 43 4f 4e 46 49 47 5f 50 41 47 45 43 41 43 48 _CONFIG_PAGECACH
c950: 45 20 3d 20 37 2c 20 2f 2f 20 76 6f 69 64 2a 2c E = 7, // void*,
c960: 20 69 6e 74 20 73 7a 2c 20 69 6e 74 20 4e 0d 0a int sz, int N..
c970: 20 20 20 20 53 51 4c 49 54 45 5f 43 4f 4e 46 49 SQLITE_CONFI
c980: 47 5f 48 45 41 50 20 3d 20 38 2c 20 2f 2f 20 76 G_HEAP = 8, // v
c990: 6f 69 64 2a 2c 20 69 6e 74 20 6e 42 79 74 65 2c oid*, int nByte,
c9a0: 20 69 6e 74 20 6d 69 6e 0d 0a 20 20 20 20 53 51 int min.. SQ
c9b0: 4c 49 54 45 5f 43 4f 4e 46 49 47 5f 4d 45 4d 53 LITE_CONFIG_MEMS
c9c0: 54 41 54 55 53 20 3d 20 39 2c 20 2f 2f 20 62 6f TATUS = 9, // bo
c9d0: 6f 6c 65 61 6e 0d 0a 20 20 20 20 53 51 4c 49 54 olean.. SQLIT
c9e0: 45 5f 43 4f 4e 46 49 47 5f 4d 55 54 45 58 20 3d E_CONFIG_MUTEX =
c9f0: 20 31 30 2c 20 2f 2f 20 73 71 6c 69 74 65 33 5f 10, // sqlite3_
ca00: 6d 75 74 65 78 5f 6d 65 74 68 6f 64 73 2a 0d 0a mutex_methods*..
ca10: 20 20 20 20 53 51 4c 49 54 45 5f 43 4f 4e 46 49 SQLITE_CONFI
ca20: 47 5f 47 45 54 4d 55 54 45 58 20 3d 20 31 31 2c G_GETMUTEX = 11,
ca30: 20 2f 2f 20 73 71 6c 69 74 65 33 5f 6d 75 74 65 // sqlite3_mute
ca40: 78 5f 6d 65 74 68 6f 64 73 2a 0d 0a 20 20 20 20 x_methods*..
ca50: 2f 2f 20 70 72 65 76 69 6f 75 73 6c 79 20 53 51 // previously SQ
ca60: 4c 49 54 45 5f 43 4f 4e 46 49 47 5f 43 48 55 4e LITE_CONFIG_CHUN
ca70: 4b 41 4c 4c 4f 43 20 31 32 20 77 68 69 63 68 20 KALLOC 12 which
ca80: 69 73 20 6e 6f 77 20 75 6e 75 73 65 64 0d 0a 20 is now unused..
ca90: 20 20 20 53 51 4c 49 54 45 5f 43 4f 4e 46 49 47 SQLITE_CONFIG
caa0: 5f 4c 4f 4f 4b 41 53 49 44 45 20 3d 20 31 33 2c _LOOKASIDE = 13,
cab0: 20 2f 2f 20 69 6e 74 20 69 6e 74 0d 0a 20 20 20 // int int..
cac0: 20 53 51 4c 49 54 45 5f 43 4f 4e 46 49 47 5f 50 SQLITE_CONFIG_P
cad0: 43 41 43 48 45 20 3d 20 31 34 2c 20 2f 2f 20 73 CACHE = 14, // s
cae0: 71 6c 69 74 65 33 5f 70 63 61 63 68 65 5f 6d 65 qlite3_pcache_me
caf0: 74 68 6f 64 73 2a 0d 0a 20 20 20 20 53 51 4c 49 thods*.. SQLI
cb00: 54 45 5f 43 4f 4e 46 49 47 5f 47 45 54 50 43 41 TE_CONFIG_GETPCA
cb10: 43 48 45 20 3d 20 31 35 2c 20 2f 2f 20 73 71 6c CHE = 15, // sql
cb20: 69 74 65 33 5f 70 63 61 63 68 65 5f 6d 65 74 68 ite3_pcache_meth
cb30: 6f 64 73 2a 0d 0a 20 20 20 20 53 51 4c 49 54 45 ods*.. SQLITE
cb40: 5f 43 4f 4e 46 49 47 5f 4c 4f 47 20 3d 20 31 36 _CONFIG_LOG = 16
cb50: 2c 20 2f 2f 20 78 46 75 6e 63 2c 20 76 6f 69 64 , // xFunc, void
cb60: 2a 0d 0a 20 20 20 20 53 51 4c 49 54 45 5f 43 4f *.. SQLITE_CO
cb70: 4e 46 49 47 5f 55 52 49 20 3d 20 31 37 2c 20 2f NFIG_URI = 17, /
cb80: 2f 20 69 6e 74 0d 0a 20 20 20 20 53 51 4c 49 54 / int.. SQLIT
cb90: 45 5f 43 4f 4e 46 49 47 5f 50 43 41 43 48 45 32 E_CONFIG_PCACHE2
cba0: 20 3d 20 31 38 2c 20 2f 2f 20 73 71 6c 69 74 65 = 18, // sqlite
cbb0: 33 5f 70 63 61 63 68 65 5f 6d 65 74 68 6f 64 73 3_pcache_methods
cbc0: 32 2a 0d 0a 20 20 20 20 53 51 4c 49 54 45 5f 43 2*.. SQLITE_C
cbd0: 4f 4e 46 49 47 5f 47 45 54 50 43 41 43 48 45 32 ONFIG_GETPCACHE2
cbe0: 20 3d 20 31 39 2c 20 2f 2f 20 73 71 6c 69 74 65 = 19, // sqlite
cbf0: 33 5f 70 63 61 63 68 65 5f 6d 65 74 68 6f 64 73 3_pcache_methods
cc00: 32 2a 0d 0a 20 20 20 20 53 51 4c 49 54 45 5f 43 2*.. SQLITE_C
cc10: 4f 4e 46 49 47 5f 43 4f 56 45 52 49 4e 47 5f 49 ONFIG_COVERING_I
cc20: 4e 44 45 58 5f 53 43 41 4e 20 3d 20 32 30 2c 20 NDEX_SCAN = 20,
cc30: 2f 2f 20 69 6e 74 0d 0a 20 20 20 20 53 51 4c 49 // int.. SQLI
cc40: 54 45 5f 43 4f 4e 46 49 47 5f 53 51 4c 4c 4f 47 TE_CONFIG_SQLLOG
cc50: 20 3d 20 32 31 2c 20 2f 2f 20 78 53 71 6c 6c 6f = 21, // xSqllo
cc60: 67 2c 20 76 6f 69 64 2a 0d 0a 20 20 20 20 53 51 g, void*.. SQ
cc70: 4c 49 54 45 5f 43 4f 4e 46 49 47 5f 4d 4d 41 50 LITE_CONFIG_MMAP
cc80: 5f 53 49 5a 45 20 3d 20 32 32 2c 20 2f 2f 20 73 _SIZE = 22, // s
cc90: 71 6c 69 74 65 33 5f 69 6e 74 36 34 2c 20 73 71 qlite3_int64, sq
cca0: 6c 69 74 65 33 5f 69 6e 74 36 34 0d 0a 20 20 20 lite3_int64..
ccb0: 20 53 51 4c 49 54 45 5f 43 4f 4e 46 49 47 5f 57 SQLITE_CONFIG_W
ccc0: 49 4e 33 32 5f 48 45 41 50 53 49 5a 45 20 3d 20 IN32_HEAPSIZE =
ccd0: 32 33 2c 20 2f 2f 20 69 6e 74 20 6e 42 79 74 65 23, // int nByte
cce0: 0d 0a 20 20 20 20 53 51 4c 49 54 45 5f 43 4f 4e .. SQLITE_CON
ccf0: 46 49 47 5f 50 43 41 43 48 45 5f 48 44 52 53 5a FIG_PCACHE_HDRSZ
cd00: 20 3d 20 32 34 2c 20 2f 2f 20 69 6e 74 20 2a 70 = 24, // int *p
cd10: 73 7a 0d 0a 20 20 20 20 53 51 4c 49 54 45 5f 43 sz.. SQLITE_C
cd20: 4f 4e 46 49 47 5f 50 4d 41 53 5a 20 3d 20 32 35 ONFIG_PMASZ = 25
cd30: 20 2f 2f 20 75 6e 73 69 67 6e 65 64 20 69 6e 74 // unsigned int
cd40: 20 73 7a 50 6d 61 0d 0a 20 20 7d 0d 0a 7d 0d 0a szPma.. }..}..