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 6e 6f 6e 2d 7a 65 72 6f 20 69 66 20 74 ns non-zero if t
0670: 68 69 73 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 74 his connection t
0680: 6f 20 74 68 65 20 64 61 74 61 62 61 73 65 20 69 o the database i
0690: 73 20 72 65 61 64 2d 6f 6e 6c 79 2e 0d 0a 20 20 s read-only...
06a0: 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e /// </summary>
06b0: 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 .. internal a
06c0: 62 73 74 72 61 63 74 20 62 6f 6f 6c 20 49 73 52 bstract bool IsR
06d0: 65 61 64 4f 6e 6c 79 28 73 74 72 69 6e 67 20 6e eadOnly(string n
06e0: 61 6d 65 29 3b 0d 0a 20 20 20 20 2f 2f 2f 20 3c ame);.. /// <
06f0: 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f summary>.. //
0700: 2f 20 52 65 74 75 72 6e 73 20 74 68 65 20 72 6f / Returns the ro
0710: 77 69 64 20 6f 66 20 74 68 65 20 6d 6f 73 74 20 wid of the most
0720: 72 65 63 65 6e 74 20 73 75 63 63 65 73 73 66 75 recent successfu
0730: 6c 20 49 4e 53 45 52 54 20 69 6e 74 6f 20 74 68 l INSERT into th
0740: 65 20 64 61 74 61 62 61 73 65 20 66 72 6f 6d 20 e database from
0750: 74 68 69 73 20 63 6f 6e 6e 65 63 74 69 6f 6e 2e this connection.
0760: 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d .. /// </summ
0770: 61 72 79 3e 0d 0a 20 20 20 20 69 6e 74 65 72 6e ary>.. intern
0780: 61 6c 20 61 62 73 74 72 61 63 74 20 6c 6f 6e 67 al abstract long
0790: 20 4c 61 73 74 49 6e 73 65 72 74 52 6f 77 49 64 LastInsertRowId
07a0: 20 7b 20 67 65 74 3b 20 7d 0d 0a 20 20 20 20 2f { get; }.. /
07b0: 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 // <summary>..
07c0: 20 20 2f 2f 2f 20 52 65 74 75 72 6e 73 20 74 68 /// Returns th
07d0: 65 20 6e 75 6d 62 65 72 20 6f 66 20 63 68 61 6e e number of chan
07e0: 67 65 73 20 74 68 65 20 6c 61 73 74 20 65 78 65 ges the last exe
07f0: 63 75 74 69 6e 67 20 69 6e 73 65 72 74 2f 75 70 cuting insert/up
0800: 64 61 74 65 20 63 61 75 73 65 64 2e 0d 0a 20 20 date caused...
0810: 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e /// </summary>
0820: 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 .. internal a
0830: 62 73 74 72 61 63 74 20 69 6e 74 20 43 68 61 6e bstract int Chan
0840: 67 65 73 20 7b 20 67 65 74 3b 20 7d 0d 0a 20 20 ges { get; }..
0850: 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d /// <summary>.
0860: 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 6e 73 . /// Returns
0870: 20 74 68 65 20 61 6d 6f 75 6e 74 20 6f 66 20 6d the amount of m
0880: 65 6d 6f 72 79 20 28 69 6e 20 62 79 74 65 73 29 emory (in bytes)
0890: 20 63 75 72 72 65 6e 74 6c 79 20 69 6e 20 75 73 currently in us
08a0: 65 20 62 79 20 74 68 65 20 53 51 4c 69 74 65 20 e by the SQLite
08b0: 63 6f 72 65 20 6c 69 62 72 61 72 79 2e 20 20 54 core library. T
08c0: 68 69 73 20 69 73 20 6e 6f 74 20 72 65 61 6c 6c his is not reall
08d0: 79 20 61 20 70 65 72 2d 63 6f 6e 6e 65 63 74 69 y a per-connecti
08e0: 6f 6e 0d 0a 20 20 20 20 2f 2f 2f 20 76 61 6c 75 on.. /// valu
08f0: 65 2c 20 69 74 20 69 73 20 67 6c 6f 62 61 6c 20 e, it is global
0900: 74 6f 20 74 68 65 20 70 72 6f 63 65 73 73 2e 0d to the process..
0910: 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 . /// </summa
0920: 72 79 3e 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 ry>.. interna
0930: 6c 20 61 62 73 74 72 61 63 74 20 6c 6f 6e 67 20 l abstract long
0940: 4d 65 6d 6f 72 79 55 73 65 64 20 7b 20 67 65 74 MemoryUsed { get
0950: 3b 20 7d 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 ; }.. /// <su
0960: 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 mmary>.. ///
0970: 52 65 74 75 72 6e 73 20 74 68 65 20 6d 61 78 69 Returns the maxi
0980: 6d 75 6d 20 61 6d 6f 75 6e 74 20 6f 66 20 6d 65 mum amount of me
0990: 6d 6f 72 79 20 28 69 6e 20 62 79 74 65 73 29 20 mory (in bytes)
09a0: 75 73 65 64 20 62 79 20 74 68 65 20 53 51 4c 69 used by the SQLi
09b0: 74 65 20 63 6f 72 65 20 6c 69 62 72 61 72 79 20 te core library
09c0: 73 69 6e 63 65 20 74 68 65 20 68 69 67 68 2d 77 since the high-w
09d0: 61 74 65 72 20 6d 61 72 6b 20 77 61 73 20 6c 61 ater mark was la
09e0: 73 74 20 72 65 73 65 74 2e 0d 0a 20 20 20 20 2f st reset... /
09f0: 2f 2f 20 54 68 69 73 20 69 73 20 6e 6f 74 20 72 // This is not r
0a00: 65 61 6c 6c 79 20 61 20 70 65 72 2d 63 6f 6e 6e eally a per-conn
0a10: 65 63 74 69 6f 6e 20 76 61 6c 75 65 2c 20 69 74 ection value, it
0a20: 20 69 73 20 67 6c 6f 62 61 6c 20 74 6f 20 74 68 is global to th
0a30: 65 20 70 72 6f 63 65 73 73 2e 0d 0a 20 20 20 20 e process...
0a40: 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a /// </summary>..
0a50: 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 73 internal abs
0a60: 74 72 61 63 74 20 6c 6f 6e 67 20 4d 65 6d 6f 72 tract long Memor
0a70: 79 48 69 67 68 77 61 74 65 72 20 7b 20 67 65 74 yHighwater { get
0a80: 3b 20 7d 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 ; }.. /// <su
0a90: 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 mmary>.. ///
0aa0: 52 65 74 75 72 6e 73 20 6e 6f 6e 2d 7a 65 72 6f Returns non-zero
0ab0: 20 69 66 20 74 68 65 20 75 6e 64 65 72 6c 79 69 if the underlyi
0ac0: 6e 67 20 6e 61 74 69 76 65 20 63 6f 6e 6e 65 63 ng native connec
0ad0: 74 69 6f 6e 20 68 61 6e 64 6c 65 20 69 73 20 6f tion handle is o
0ae0: 77 6e 65 64 20 62 79 20 74 68 69 73 20 69 6e 73 wned by this ins
0af0: 74 61 6e 63 65 2e 0d 0a 20 20 20 20 2f 2f 2f 20 tance... ///
0b00: 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 </summary>..
0b10: 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 61 63 internal abstrac
0b20: 74 20 62 6f 6f 6c 20 4f 77 6e 48 61 6e 64 6c 65 t bool OwnHandle
0b30: 20 7b 20 67 65 74 3b 20 7d 0d 0a 20 20 20 20 2f { get; }.. /
0b40: 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 // <summary>..
0b50: 20 20 2f 2f 2f 20 52 65 74 75 72 6e 73 20 74 68 /// Returns th
0b60: 65 20 6c 6f 67 69 63 61 6c 20 6c 69 73 74 20 6f e logical list o
0b70: 66 20 66 75 6e 63 74 69 6f 6e 73 20 61 73 73 6f f functions asso
0b80: 63 69 61 74 65 64 20 77 69 74 68 20 74 68 69 73 ciated with this
0b90: 20 63 6f 6e 6e 65 63 74 69 6f 6e 2e 0d 0a 20 20 connection...
0ba0: 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e /// </summary>
0bb0: 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 .. internal a
0bc0: 62 73 74 72 61 63 74 20 49 44 69 63 74 69 6f 6e bstract IDiction
0bd0: 61 72 79 3c 53 51 4c 69 74 65 46 75 6e 63 74 69 ary<SQLiteFuncti
0be0: 6f 6e 41 74 74 72 69 62 75 74 65 2c 20 53 51 4c onAttribute, SQL
0bf0: 69 74 65 46 75 6e 63 74 69 6f 6e 3e 20 46 75 6e iteFunction> Fun
0c00: 63 74 69 6f 6e 73 20 7b 20 67 65 74 3b 20 7d 0d ctions { get; }.
0c10: 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 . /// <summar
0c20: 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 53 65 74 73 y>.. /// Sets
0c30: 20 74 68 65 20 73 74 61 74 75 73 20 6f 66 20 74 the status of t
0c40: 68 65 20 6d 65 6d 6f 72 79 20 75 73 61 67 65 20 he memory usage
0c50: 74 72 61 63 6b 69 6e 67 20 73 75 62 73 79 73 74 tracking subsyst
0c60: 65 6d 20 69 6e 20 74 68 65 20 53 51 4c 69 74 65 em in the SQLite
0c70: 20 63 6f 72 65 20 6c 69 62 72 61 72 79 2e 20 20 core library.
0c80: 42 79 20 64 65 66 61 75 6c 74 2c 20 74 68 69 73 By default, this
0c90: 20 69 73 20 65 6e 61 62 6c 65 64 2e 0d 0a 20 20 is enabled...
0ca0: 20 20 2f 2f 2f 20 49 66 20 74 68 69 73 20 69 73 /// If this is
0cb0: 20 64 69 73 61 62 6c 65 64 2c 20 6d 65 6d 6f 72 disabled, memor
0cc0: 79 20 75 73 61 67 65 20 74 72 61 63 6b 69 6e 67 y usage tracking
0cd0: 20 77 69 6c 6c 20 6e 6f 74 20 62 65 20 70 65 72 will not be per
0ce0: 66 6f 72 6d 65 64 2e 20 20 54 68 69 73 20 69 73 formed. This is
0cf0: 20 6e 6f 74 20 72 65 61 6c 6c 79 20 61 20 70 65 not really a pe
0d00: 72 2d 63 6f 6e 6e 65 63 74 69 6f 6e 20 76 61 6c r-connection val
0d10: 75 65 2c 20 69 74 20 69 73 0d 0a 20 20 20 20 2f ue, it is.. /
0d20: 2f 2f 20 67 6c 6f 62 61 6c 20 74 6f 20 74 68 65 // global to the
0d30: 20 70 72 6f 63 65 73 73 2e 0d 0a 20 20 20 20 2f process... /
0d40: 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 // </summary>..
0d50: 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 /// <param na
0d60: 6d 65 3d 22 76 61 6c 75 65 22 3e 4e 6f 6e 2d 7a me="value">Non-z
0d70: 65 72 6f 20 74 6f 20 65 6e 61 62 6c 65 20 6d 65 ero to enable me
0d80: 6d 6f 72 79 20 75 73 61 67 65 20 74 72 61 63 6b mory usage track
0d90: 69 6e 67 2c 20 7a 65 72 6f 20 6f 74 68 65 72 77 ing, zero otherw
0da0: 69 73 65 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 ise.</param>..
0db0: 20 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 3e 41 /// <returns>A
0dc0: 20 73 74 61 6e 64 61 72 64 20 53 51 4c 69 74 65 standard SQLite
0dd0: 20 72 65 74 75 72 6e 20 63 6f 64 65 20 28 69 2e return code (i.
0de0: 65 2e 20 7a 65 72 6f 20 66 6f 72 20 73 75 63 63 e. zero for succ
0df0: 65 73 73 20 61 6e 64 20 6e 6f 6e 2d 7a 65 72 6f ess and non-zero
0e00: 20 66 6f 72 20 66 61 69 6c 75 72 65 29 2e 3c 2f for failure).</
0e10: 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 69 6e returns>.. in
0e20: 74 65 72 6e 61 6c 20 61 62 73 74 72 61 63 74 20 ternal abstract
0e30: 53 51 4c 69 74 65 45 72 72 6f 72 43 6f 64 65 20 SQLiteErrorCode
0e40: 53 65 74 4d 65 6d 6f 72 79 53 74 61 74 75 73 28 SetMemoryStatus(
0e50: 62 6f 6f 6c 20 76 61 6c 75 65 29 3b 0d 0a 20 20 bool value);..
0e60: 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d /// <summary>.
0e70: 0a 20 20 20 20 2f 2f 2f 20 41 74 74 65 6d 70 74 . /// Attempt
0e80: 73 20 74 6f 20 66 72 65 65 20 61 73 20 6d 75 63 s to free as muc
0e90: 68 20 68 65 61 70 20 6d 65 6d 6f 72 79 20 61 73 h heap memory as
0ea0: 20 70 6f 73 73 69 62 6c 65 20 66 6f 72 20 74 68 possible for th
0eb0: 65 20 64 61 74 61 62 61 73 65 20 63 6f 6e 6e 65 e database conne
0ec0: 63 74 69 6f 6e 2e 0d 0a 20 20 20 20 2f 2f 2f 20 ction... ///
0ed0: 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 </summary>..
0ee0: 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 3e 41 20 73 /// <returns>A s
0ef0: 74 61 6e 64 61 72 64 20 53 51 4c 69 74 65 20 72 tandard SQLite r
0f00: 65 74 75 72 6e 20 63 6f 64 65 20 28 69 2e 65 2e eturn code (i.e.
0f10: 20 7a 65 72 6f 20 66 6f 72 20 73 75 63 63 65 73 zero for succes
0f20: 73 20 61 6e 64 20 6e 6f 6e 2d 7a 65 72 6f 20 66 s and non-zero f
0f30: 6f 72 20 66 61 69 6c 75 72 65 29 2e 3c 2f 72 65 or failure).</re
0f40: 74 75 72 6e 73 3e 0d 0a 20 20 20 20 69 6e 74 65 turns>.. inte
0f50: 72 6e 61 6c 20 61 62 73 74 72 61 63 74 20 53 51 rnal abstract SQ
0f60: 4c 69 74 65 45 72 72 6f 72 43 6f 64 65 20 52 65 LiteErrorCode Re
0f70: 6c 65 61 73 65 4d 65 6d 6f 72 79 28 29 3b 0d 0a leaseMemory();..
0f80: 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 /// <summary
0f90: 3e 0d 0a 20 20 20 20 2f 2f 2f 20 53 68 75 74 64 >.. /// Shutd
0fa0: 6f 77 6e 20 74 68 65 20 53 51 4c 69 74 65 20 65 own the SQLite e
0fb0: 6e 67 69 6e 65 20 73 6f 20 74 68 61 74 20 69 74 ngine so that it
0fc0: 20 63 61 6e 20 62 65 20 72 65 73 74 61 72 74 65 can be restarte
0fd0: 64 20 77 69 74 68 20 64 69 66 66 65 72 65 6e 74 d with different
0fe0: 20 63 6f 6e 66 69 67 20 6f 70 74 69 6f 6e 73 2e config options.
0ff0: 0d 0a 20 20 20 20 2f 2f 2f 20 57 65 20 64 65 70 .. /// We dep
1000: 65 6e 64 20 6f 6e 20 61 75 74 6f 20 69 6e 69 74 end on auto init
1010: 69 61 6c 69 7a 61 74 69 6f 6e 20 74 6f 20 72 65 ialization to re
1020: 63 6f 76 65 72 2e 0d 0a 20 20 20 20 2f 2f 2f 20 cover... ///
1030: 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 </summary>..
1040: 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 61 63 internal abstrac
1050: 74 20 53 51 4c 69 74 65 45 72 72 6f 72 43 6f 64 t SQLiteErrorCod
1060: 65 20 53 68 75 74 64 6f 77 6e 28 29 3b 0d 0a 20 e Shutdown();..
1070: 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e /// <summary>
1080: 0d 0a 20 20 20 20 2f 2f 2f 20 44 65 74 65 72 6d .. /// Determ
1090: 69 6e 65 73 20 69 66 20 74 68 65 20 61 73 73 6f ines if the asso
10a0: 63 69 61 74 65 64 20 6e 61 74 69 76 65 20 63 6f ciated native co
10b0: 6e 6e 65 63 74 69 6f 6e 20 68 61 6e 64 6c 65 20 nnection handle
10c0: 69 73 20 6f 70 65 6e 2e 0d 0a 20 20 20 20 2f 2f is open... //
10d0: 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 / </summary>..
10e0: 20 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 3e 0d /// <returns>.
10f0: 0a 20 20 20 20 2f 2f 2f 20 4e 6f 6e 2d 7a 65 72 . /// Non-zer
1100: 6f 20 69 66 20 61 20 64 61 74 61 62 61 73 65 20 o if a database
1110: 63 6f 6e 6e 65 63 74 69 6f 6e 20 69 73 20 6f 70 connection is op
1120: 65 6e 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 72 en... /// </r
1130: 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 69 6e 74 eturns>.. int
1140: 65 72 6e 61 6c 20 61 62 73 74 72 61 63 74 20 62 ernal abstract b
1150: 6f 6f 6c 20 49 73 4f 70 65 6e 28 29 3b 0d 0a 20 ool IsOpen();..
1160: 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e /// <summary>
1170: 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 6e .. /// Return
1180: 73 20 74 68 65 20 66 75 6c 6c 79 20 71 75 61 6c s the fully qual
1190: 69 66 69 65 64 20 70 61 74 68 20 61 6e 64 20 66 ified path and f
11a0: 69 6c 65 20 6e 61 6d 65 20 66 6f 72 20 74 68 65 ile name for the
11b0: 20 63 75 72 72 65 6e 74 6c 79 20 6f 70 65 6e 0d currently open.
11c0: 0a 20 20 20 20 2f 2f 2f 20 64 61 74 61 62 61 73 . /// databas
11d0: 65 2c 20 69 66 20 61 6e 79 2e 0d 0a 20 20 20 20 e, if any...
11e0: 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a /// </summary>..
11f0: 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e /// <param n
1200: 61 6d 65 3d 22 64 62 4e 61 6d 65 22 3e 0d 0a 20 ame="dbName">..
1210: 20 20 20 2f 2f 2f 20 54 68 65 20 6e 61 6d 65 20 /// The name
1220: 6f 66 20 74 68 65 20 61 74 74 61 63 68 65 64 20 of the attached
1230: 64 61 74 61 62 61 73 65 20 74 6f 20 71 75 65 72 database to quer
1240: 79 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 70 61 y... /// </pa
1250: 72 61 6d 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 72 ram>.. /// <r
1260: 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 2f 2f 2f eturns>.. ///
1270: 20 54 68 65 20 66 75 6c 6c 79 20 71 75 61 6c 69 The fully quali
1280: 66 69 65 64 20 70 61 74 68 20 61 6e 64 20 66 69 fied path and fi
1290: 6c 65 20 6e 61 6d 65 20 66 6f 72 20 74 68 65 20 le name for the
12a0: 63 75 72 72 65 6e 74 6c 79 20 6f 70 65 6e 20 64 currently open d
12b0: 61 74 61 62 61 73 65 2c 0d 0a 20 20 20 20 2f 2f atabase,.. //
12c0: 2f 20 69 66 20 61 6e 79 2e 0d 0a 20 20 20 20 2f / if any... /
12d0: 2f 2f 20 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 // </returns>..
12e0: 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 internal abst
12f0: 72 61 63 74 20 73 74 72 69 6e 67 20 47 65 74 46 ract string GetF
1300: 69 6c 65 4e 61 6d 65 28 73 74 72 69 6e 67 20 64 ileName(string d
1310: 62 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 2f 2f 2f bName);.. ///
1320: 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 <summary>..
1330: 2f 2f 2f 20 4f 70 65 6e 73 20 61 20 64 61 74 61 /// Opens a data
1340: 62 61 73 65 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c base... /// <
1350: 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f /summary>.. /
1360: 2f 2f 20 3c 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 // <remarks>..
1370: 20 20 2f 2f 2f 20 49 6d 70 6c 65 6d 65 6e 74 65 /// Implemente
1380: 72 73 20 73 68 6f 75 6c 64 20 63 61 6c 6c 20 53 rs should call S
1390: 51 4c 69 74 65 46 75 6e 63 74 69 6f 6e 2e 42 69 QLiteFunction.Bi
13a0: 6e 64 46 75 6e 63 74 69 6f 6e 73 28 29 20 61 6e ndFunctions() an
13b0: 64 20 73 61 76 65 20 74 68 65 20 61 72 72 61 79 d save the array
13c0: 20 61 66 74 65 72 20 6f 70 65 6e 69 6e 67 20 61 after opening a
13d0: 20 63 6f 6e 6e 65 63 74 69 6f 6e 0d 0a 20 20 20 connection..
13e0: 20 2f 2f 2f 20 74 6f 20 62 69 6e 64 20 61 6c 6c /// to bind all
13f0: 20 61 74 74 72 69 62 75 74 65 64 20 75 73 65 72 attributed user
1400: 2d 64 65 66 69 6e 65 64 20 66 75 6e 63 74 69 6f -defined functio
1410: 6e 73 20 61 6e 64 20 63 6f 6c 6c 61 74 69 6e 67 ns and collating
1420: 20 73 65 71 75 65 6e 63 65 73 20 74 6f 20 74 68 sequences to th
1430: 65 20 6e 65 77 20 63 6f 6e 6e 65 63 74 69 6f 6e e new connection
1440: 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d ... /// </rem
1450: 61 72 6b 73 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c arks>.. /// <
1460: 70 61 72 61 6d 20 6e 61 6d 65 3d 22 73 74 72 46 param name="strF
1470: 69 6c 65 6e 61 6d 65 22 3e 54 68 65 20 66 69 6c ilename">The fil
1480: 65 6e 61 6d 65 20 6f 66 20 74 68 65 20 64 61 74 ename of the dat
1490: 61 62 61 73 65 20 74 6f 20 6f 70 65 6e 2e 20 20 abase to open.
14a0: 53 51 4c 69 74 65 20 61 75 74 6f 6d 61 74 69 63 SQLite automatic
14b0: 61 6c 6c 79 20 63 72 65 61 74 65 73 20 69 74 20 ally creates it
14c0: 69 66 20 69 74 20 64 6f 65 73 6e 27 74 20 65 78 if it doesn't ex
14d0: 69 73 74 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 ist.</param>..
14e0: 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d /// <param nam
14f0: 65 3d 22 76 66 73 4e 61 6d 65 22 3e 54 68 65 20 e="vfsName">The
1500: 6e 61 6d 65 20 6f 66 20 74 68 65 20 56 46 53 20 name of the VFS
1510: 74 6f 20 75 73 65 20 2d 4f 52 2d 20 6e 75 6c 6c to use -OR- null
1520: 20 74 6f 20 75 73 65 20 74 68 65 20 64 65 66 61 to use the defa
1530: 75 6c 74 20 56 46 53 2e 3c 2f 70 61 72 61 6d 3e ult VFS.</param>
1540: 0d 0a 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d .. /// <param
1550: 20 6e 61 6d 65 3d 22 63 6f 6e 6e 65 63 74 69 6f name="connectio
1560: 6e 46 6c 61 67 73 22 3e 54 68 65 20 66 6c 61 67 nFlags">The flag
1570: 73 20 61 73 73 6f 63 69 61 74 65 64 20 77 69 74 s associated wit
1580: 68 20 74 68 65 20 70 61 72 65 6e 74 20 63 6f 6e h the parent con
1590: 6e 65 63 74 69 6f 6e 20 6f 62 6a 65 63 74 3c 2f nection object</
15a0: 70 61 72 61 6d 3e 0d 0a 20 20 20 20 2f 2f 2f 20 param>.. ///
15b0: 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 6f 70 65 <param name="ope
15c0: 6e 46 6c 61 67 73 22 3e 54 68 65 20 6f 70 65 6e nFlags">The open
15d0: 20 66 6c 61 67 73 20 74 6f 20 75 73 65 20 77 68 flags to use wh
15e0: 65 6e 20 63 72 65 61 74 69 6e 67 20 74 68 65 20 en creating the
15f0: 63 6f 6e 6e 65 63 74 69 6f 6e 3c 2f 70 61 72 61 connection</para
1600: 6d 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 70 61 72 m>.. /// <par
1610: 61 6d 20 6e 61 6d 65 3d 22 6d 61 78 50 6f 6f 6c am name="maxPool
1620: 53 69 7a 65 22 3e 54 68 65 20 6d 61 78 69 6d 75 Size">The maximu
1630: 6d 20 73 69 7a 65 20 6f 66 20 74 68 65 20 70 6f m size of the po
1640: 6f 6c 20 66 6f 72 20 74 68 65 20 67 69 76 65 6e ol for the given
1650: 20 66 69 6c 65 6e 61 6d 65 3c 2f 70 61 72 61 6d filename</param
1660: 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 >.. /// <para
1670: 6d 20 6e 61 6d 65 3d 22 75 73 65 50 6f 6f 6c 22 m name="usePool"
1680: 3e 49 66 20 74 72 75 65 2c 20 74 68 65 20 63 6f >If true, the co
1690: 6e 6e 65 63 74 69 6f 6e 20 63 61 6e 20 62 65 20 nnection can be
16a0: 70 75 6c 6c 65 64 20 66 72 6f 6d 20 74 68 65 20 pulled from the
16b0: 63 6f 6e 6e 65 63 74 69 6f 6e 20 70 6f 6f 6c 3c connection pool<
16c0: 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 69 6e 74 /param>.. int
16d0: 65 72 6e 61 6c 20 61 62 73 74 72 61 63 74 20 76 ernal abstract v
16e0: 6f 69 64 20 4f 70 65 6e 28 73 74 72 69 6e 67 20 oid Open(string
16f0: 73 74 72 46 69 6c 65 6e 61 6d 65 2c 20 73 74 72 strFilename, str
1700: 69 6e 67 20 76 66 73 4e 61 6d 65 2c 20 53 51 4c ing vfsName, SQL
1710: 69 74 65 43 6f 6e 6e 65 63 74 69 6f 6e 46 6c 61 iteConnectionFla
1720: 67 73 20 63 6f 6e 6e 65 63 74 69 6f 6e 46 6c 61 gs connectionFla
1730: 67 73 2c 20 53 51 4c 69 74 65 4f 70 65 6e 46 6c gs, SQLiteOpenFl
1740: 61 67 73 45 6e 75 6d 20 6f 70 65 6e 46 6c 61 67 agsEnum openFlag
1750: 73 2c 20 69 6e 74 20 6d 61 78 50 6f 6f 6c 53 69 s, int maxPoolSi
1760: 7a 65 2c 20 62 6f 6f 6c 20 75 73 65 50 6f 6f 6c ze, bool usePool
1770: 29 3b 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d );.. /// <sum
1780: 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 43 mary>.. /// C
1790: 6c 6f 73 65 73 20 74 68 65 20 63 75 72 72 65 6e loses the curren
17a0: 74 6c 79 2d 6f 70 65 6e 20 64 61 74 61 62 61 73 tly-open databas
17b0: 65 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 e... /// </su
17c0: 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 mmary>.. ///
17d0: 3c 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 2f <remarks>.. /
17e0: 2f 2f 20 41 66 74 65 72 20 74 68 65 20 64 61 74 // After the dat
17f0: 61 62 61 73 65 20 68 61 73 20 62 65 65 6e 20 63 abase has been c
1800: 6c 6f 73 65 64 20 69 6d 70 6c 65 6d 65 74 65 72 losed implemeter
1810: 73 20 73 68 6f 75 6c 64 20 63 61 6c 6c 20 53 51 s should call SQ
1820: 4c 69 74 65 46 75 6e 63 74 69 6f 6e 2e 55 6e 62 LiteFunction.Unb
1830: 69 6e 64 46 75 6e 63 74 69 6f 6e 73 28 29 20 74 indFunctions() t
1840: 6f 20 64 65 61 6c 6c 6f 63 61 74 65 20 61 6c 6c o deallocate all
1850: 20 69 6e 74 65 72 6f 70 20 61 6c 6c 6f 63 61 74 interop allocat
1860: 65 64 0d 0a 20 20 20 20 2f 2f 2f 20 6d 65 6d 6f ed.. /// memo
1870: 72 79 20 61 73 73 6f 63 69 61 74 65 64 20 77 69 ry associated wi
1880: 74 68 20 74 68 65 20 75 73 65 72 2d 64 65 66 69 th the user-defi
1890: 6e 65 64 20 66 75 6e 63 74 69 6f 6e 73 20 61 6e ned functions an
18a0: 64 20 63 6f 6c 6c 61 74 69 6e 67 20 73 65 71 75 d collating sequ
18b0: 65 6e 63 65 73 20 74 69 65 64 20 74 6f 20 74 68 ences tied to th
18c0: 65 20 63 6c 6f 73 65 64 20 63 6f 6e 6e 65 63 74 e closed connect
18d0: 69 6f 6e 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f ion... /// </
18e0: 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 2f 2f remarks>.. //
18f0: 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 63 / <param name="c
1900: 61 6e 54 68 72 6f 77 22 3e 4e 6f 6e 2d 7a 65 72 anThrow">Non-zer
1910: 6f 20 69 66 20 74 68 65 20 6f 70 65 72 61 74 69 o if the operati
1920: 6f 6e 20 69 73 20 61 6c 6c 6f 77 65 64 20 74 6f on is allowed to
1930: 20 74 68 72 6f 77 20 65 78 63 65 70 74 69 6f 6e throw exception
1940: 73 2c 20 7a 65 72 6f 20 6f 74 68 65 72 77 69 73 s, zero otherwis
1950: 65 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 e.</param>..
1960: 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 61 63 internal abstrac
1970: 74 20 76 6f 69 64 20 43 6c 6f 73 65 28 62 6f 6f t void Close(boo
1980: 6c 20 63 61 6e 54 68 72 6f 77 29 3b 0d 0a 20 20 l canThrow);..
1990: 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d /// <summary>.
19a0: 0a 20 20 20 20 2f 2f 2f 20 53 65 74 73 20 74 68 . /// Sets th
19b0: 65 20 62 75 73 79 20 74 69 6d 65 6f 75 74 20 6f e busy timeout o
19c0: 6e 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e n the connection
19d0: 2e 20 20 53 51 4c 69 74 65 43 6f 6d 6d 61 6e 64 . SQLiteCommand
19e0: 20 77 69 6c 6c 20 63 61 6c 6c 20 74 68 69 73 20 will call this
19f0: 62 65 66 6f 72 65 20 65 78 65 63 75 74 69 6e 67 before executing
1a00: 20 61 6e 79 20 63 6f 6d 6d 61 6e 64 2e 0d 0a 20 any command...
1a10: 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 /// </summary
1a20: 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 >.. /// <para
1a30: 6d 20 6e 61 6d 65 3d 22 6e 54 69 6d 65 6f 75 74 m name="nTimeout
1a40: 4d 53 22 3e 54 68 65 20 6e 75 6d 62 65 72 20 6f MS">The number o
1a50: 66 20 6d 69 6c 6c 69 73 65 63 6f 6e 64 73 20 74 f milliseconds t
1a60: 6f 20 77 61 69 74 20 62 65 66 6f 72 65 20 72 65 o wait before re
1a70: 74 75 72 6e 69 6e 67 20 53 51 4c 49 54 45 5f 42 turning SQLITE_B
1a80: 55 53 59 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 USY</param>..
1a90: 20 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 61 internal abstra
1aa0: 63 74 20 76 6f 69 64 20 53 65 74 54 69 6d 65 6f ct void SetTimeo
1ab0: 75 74 28 69 6e 74 20 6e 54 69 6d 65 6f 75 74 4d ut(int nTimeoutM
1ac0: 53 29 3b 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 S);.. /// <su
1ad0: 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 mmary>.. ///
1ae0: 52 65 74 75 72 6e 73 20 74 68 65 20 74 65 78 74 Returns the text
1af0: 20 6f 66 20 74 68 65 20 6c 61 73 74 20 65 72 72 of the last err
1b00: 6f 72 20 69 73 73 75 65 64 20 62 79 20 53 51 4c or issued by SQL
1b10: 69 74 65 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 ite.. /// </s
1b20: 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f ummary>.. ///
1b30: 20 3c 72 65 74 75 72 6e 73 3e 3c 2f 72 65 74 75 <returns></retu
1b40: 72 6e 73 3e 0d 0a 20 20 20 20 69 6e 74 65 72 6e rns>.. intern
1b50: 61 6c 20 61 62 73 74 72 61 63 74 20 73 74 72 69 al abstract stri
1b60: 6e 67 20 47 65 74 4c 61 73 74 45 72 72 6f 72 28 ng GetLastError(
1b70: 29 3b 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 );.... /// <s
1b80: 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f ummary>.. ///
1b90: 20 52 65 74 75 72 6e 73 20 74 68 65 20 74 65 78 Returns the tex
1ba0: 74 20 6f 66 20 74 68 65 20 6c 61 73 74 20 65 72 t of the last er
1bb0: 72 6f 72 20 69 73 73 75 65 64 20 62 79 20 53 51 ror issued by SQ
1bc0: 4c 69 74 65 20 2d 4f 52 2d 20 74 68 65 20 73 70 Lite -OR- the sp
1bd0: 65 63 69 66 69 65 64 20 64 65 66 61 75 6c 74 20 ecified default
1be0: 65 72 72 6f 72 20 74 65 78 74 20 69 66 0d 0a 20 error text if..
1bf0: 20 20 20 2f 2f 2f 20 6e 6f 6e 65 20 69 73 20 61 /// none is a
1c00: 76 61 69 6c 61 62 6c 65 20 66 72 6f 6d 20 74 68 vailable from th
1c10: 65 20 53 51 4c 69 74 65 20 63 6f 72 65 20 6c 69 e SQLite core li
1c20: 62 72 61 72 79 2e 0d 0a 20 20 20 20 2f 2f 2f 20 brary... ///
1c30: 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 </summary>..
1c40: 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d /// <param name=
1c50: 22 64 65 66 56 61 6c 75 65 22 3e 0d 0a 20 20 20 "defValue">..
1c60: 20 2f 2f 2f 20 54 68 65 20 65 72 72 6f 72 20 74 /// The error t
1c70: 65 78 74 20 74 6f 20 72 65 74 75 72 6e 20 69 6e ext to return in
1c80: 20 74 68 65 20 65 76 65 6e 74 20 74 68 61 74 20 the event that
1c90: 6f 6e 65 20 69 73 20 6e 6f 74 20 61 76 61 69 6c one is not avail
1ca0: 61 62 6c 65 20 66 72 6f 6d 20 74 68 65 20 53 51 able from the SQ
1cb0: 4c 69 74 65 20 63 6f 72 65 20 6c 69 62 72 61 72 Lite core librar
1cc0: 79 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 70 61 y... /// </pa
1cd0: 72 61 6d 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 72 ram>.. /// <r
1ce0: 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 2f 2f 2f eturns>.. ///
1cf0: 20 54 68 65 20 65 72 72 6f 72 20 74 65 78 74 2e The error text.
1d00: 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 74 75 .. /// </retu
1d10: 72 6e 73 3e 0d 0a 20 20 20 20 69 6e 74 65 72 6e rns>.. intern
1d20: 61 6c 20 61 62 73 74 72 61 63 74 20 73 74 72 69 al abstract stri
1d30: 6e 67 20 47 65 74 4c 61 73 74 45 72 72 6f 72 28 ng GetLastError(
1d40: 73 74 72 69 6e 67 20 64 65 66 56 61 6c 75 65 29 string defValue)
1d50: 3b 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 ;.... /// <su
1d60: 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 mmary>.. ///
1d70: 57 68 65 6e 20 70 6f 6f 6c 69 6e 67 20 69 73 20 When pooling is
1d80: 65 6e 61 62 6c 65 64 2c 20 66 6f 72 63 65 20 74 enabled, force t
1d90: 68 69 73 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 74 his connection t
1da0: 6f 20 62 65 20 64 69 73 70 6f 73 65 64 20 72 61 o be disposed ra
1db0: 74 68 65 72 20 74 68 61 6e 20 72 65 74 75 72 6e ther than return
1dc0: 65 64 20 74 6f 20 74 68 65 20 70 6f 6f 6c 0d 0a ed to the pool..
1dd0: 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 /// </summar
1de0: 79 3e 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c y>.. internal
1df0: 20 61 62 73 74 72 61 63 74 20 76 6f 69 64 20 43 abstract void C
1e00: 6c 65 61 72 50 6f 6f 6c 28 29 3b 0d 0a 0d 0a 20 learPool();....
1e10: 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e /// <summary>
1e20: 0d 0a 20 20 20 20 2f 2f 2f 20 57 68 65 6e 20 70 .. /// When p
1e30: 6f 6f 6c 69 6e 67 20 69 73 20 65 6e 61 62 6c 65 ooling is enable
1e40: 64 2c 20 72 65 74 75 72 6e 73 20 74 68 65 20 6e d, returns the n
1e50: 75 6d 62 65 72 20 6f 66 20 70 6f 6f 6c 20 65 6e umber of pool en
1e60: 74 72 69 65 73 20 6d 61 74 63 68 69 6e 67 20 74 tries matching t
1e70: 68 65 20 63 75 72 72 65 6e 74 20 66 69 6c 65 20 he current file
1e80: 6e 61 6d 65 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c name... /// <
1e90: 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f /summary>.. /
1ea0: 2f 2f 20 3c 72 65 74 75 72 6e 73 3e 54 68 65 20 // <returns>The
1eb0: 6e 75 6d 62 65 72 20 6f 66 20 70 6f 6f 6c 20 65 number of pool e
1ec0: 6e 74 72 69 65 73 20 6d 61 74 63 68 69 6e 67 20 ntries matching
1ed0: 74 68 65 20 63 75 72 72 65 6e 74 20 66 69 6c 65 the current file
1ee0: 20 6e 61 6d 65 2e 3c 2f 72 65 74 75 72 6e 73 3e name.</returns>
1ef0: 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 .. internal a
1f00: 62 73 74 72 61 63 74 20 69 6e 74 20 43 6f 75 6e bstract int Coun
1f10: 74 50 6f 6f 6c 28 29 3b 0d 0a 0d 0a 20 20 20 20 tPool();....
1f20: 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 /// <summary>..
1f30: 20 20 20 2f 2f 2f 20 50 72 65 70 61 72 65 73 20 /// Prepares
1f40: 61 20 53 51 4c 20 73 74 61 74 65 6d 65 6e 74 20 a SQL statement
1f50: 66 6f 72 20 65 78 65 63 75 74 69 6f 6e 2e 0d 0a for execution...
1f60: 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 /// </summar
1f70: 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 70 61 72 y>.. /// <par
1f80: 61 6d 20 6e 61 6d 65 3d 22 63 6e 6e 22 3e 54 68 am name="cnn">Th
1f90: 65 20 73 6f 75 72 63 65 20 63 6f 6e 6e 65 63 74 e source connect
1fa0: 69 6f 6e 20 70 72 65 70 61 72 69 6e 67 20 74 68 ion preparing th
1fb0: 65 20 63 6f 6d 6d 61 6e 64 2e 20 20 43 61 6e 20 e command. Can
1fc0: 62 65 20 6e 75 6c 6c 20 66 6f 72 20 61 6e 79 20 be null for any
1fd0: 63 61 6c 6c 65 72 20 65 78 63 65 70 74 20 4c 49 caller except LI
1fe0: 4e 51 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 NQ</param>..
1ff0: 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d /// <param name=
2000: 22 73 74 72 53 71 6c 22 3e 54 68 65 20 53 51 4c "strSql">The SQL
2010: 20 63 6f 6d 6d 61 6e 64 20 74 65 78 74 20 74 6f command text to
2020: 20 70 72 65 70 61 72 65 3c 2f 70 61 72 61 6d 3e prepare</param>
2030: 0d 0a 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d .. /// <param
2040: 20 6e 61 6d 65 3d 22 70 72 65 76 69 6f 75 73 22 name="previous"
2050: 3e 54 68 65 20 70 72 65 76 69 6f 75 73 20 73 74 >The previous st
2060: 61 74 65 6d 65 6e 74 20 69 6e 20 61 20 6d 75 6c atement in a mul
2070: 74 69 2d 73 74 61 74 65 6d 65 6e 74 20 63 6f 6d ti-statement com
2080: 6d 61 6e 64 2c 20 6f 72 20 6e 75 6c 6c 20 69 66 mand, or null if
2090: 20 6e 6f 20 70 72 65 76 69 6f 75 73 20 73 74 61 no previous sta
20a0: 74 65 6d 65 6e 74 20 65 78 69 73 74 73 3c 2f 70 tement exists</p
20b0: 61 72 61 6d 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c aram>.. /// <
20c0: 70 61 72 61 6d 20 6e 61 6d 65 3d 22 74 69 6d 65 param name="time
20d0: 6f 75 74 4d 53 22 3e 54 68 65 20 74 69 6d 65 6f outMS">The timeo
20e0: 75 74 20 74 6f 20 77 61 69 74 20 62 65 66 6f 72 ut to wait befor
20f0: 65 20 61 62 6f 72 74 69 6e 67 20 74 68 65 20 70 e aborting the p
2100: 72 65 70 61 72 65 3c 2f 70 61 72 61 6d 3e 0d 0a repare</param>..
2110: 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e /// <param n
2120: 61 6d 65 3d 22 73 74 72 52 65 6d 61 69 6e 22 3e ame="strRemain">
2130: 54 68 65 20 72 65 6d 61 69 6e 64 65 72 20 6f 66 The remainder of
2140: 20 74 68 65 20 73 74 61 74 65 6d 65 6e 74 20 74 the statement t
2150: 68 61 74 20 77 61 73 20 6e 6f 74 20 70 72 6f 63 hat was not proc
2160: 65 73 73 65 64 2e 20 20 45 61 63 68 20 63 61 6c essed. Each cal
2170: 6c 20 74 6f 20 70 72 65 70 61 72 65 20 70 61 72 l to prepare par
2180: 73 65 73 20 74 68 65 0d 0a 20 20 20 20 2f 2f 2f ses the.. ///
2190: 20 53 51 4c 20 75 70 20 74 6f 20 74 6f 20 65 69 SQL up to to ei
21a0: 74 68 65 72 20 74 68 65 20 65 6e 64 20 6f 66 20 ther the end of
21b0: 74 68 65 20 74 65 78 74 20 6f 72 20 74 6f 20 74 the text or to t
21c0: 68 65 20 66 69 72 73 74 20 73 65 6d 69 2d 63 6f he first semi-co
21d0: 6c 6f 6e 20 64 65 6c 69 6d 69 74 65 72 2e 20 20 lon delimiter.
21e0: 54 68 65 20 72 65 6d 61 69 6e 69 6e 67 20 74 65 The remaining te
21f0: 78 74 20 69 73 20 72 65 74 75 72 6e 65 64 0d 0a xt is returned..
2200: 20 20 20 20 2f 2f 2f 20 68 65 72 65 20 66 6f 72 /// here for
2210: 20 61 20 73 75 62 73 65 71 75 65 6e 74 20 63 61 a subsequent ca
2220: 6c 6c 20 74 6f 20 50 72 65 70 61 72 65 28 29 20 ll to Prepare()
2230: 75 6e 74 69 6c 20 61 6c 6c 20 74 68 65 20 74 65 until all the te
2240: 78 74 20 68 61 73 20 62 65 65 6e 20 70 72 6f 63 xt has been proc
2250: 65 73 73 65 64 2e 3c 2f 70 61 72 61 6d 3e 0d 0a essed.</param>..
2260: 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 /// <returns
2270: 3e 52 65 74 75 72 6e 73 20 61 6e 20 69 6e 69 74 >Returns an init
2280: 69 61 6c 69 7a 65 64 20 53 51 4c 69 74 65 53 74 ialized SQLiteSt
2290: 61 74 65 6d 65 6e 74 2e 3c 2f 72 65 74 75 72 6e atement.</return
22a0: 73 3e 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c s>.. internal
22b0: 20 61 62 73 74 72 61 63 74 20 53 51 4c 69 74 65 abstract SQLite
22c0: 53 74 61 74 65 6d 65 6e 74 20 50 72 65 70 61 72 Statement Prepar
22d0: 65 28 53 51 4c 69 74 65 43 6f 6e 6e 65 63 74 69 e(SQLiteConnecti
22e0: 6f 6e 20 63 6e 6e 2c 20 73 74 72 69 6e 67 20 73 on cnn, string s
22f0: 74 72 53 71 6c 2c 20 53 51 4c 69 74 65 53 74 61 trSql, SQLiteSta
2300: 74 65 6d 65 6e 74 20 70 72 65 76 69 6f 75 73 2c tement previous,
2310: 20 75 69 6e 74 20 74 69 6d 65 6f 75 74 4d 53 2c uint timeoutMS,
2320: 20 72 65 66 20 73 74 72 69 6e 67 20 73 74 72 52 ref string strR
2330: 65 6d 61 69 6e 29 3b 0d 0a 20 20 20 20 2f 2f 2f emain);.. ///
2340: 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 <summary>..
2350: 2f 2f 2f 20 53 74 65 70 73 20 74 68 72 6f 75 67 /// Steps throug
2360: 68 20 61 20 70 72 65 70 61 72 65 64 20 73 74 61 h a prepared sta
2370: 74 65 6d 65 6e 74 2e 0d 0a 20 20 20 20 2f 2f 2f tement... ///
2380: 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 </summary>..
2390: 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 /// <param name
23a0: 3d 22 73 74 6d 74 22 3e 54 68 65 20 53 51 4c 69 ="stmt">The SQLi
23b0: 74 65 53 74 61 74 65 6d 65 6e 74 20 74 6f 20 73 teStatement to s
23c0: 74 65 70 20 74 68 72 6f 75 67 68 3c 2f 70 61 72 tep through</par
23d0: 61 6d 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 72 65 am>.. /// <re
23e0: 74 75 72 6e 73 3e 54 72 75 65 20 69 66 20 61 20 turns>True if a
23f0: 72 6f 77 20 77 61 73 20 72 65 74 75 72 6e 65 64 row was returned
2400: 2c 20 46 61 6c 73 65 20 69 66 20 6e 6f 74 2e 3c , False if not.<
2410: 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 69 /returns>.. i
2420: 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 61 63 74 nternal abstract
2430: 20 62 6f 6f 6c 20 53 74 65 70 28 53 51 4c 69 74 bool Step(SQLit
2440: 65 53 74 61 74 65 6d 65 6e 74 20 73 74 6d 74 29 eStatement stmt)
2450: 3b 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d ;.. /// <summ
2460: 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 ary>.. /// Re
2470: 74 75 72 6e 73 20 6e 6f 6e 2d 7a 65 72 6f 20 69 turns non-zero i
2480: 66 20 74 68 65 20 73 70 65 63 69 66 69 65 64 20 f the specified
2490: 73 74 61 74 65 6d 65 6e 74 20 69 73 20 72 65 61 statement is rea
24a0: 64 2d 6f 6e 6c 79 20 69 6e 20 6e 61 74 75 72 65 d-only in nature
24b0: 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d ... /// </sum
24c0: 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c mary>.. /// <
24d0: 70 61 72 61 6d 20 6e 61 6d 65 3d 22 73 74 6d 74 param name="stmt
24e0: 22 3e 54 68 65 20 73 74 61 74 65 6d 65 6e 74 20 ">The statement
24f0: 74 6f 20 63 68 65 63 6b 2e 3c 2f 70 61 72 61 6d to check.</param
2500: 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 >.. /// <retu
2510: 72 6e 73 3e 54 72 75 65 20 69 66 20 74 68 65 20 rns>True if the
2520: 6f 75 74 65 72 20 71 75 65 72 79 20 69 73 20 72 outer query is r
2530: 65 61 64 2d 6f 6e 6c 79 2e 3c 2f 72 65 74 75 72 ead-only.</retur
2540: 6e 73 3e 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 ns>.. interna
2550: 6c 20 61 62 73 74 72 61 63 74 20 62 6f 6f 6c 20 l abstract bool
2560: 49 73 52 65 61 64 4f 6e 6c 79 28 53 51 4c 69 74 IsReadOnly(SQLit
2570: 65 53 74 61 74 65 6d 65 6e 74 20 73 74 6d 74 29 eStatement stmt)
2580: 3b 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d ;.. /// <summ
2590: 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 ary>.. /// Re
25a0: 73 65 74 73 20 61 20 70 72 65 70 61 72 65 64 20 sets a prepared
25b0: 73 74 61 74 65 6d 65 6e 74 20 73 6f 20 69 74 20 statement so it
25c0: 63 61 6e 20 62 65 20 65 78 65 63 75 74 65 64 20 can be executed
25d0: 61 67 61 69 6e 2e 20 20 49 66 20 74 68 65 20 65 again. If the e
25e0: 72 72 6f 72 20 72 65 74 75 72 6e 65 64 20 69 73 rror returned is
25f0: 20 53 51 4c 49 54 45 5f 53 43 48 45 4d 41 2c 0d SQLITE_SCHEMA,.
2600: 0a 20 20 20 20 2f 2f 2f 20 74 72 61 6e 73 70 61 . /// transpa
2610: 72 65 6e 74 6c 79 20 61 74 74 65 6d 70 74 20 74 rently attempt t
2620: 6f 20 72 65 62 75 69 6c 64 20 74 68 65 20 53 51 o rebuild the SQ
2630: 4c 20 73 74 61 74 65 6d 65 6e 74 20 61 6e 64 20 L statement and
2640: 74 68 72 6f 77 20 61 6e 20 65 72 72 6f 72 20 69 throw an error i
2650: 66 20 74 68 61 74 20 77 61 73 20 6e 6f 74 20 70 f that was not p
2660: 6f 73 73 69 62 6c 65 2e 0d 0a 20 20 20 20 2f 2f ossible... //
2670: 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 / </summary>..
2680: 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d /// <param nam
2690: 65 3d 22 73 74 6d 74 22 3e 54 68 65 20 73 74 61 e="stmt">The sta
26a0: 74 65 6d 65 6e 74 20 74 6f 20 72 65 73 65 74 3c tement to reset<
26b0: 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 2f 2f 2f /param>.. ///
26c0: 20 3c 72 65 74 75 72 6e 73 3e 52 65 74 75 72 6e <returns>Return
26d0: 73 20 2d 31 20 69 66 20 74 68 65 20 73 63 68 65 s -1 if the sche
26e0: 6d 61 20 63 68 61 6e 67 65 64 20 77 68 69 6c 65 ma changed while
26f0: 20 72 65 73 65 74 74 69 6e 67 2c 20 30 20 69 66 resetting, 0 if
2700: 20 74 68 65 20 72 65 73 65 74 20 77 61 73 20 73 the reset was s
2710: 75 63 65 73 73 66 75 6c 20 6f 72 20 36 20 28 53 ucessful or 6 (S
2720: 51 4c 49 54 45 5f 4c 4f 43 4b 45 44 29 20 69 66 QLITE_LOCKED) if
2730: 20 74 68 65 20 72 65 73 65 74 20 66 61 69 6c 65 the reset faile
2740: 64 20 64 75 65 20 74 6f 20 61 20 6c 6f 63 6b 3c d due to a lock<
2750: 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 69 /returns>.. i
2760: 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 61 63 74 nternal abstract
2770: 20 53 51 4c 69 74 65 45 72 72 6f 72 43 6f 64 65 SQLiteErrorCode
2780: 20 52 65 73 65 74 28 53 51 4c 69 74 65 53 74 61 Reset(SQLiteSta
2790: 74 65 6d 65 6e 74 20 73 74 6d 74 29 3b 0d 0a 0d tement stmt);...
27a0: 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 . /// <summar
27b0: 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 41 74 74 65 y>.. /// Atte
27c0: 6d 70 74 73 20 74 6f 20 69 6e 74 65 72 72 75 70 mpts to interrup
27d0: 74 20 74 68 65 20 71 75 65 72 79 20 63 75 72 72 t the query curr
27e0: 65 6e 74 6c 79 20 65 78 65 63 75 74 69 6e 67 20 ently executing
27f0: 6f 6e 20 74 68 65 20 61 73 73 6f 63 69 61 74 65 on the associate
2800: 64 0d 0a 20 20 20 20 2f 2f 2f 20 6e 61 74 69 76 d.. /// nativ
2810: 65 20 64 61 74 61 62 61 73 65 20 63 6f 6e 6e 65 e database conne
2820: 63 74 69 6f 6e 2e 0d 0a 20 20 20 20 2f 2f 2f 20 ction... ///
2830: 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 </summary>..
2840: 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 61 63 internal abstrac
2850: 74 20 76 6f 69 64 20 43 61 6e 63 65 6c 28 29 3b t void Cancel();
2860: 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d .... /// <sum
2870: 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 54 mary>.. /// T
2880: 68 69 73 20 66 75 6e 63 74 69 6f 6e 20 62 69 6e his function bin
2890: 64 73 20 61 20 75 73 65 72 2d 64 65 66 69 6e 65 ds a user-define
28a0: 64 20 66 75 6e 63 74 69 6f 6e 20 74 6f 20 74 68 d function to th
28b0: 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 2e 0d 0a 20 e connection...
28c0: 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 /// </summary
28d0: 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 >.. /// <para
28e0: 6d 20 6e 61 6d 65 3d 22 66 75 6e 63 74 69 6f 6e m name="function
28f0: 41 74 74 72 69 62 75 74 65 22 3e 0d 0a 20 20 20 Attribute">..
2900: 20 2f 2f 2f 20 54 68 65 20 3c 73 65 65 20 63 72 /// The <see cr
2910: 65 66 3d 22 53 51 4c 69 74 65 46 75 6e 63 74 69 ef="SQLiteFuncti
2920: 6f 6e 41 74 74 72 69 62 75 74 65 22 2f 3e 20 6f onAttribute"/> o
2930: 62 6a 65 63 74 20 69 6e 73 74 61 6e 63 65 20 63 bject instance c
2940: 6f 6e 74 61 69 6e 69 6e 67 0d 0a 20 20 20 20 2f ontaining.. /
2950: 2f 2f 20 74 68 65 20 6d 65 74 61 64 61 74 61 20 // the metadata
2960: 66 6f 72 20 74 68 65 20 66 75 6e 63 74 69 6f 6e for the function
2970: 20 74 6f 20 62 65 20 62 6f 75 6e 64 2e 0d 0a 20 to be bound...
2980: 20 20 20 2f 2f 2f 20 3c 2f 70 61 72 61 6d 3e 0d /// </param>.
2990: 0a 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 . /// <param
29a0: 6e 61 6d 65 3d 22 66 75 6e 63 74 69 6f 6e 22 3e name="function">
29b0: 0d 0a 20 20 20 20 2f 2f 2f 20 54 68 65 20 3c 73 .. /// The <s
29c0: 65 65 20 63 72 65 66 3d 22 53 51 4c 69 74 65 46 ee cref="SQLiteF
29d0: 75 6e 63 74 69 6f 6e 22 2f 3e 20 6f 62 6a 65 63 unction"/> objec
29e0: 74 20 69 6e 73 74 61 6e 63 65 20 74 68 61 74 20 t instance that
29f0: 69 6d 70 6c 65 6d 65 6e 74 73 20 74 68 65 0d 0a implements the..
2a00: 20 20 20 20 2f 2f 2f 20 66 75 6e 63 74 69 6f 6e /// function
2a10: 20 74 6f 20 62 65 20 62 6f 75 6e 64 2e 0d 0a 20 to be bound...
2a20: 20 20 20 2f 2f 2f 20 3c 2f 70 61 72 61 6d 3e 0d /// </param>.
2a30: 0a 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 . /// <param
2a40: 6e 61 6d 65 3d 22 66 6c 61 67 73 22 3e 0d 0a 20 name="flags">..
2a50: 20 20 20 2f 2f 2f 20 54 68 65 20 66 6c 61 67 73 /// The flags
2a60: 20 61 73 73 6f 63 69 61 74 65 64 20 77 69 74 68 associated with
2a70: 20 74 68 65 20 70 61 72 65 6e 74 20 63 6f 6e 6e the parent conn
2a80: 65 63 74 69 6f 6e 20 6f 62 6a 65 63 74 2e 0d 0a ection object...
2a90: 20 20 20 20 2f 2f 2f 20 3c 2f 70 61 72 61 6d 3e /// </param>
2aa0: 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 .. internal a
2ab0: 62 73 74 72 61 63 74 20 76 6f 69 64 20 42 69 6e bstract void Bin
2ac0: 64 46 75 6e 63 74 69 6f 6e 28 53 51 4c 69 74 65 dFunction(SQLite
2ad0: 46 75 6e 63 74 69 6f 6e 41 74 74 72 69 62 75 74 FunctionAttribut
2ae0: 65 20 66 75 6e 63 74 69 6f 6e 41 74 74 72 69 62 e functionAttrib
2af0: 75 74 65 2c 20 53 51 4c 69 74 65 46 75 6e 63 74 ute, SQLiteFunct
2b00: 69 6f 6e 20 66 75 6e 63 74 69 6f 6e 2c 20 53 51 ion function, SQ
2b10: 4c 69 74 65 43 6f 6e 6e 65 63 74 69 6f 6e 46 6c LiteConnectionFl
2b20: 61 67 73 20 66 6c 61 67 73 29 3b 0d 0a 0d 0a 20 ags flags);....
2b30: 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e /// <summary>
2b40: 0d 0a 20 20 20 20 2f 2f 2f 20 54 68 69 73 20 66 .. /// This f
2b50: 75 6e 63 74 69 6f 6e 20 75 6e 62 69 6e 64 73 20 unction unbinds
2b60: 61 20 75 73 65 72 2d 64 65 66 69 6e 65 64 20 66 a user-defined f
2b70: 75 6e 63 74 69 6f 6e 20 66 72 6f 6d 20 74 68 65 unction from the
2b80: 20 63 6f 6e 6e 65 63 74 69 6f 6e 2e 0d 0a 20 20 connection...
2b90: 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e /// </summary>
2ba0: 0d 0a 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d .. /// <param
2bb0: 20 6e 61 6d 65 3d 22 66 75 6e 63 74 69 6f 6e 41 name="functionA
2bc0: 74 74 72 69 62 75 74 65 22 3e 0d 0a 20 20 20 20 ttribute">..
2bd0: 2f 2f 2f 20 54 68 65 20 3c 73 65 65 20 63 72 65 /// The <see cre
2be0: 66 3d 22 53 51 4c 69 74 65 46 75 6e 63 74 69 6f f="SQLiteFunctio
2bf0: 6e 41 74 74 72 69 62 75 74 65 22 2f 3e 20 6f 62 nAttribute"/> ob
2c00: 6a 65 63 74 20 69 6e 73 74 61 6e 63 65 20 63 6f ject instance co
2c10: 6e 74 61 69 6e 69 6e 67 0d 0a 20 20 20 20 2f 2f ntaining.. //
2c20: 2f 20 74 68 65 20 6d 65 74 61 64 61 74 61 20 66 / the metadata f
2c30: 6f 72 20 74 68 65 20 66 75 6e 63 74 69 6f 6e 20 or the function
2c40: 74 6f 20 62 65 20 75 6e 62 6f 75 6e 64 2e 0d 0a to be unbound...
2c50: 20 20 20 20 2f 2f 2f 20 3c 2f 70 61 72 61 6d 3e /// </param>
2c60: 0d 0a 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d .. /// <param
2c70: 20 6e 61 6d 65 3d 22 66 6c 61 67 73 22 3e 0d 0a name="flags">..
2c80: 20 20 20 20 2f 2f 2f 20 54 68 65 20 66 6c 61 67 /// The flag
2c90: 73 20 61 73 73 6f 63 69 61 74 65 64 20 77 69 74 s associated wit
2ca0: 68 20 74 68 65 20 70 61 72 65 6e 74 20 63 6f 6e h the parent con
2cb0: 6e 65 63 74 69 6f 6e 20 6f 62 6a 65 63 74 2e 0d nection object..
2cc0: 0a 20 20 20 20 2f 2f 2f 20 3c 2f 70 61 72 61 6d . /// </param
2cd0: 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 >.. /// <retu
2ce0: 72 6e 73 3e 4e 6f 6e 2d 7a 65 72 6f 20 69 66 20 rns>Non-zero if
2cf0: 74 68 65 20 66 75 6e 63 74 69 6f 6e 20 77 61 73 the function was
2d00: 20 75 6e 62 6f 75 6e 64 2e 3c 2f 72 65 74 75 72 unbound.</retur
2d10: 6e 73 3e 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 ns>.. interna
2d20: 6c 20 61 62 73 74 72 61 63 74 20 62 6f 6f 6c 20 l abstract bool
2d30: 55 6e 62 69 6e 64 46 75 6e 63 74 69 6f 6e 28 53 UnbindFunction(S
2d40: 51 4c 69 74 65 46 75 6e 63 74 69 6f 6e 41 74 74 QLiteFunctionAtt
2d50: 72 69 62 75 74 65 20 66 75 6e 63 74 69 6f 6e 41 ribute functionA
2d60: 74 74 72 69 62 75 74 65 2c 20 53 51 4c 69 74 65 ttribute, SQLite
2d70: 43 6f 6e 6e 65 63 74 69 6f 6e 46 6c 61 67 73 20 ConnectionFlags
2d80: 66 6c 61 67 73 29 3b 0d 0a 0d 0a 20 20 20 20 69 flags);.... i
2d90: 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 61 63 74 nternal abstract
2da0: 20 76 6f 69 64 20 42 69 6e 64 5f 44 6f 75 62 6c void Bind_Doubl
2db0: 65 28 53 51 4c 69 74 65 53 74 61 74 65 6d 65 6e e(SQLiteStatemen
2dc0: 74 20 73 74 6d 74 2c 20 53 51 4c 69 74 65 43 6f t stmt, SQLiteCo
2dd0: 6e 6e 65 63 74 69 6f 6e 46 6c 61 67 73 20 66 6c nnectionFlags fl
2de0: 61 67 73 2c 20 69 6e 74 20 69 6e 64 65 78 2c 20 ags, int index,
2df0: 64 6f 75 62 6c 65 20 76 61 6c 75 65 29 3b 0d 0a double value);..
2e00: 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 73 internal abs
2e10: 74 72 61 63 74 20 76 6f 69 64 20 42 69 6e 64 5f tract void Bind_
2e20: 49 6e 74 33 32 28 53 51 4c 69 74 65 53 74 61 74 Int32(SQLiteStat
2e30: 65 6d 65 6e 74 20 73 74 6d 74 2c 20 53 51 4c 69 ement stmt, SQLi
2e40: 74 65 43 6f 6e 6e 65 63 74 69 6f 6e 46 6c 61 67 teConnectionFlag
2e50: 73 20 66 6c 61 67 73 2c 20 69 6e 74 20 69 6e 64 s flags, int ind
2e60: 65 78 2c 20 49 6e 74 33 32 20 76 61 6c 75 65 29 ex, Int32 value)
2e70: 3b 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 ;.. internal
2e80: 61 62 73 74 72 61 63 74 20 76 6f 69 64 20 42 69 abstract void Bi
2e90: 6e 64 5f 55 49 6e 74 33 32 28 53 51 4c 69 74 65 nd_UInt32(SQLite
2ea0: 53 74 61 74 65 6d 65 6e 74 20 73 74 6d 74 2c 20 Statement stmt,
2eb0: 53 51 4c 69 74 65 43 6f 6e 6e 65 63 74 69 6f 6e SQLiteConnection
2ec0: 46 6c 61 67 73 20 66 6c 61 67 73 2c 20 69 6e 74 Flags flags, int
2ed0: 20 69 6e 64 65 78 2c 20 55 49 6e 74 33 32 20 76 index, UInt32 v
2ee0: 61 6c 75 65 29 3b 0d 0a 20 20 20 20 69 6e 74 65 alue);.. inte
2ef0: 72 6e 61 6c 20 61 62 73 74 72 61 63 74 20 76 6f rnal abstract vo
2f00: 69 64 20 42 69 6e 64 5f 49 6e 74 36 34 28 53 51 id Bind_Int64(SQ
2f10: 4c 69 74 65 53 74 61 74 65 6d 65 6e 74 20 73 74 LiteStatement st
2f20: 6d 74 2c 20 53 51 4c 69 74 65 43 6f 6e 6e 65 63 mt, SQLiteConnec
2f30: 74 69 6f 6e 46 6c 61 67 73 20 66 6c 61 67 73 2c tionFlags flags,
2f40: 20 69 6e 74 20 69 6e 64 65 78 2c 20 49 6e 74 36 int index, Int6
2f50: 34 20 76 61 6c 75 65 29 3b 0d 0a 20 20 20 20 69 4 value);.. i
2f60: 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 61 63 74 nternal abstract
2f70: 20 76 6f 69 64 20 42 69 6e 64 5f 55 49 6e 74 36 void Bind_UInt6
2f80: 34 28 53 51 4c 69 74 65 53 74 61 74 65 6d 65 6e 4(SQLiteStatemen
2f90: 74 20 73 74 6d 74 2c 20 53 51 4c 69 74 65 43 6f t stmt, SQLiteCo
2fa0: 6e 6e 65 63 74 69 6f 6e 46 6c 61 67 73 20 66 6c nnectionFlags fl
2fb0: 61 67 73 2c 20 69 6e 74 20 69 6e 64 65 78 2c 20 ags, int index,
2fc0: 55 49 6e 74 36 34 20 76 61 6c 75 65 29 3b 0d 0a UInt64 value);..
2fd0: 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 73 internal abs
2fe0: 74 72 61 63 74 20 76 6f 69 64 20 42 69 6e 64 5f tract void Bind_
2ff0: 42 6f 6f 6c 65 61 6e 28 53 51 4c 69 74 65 53 74 Boolean(SQLiteSt
3000: 61 74 65 6d 65 6e 74 20 73 74 6d 74 2c 20 53 51 atement stmt, SQ
3010: 4c 69 74 65 43 6f 6e 6e 65 63 74 69 6f 6e 46 6c LiteConnectionFl
3020: 61 67 73 20 66 6c 61 67 73 2c 20 69 6e 74 20 69 ags flags, int i
3030: 6e 64 65 78 2c 20 62 6f 6f 6c 20 76 61 6c 75 65 ndex, bool value
3040: 29 3b 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c );.. internal
3050: 20 61 62 73 74 72 61 63 74 20 76 6f 69 64 20 42 abstract void B
3060: 69 6e 64 5f 54 65 78 74 28 53 51 4c 69 74 65 53 ind_Text(SQLiteS
3070: 74 61 74 65 6d 65 6e 74 20 73 74 6d 74 2c 20 53 tatement stmt, S
3080: 51 4c 69 74 65 43 6f 6e 6e 65 63 74 69 6f 6e 46 QLiteConnectionF
3090: 6c 61 67 73 20 66 6c 61 67 73 2c 20 69 6e 74 20 lags flags, int
30a0: 69 6e 64 65 78 2c 20 73 74 72 69 6e 67 20 76 61 index, string va
30b0: 6c 75 65 29 3b 0d 0a 20 20 20 20 69 6e 74 65 72 lue);.. inter
30c0: 6e 61 6c 20 61 62 73 74 72 61 63 74 20 76 6f 69 nal abstract voi
30d0: 64 20 42 69 6e 64 5f 42 6c 6f 62 28 53 51 4c 69 d Bind_Blob(SQLi
30e0: 74 65 53 74 61 74 65 6d 65 6e 74 20 73 74 6d 74 teStatement stmt
30f0: 2c 20 53 51 4c 69 74 65 43 6f 6e 6e 65 63 74 69 , SQLiteConnecti
3100: 6f 6e 46 6c 61 67 73 20 66 6c 61 67 73 2c 20 69 onFlags flags, i
3110: 6e 74 20 69 6e 64 65 78 2c 20 62 79 74 65 5b 5d nt index, byte[]
3120: 20 62 6c 6f 62 44 61 74 61 29 3b 0d 0a 20 20 20 blobData);..
3130: 20 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 61 internal abstra
3140: 63 74 20 76 6f 69 64 20 42 69 6e 64 5f 44 61 74 ct void Bind_Dat
3150: 65 54 69 6d 65 28 53 51 4c 69 74 65 53 74 61 74 eTime(SQLiteStat
3160: 65 6d 65 6e 74 20 73 74 6d 74 2c 20 53 51 4c 69 ement stmt, SQLi
3170: 74 65 43 6f 6e 6e 65 63 74 69 6f 6e 46 6c 61 67 teConnectionFlag
3180: 73 20 66 6c 61 67 73 2c 20 69 6e 74 20 69 6e 64 s flags, int ind
3190: 65 78 2c 20 44 61 74 65 54 69 6d 65 20 64 74 29 ex, DateTime dt)
31a0: 3b 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 ;.. internal
31b0: 61 62 73 74 72 61 63 74 20 76 6f 69 64 20 42 69 abstract void Bi
31c0: 6e 64 5f 4e 75 6c 6c 28 53 51 4c 69 74 65 53 74 nd_Null(SQLiteSt
31d0: 61 74 65 6d 65 6e 74 20 73 74 6d 74 2c 20 53 51 atement stmt, SQ
31e0: 4c 69 74 65 43 6f 6e 6e 65 63 74 69 6f 6e 46 6c LiteConnectionFl
31f0: 61 67 73 20 66 6c 61 67 73 2c 20 69 6e 74 20 69 ags flags, int i
3200: 6e 64 65 78 29 3b 0d 0a 0d 0a 20 20 20 20 69 6e ndex);.... in
3210: 74 65 72 6e 61 6c 20 61 62 73 74 72 61 63 74 20 ternal abstract
3220: 69 6e 74 20 42 69 6e 64 5f 50 61 72 61 6d 43 6f int Bind_ParamCo
3230: 75 6e 74 28 53 51 4c 69 74 65 53 74 61 74 65 6d unt(SQLiteStatem
3240: 65 6e 74 20 73 74 6d 74 2c 20 53 51 4c 69 74 65 ent stmt, SQLite
3250: 43 6f 6e 6e 65 63 74 69 6f 6e 46 6c 61 67 73 20 ConnectionFlags
3260: 66 6c 61 67 73 29 3b 0d 0a 20 20 20 20 69 6e 74 flags);.. int
3270: 65 72 6e 61 6c 20 61 62 73 74 72 61 63 74 20 73 ernal abstract s
3280: 74 72 69 6e 67 20 42 69 6e 64 5f 50 61 72 61 6d tring Bind_Param
3290: 4e 61 6d 65 28 53 51 4c 69 74 65 53 74 61 74 65 Name(SQLiteState
32a0: 6d 65 6e 74 20 73 74 6d 74 2c 20 53 51 4c 69 74 ment stmt, SQLit
32b0: 65 43 6f 6e 6e 65 63 74 69 6f 6e 46 6c 61 67 73 eConnectionFlags
32c0: 20 66 6c 61 67 73 2c 20 69 6e 74 20 69 6e 64 65 flags, int inde
32d0: 78 29 3b 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 x);.. interna
32e0: 6c 20 61 62 73 74 72 61 63 74 20 69 6e 74 20 42 l abstract int B
32f0: 69 6e 64 5f 50 61 72 61 6d 49 6e 64 65 78 28 53 ind_ParamIndex(S
3300: 51 4c 69 74 65 53 74 61 74 65 6d 65 6e 74 20 73 QLiteStatement s
3310: 74 6d 74 2c 20 53 51 4c 69 74 65 43 6f 6e 6e 65 tmt, SQLiteConne
3320: 63 74 69 6f 6e 46 6c 61 67 73 20 66 6c 61 67 73 ctionFlags flags
3330: 2c 20 73 74 72 69 6e 67 20 70 61 72 61 6d 4e 61 , string paramNa
3340: 6d 65 29 3b 0d 0a 0d 0a 20 20 20 20 69 6e 74 65 me);.... inte
3350: 72 6e 61 6c 20 61 62 73 74 72 61 63 74 20 69 6e rnal abstract in
3360: 74 20 43 6f 6c 75 6d 6e 43 6f 75 6e 74 28 53 51 t ColumnCount(SQ
3370: 4c 69 74 65 53 74 61 74 65 6d 65 6e 74 20 73 74 LiteStatement st
3380: 6d 74 29 3b 0d 0a 20 20 20 20 69 6e 74 65 72 6e mt);.. intern
3390: 61 6c 20 61 62 73 74 72 61 63 74 20 73 74 72 69 al abstract stri
33a0: 6e 67 20 43 6f 6c 75 6d 6e 4e 61 6d 65 28 53 51 ng ColumnName(SQ
33b0: 4c 69 74 65 53 74 61 74 65 6d 65 6e 74 20 73 74 LiteStatement st
33c0: 6d 74 2c 20 69 6e 74 20 69 6e 64 65 78 29 3b 0d mt, int index);.
33d0: 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 . internal ab
33e0: 73 74 72 61 63 74 20 54 79 70 65 41 66 66 69 6e stract TypeAffin
33f0: 69 74 79 20 43 6f 6c 75 6d 6e 41 66 66 69 6e 69 ity ColumnAffini
3400: 74 79 28 53 51 4c 69 74 65 53 74 61 74 65 6d 65 ty(SQLiteStateme
3410: 6e 74 20 73 74 6d 74 2c 20 69 6e 74 20 69 6e 64 nt stmt, int ind
3420: 65 78 29 3b 0d 0a 20 20 20 20 69 6e 74 65 72 6e ex);.. intern
3430: 61 6c 20 61 62 73 74 72 61 63 74 20 73 74 72 69 al abstract stri
3440: 6e 67 20 43 6f 6c 75 6d 6e 54 79 70 65 28 53 51 ng ColumnType(SQ
3450: 4c 69 74 65 53 74 61 74 65 6d 65 6e 74 20 73 74 LiteStatement st
3460: 6d 74 2c 20 69 6e 74 20 69 6e 64 65 78 2c 20 72 mt, int index, r
3470: 65 66 20 54 79 70 65 41 66 66 69 6e 69 74 79 20 ef TypeAffinity
3480: 6e 41 66 66 69 6e 69 74 79 29 3b 0d 0a 20 20 20 nAffinity);..
3490: 20 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 61 internal abstra
34a0: 63 74 20 69 6e 74 20 43 6f 6c 75 6d 6e 49 6e 64 ct int ColumnInd
34b0: 65 78 28 53 51 4c 69 74 65 53 74 61 74 65 6d 65 ex(SQLiteStateme
34c0: 6e 74 20 73 74 6d 74 2c 20 73 74 72 69 6e 67 20 nt stmt, string
34d0: 63 6f 6c 75 6d 6e 4e 61 6d 65 29 3b 0d 0a 20 20 columnName);..
34e0: 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 internal abstr
34f0: 61 63 74 20 73 74 72 69 6e 67 20 43 6f 6c 75 6d act string Colum
3500: 6e 4f 72 69 67 69 6e 61 6c 4e 61 6d 65 28 53 51 nOriginalName(SQ
3510: 4c 69 74 65 53 74 61 74 65 6d 65 6e 74 20 73 74 LiteStatement st
3520: 6d 74 2c 20 69 6e 74 20 69 6e 64 65 78 29 3b 0d mt, int index);.
3530: 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 . internal ab
3540: 73 74 72 61 63 74 20 73 74 72 69 6e 67 20 43 6f stract string Co
3550: 6c 75 6d 6e 44 61 74 61 62 61 73 65 4e 61 6d 65 lumnDatabaseName
3560: 28 53 51 4c 69 74 65 53 74 61 74 65 6d 65 6e 74 (SQLiteStatement
3570: 20 73 74 6d 74 2c 20 69 6e 74 20 69 6e 64 65 78 stmt, int index
3580: 29 3b 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c );.. internal
3590: 20 61 62 73 74 72 61 63 74 20 73 74 72 69 6e 67 abstract string
35a0: 20 43 6f 6c 75 6d 6e 54 61 62 6c 65 4e 61 6d 65 ColumnTableName
35b0: 28 53 51 4c 69 74 65 53 74 61 74 65 6d 65 6e 74 (SQLiteStatement
35c0: 20 73 74 6d 74 2c 20 69 6e 74 20 69 6e 64 65 78 stmt, int index
35d0: 29 3b 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c );.. internal
35e0: 20 61 62 73 74 72 61 63 74 20 76 6f 69 64 20 43 abstract void C
35f0: 6f 6c 75 6d 6e 4d 65 74 61 44 61 74 61 28 73 74 olumnMetaData(st
3600: 72 69 6e 67 20 64 61 74 61 42 61 73 65 2c 20 73 ring dataBase, s
3610: 74 72 69 6e 67 20 74 61 62 6c 65 2c 20 73 74 72 tring table, str
3620: 69 6e 67 20 63 6f 6c 75 6d 6e 2c 20 72 65 66 20 ing column, ref
3630: 73 74 72 69 6e 67 20 64 61 74 61 54 79 70 65 2c string dataType,
3640: 20 72 65 66 20 73 74 72 69 6e 67 20 63 6f 6c 6c ref string coll
3650: 61 74 65 53 65 71 75 65 6e 63 65 2c 20 72 65 66 ateSequence, ref
3660: 20 62 6f 6f 6c 20 6e 6f 74 4e 75 6c 6c 2c 20 72 bool notNull, r
3670: 65 66 20 62 6f 6f 6c 20 70 72 69 6d 61 72 79 4b ef bool primaryK
3680: 65 79 2c 20 72 65 66 20 62 6f 6f 6c 20 61 75 74 ey, ref bool aut
3690: 6f 49 6e 63 72 65 6d 65 6e 74 29 3b 0d 0a 20 20 oIncrement);..
36a0: 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 internal abstr
36b0: 61 63 74 20 76 6f 69 64 20 47 65 74 49 6e 64 65 act void GetInde
36c0: 78 43 6f 6c 75 6d 6e 45 78 74 65 6e 64 65 64 49 xColumnExtendedI
36d0: 6e 66 6f 28 73 74 72 69 6e 67 20 64 61 74 61 62 nfo(string datab
36e0: 61 73 65 2c 20 73 74 72 69 6e 67 20 69 6e 64 65 ase, string inde
36f0: 78 2c 20 73 74 72 69 6e 67 20 63 6f 6c 75 6d 6e x, string column
3700: 2c 20 72 65 66 20 69 6e 74 20 73 6f 72 74 4d 6f , ref int sortMo
3710: 64 65 2c 20 72 65 66 20 69 6e 74 20 6f 6e 45 72 de, ref int onEr
3720: 72 6f 72 2c 20 72 65 66 20 73 74 72 69 6e 67 20 ror, ref string
3730: 63 6f 6c 6c 61 74 69 6f 6e 53 65 71 75 65 6e 63 collationSequenc
3740: 65 29 3b 0d 0a 0d 0a 20 20 20 20 69 6e 74 65 72 e);.... inter
3750: 6e 61 6c 20 61 62 73 74 72 61 63 74 20 6f 62 6a nal abstract obj
3760: 65 63 74 20 47 65 74 4f 62 6a 65 63 74 28 53 51 ect GetObject(SQ
3770: 4c 69 74 65 53 74 61 74 65 6d 65 6e 74 20 73 74 LiteStatement st
3780: 6d 74 2c 20 69 6e 74 20 69 6e 64 65 78 29 3b 0d mt, int index);.
3790: 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 . internal ab
37a0: 73 74 72 61 63 74 20 64 6f 75 62 6c 65 20 47 65 stract double Ge
37b0: 74 44 6f 75 62 6c 65 28 53 51 4c 69 74 65 53 74 tDouble(SQLiteSt
37c0: 61 74 65 6d 65 6e 74 20 73 74 6d 74 2c 20 69 6e atement stmt, in
37d0: 74 20 69 6e 64 65 78 29 3b 0d 0a 20 20 20 20 69 t index);.. i
37e0: 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 61 63 74 nternal abstract
37f0: 20 42 6f 6f 6c 65 61 6e 20 47 65 74 42 6f 6f 6c Boolean GetBool
3800: 65 61 6e 28 53 51 4c 69 74 65 53 74 61 74 65 6d ean(SQLiteStatem
3810: 65 6e 74 20 73 74 6d 74 2c 20 69 6e 74 20 69 6e ent stmt, int in
3820: 64 65 78 29 3b 0d 0a 20 20 20 20 69 6e 74 65 72 dex);.. inter
3830: 6e 61 6c 20 61 62 73 74 72 61 63 74 20 53 42 79 nal abstract SBy
3840: 74 65 20 47 65 74 53 42 79 74 65 28 53 51 4c 69 te GetSByte(SQLi
3850: 74 65 53 74 61 74 65 6d 65 6e 74 20 73 74 6d 74 teStatement stmt
3860: 2c 20 69 6e 74 20 69 6e 64 65 78 29 3b 0d 0a 20 , int index);..
3870: 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 internal abst
3880: 72 61 63 74 20 42 79 74 65 20 47 65 74 42 79 74 ract Byte GetByt
3890: 65 28 53 51 4c 69 74 65 53 74 61 74 65 6d 65 6e e(SQLiteStatemen
38a0: 74 20 73 74 6d 74 2c 20 69 6e 74 20 69 6e 64 65 t stmt, int inde
38b0: 78 29 3b 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 x);.. interna
38c0: 6c 20 61 62 73 74 72 61 63 74 20 49 6e 74 31 36 l abstract Int16
38d0: 20 47 65 74 49 6e 74 31 36 28 53 51 4c 69 74 65 GetInt16(SQLite
38e0: 53 74 61 74 65 6d 65 6e 74 20 73 74 6d 74 2c 20 Statement stmt,
38f0: 69 6e 74 20 69 6e 64 65 78 29 3b 0d 0a 20 20 20 int index);..
3900: 20 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 61 internal abstra
3910: 63 74 20 55 49 6e 74 31 36 20 47 65 74 55 49 6e ct UInt16 GetUIn
3920: 74 31 36 28 53 51 4c 69 74 65 53 74 61 74 65 6d t16(SQLiteStatem
3930: 65 6e 74 20 73 74 6d 74 2c 20 69 6e 74 20 69 6e ent stmt, int in
3940: 64 65 78 29 3b 0d 0a 20 20 20 20 69 6e 74 65 72 dex);.. inter
3950: 6e 61 6c 20 61 62 73 74 72 61 63 74 20 49 6e 74 nal abstract Int
3960: 33 32 20 47 65 74 49 6e 74 33 32 28 53 51 4c 69 32 GetInt32(SQLi
3970: 74 65 53 74 61 74 65 6d 65 6e 74 20 73 74 6d 74 teStatement stmt
3980: 2c 20 69 6e 74 20 69 6e 64 65 78 29 3b 0d 0a 20 , int index);..
3990: 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 internal abst
39a0: 72 61 63 74 20 55 49 6e 74 33 32 20 47 65 74 55 ract UInt32 GetU
39b0: 49 6e 74 33 32 28 53 51 4c 69 74 65 53 74 61 74 Int32(SQLiteStat
39c0: 65 6d 65 6e 74 20 73 74 6d 74 2c 20 69 6e 74 20 ement stmt, int
39d0: 69 6e 64 65 78 29 3b 0d 0a 20 20 20 20 69 6e 74 index);.. int
39e0: 65 72 6e 61 6c 20 61 62 73 74 72 61 63 74 20 49 ernal abstract I
39f0: 6e 74 36 34 20 47 65 74 49 6e 74 36 34 28 53 51 nt64 GetInt64(SQ
3a00: 4c 69 74 65 53 74 61 74 65 6d 65 6e 74 20 73 74 LiteStatement st
3a10: 6d 74 2c 20 69 6e 74 20 69 6e 64 65 78 29 3b 0d mt, int index);.
3a20: 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 . internal ab
3a30: 73 74 72 61 63 74 20 55 49 6e 74 36 34 20 47 65 stract UInt64 Ge
3a40: 74 55 49 6e 74 36 34 28 53 51 4c 69 74 65 53 74 tUInt64(SQLiteSt
3a50: 61 74 65 6d 65 6e 74 20 73 74 6d 74 2c 20 69 6e atement stmt, in
3a60: 74 20 69 6e 64 65 78 29 3b 0d 0a 20 20 20 20 69 t index);.. i
3a70: 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 61 63 74 nternal abstract
3a80: 20 73 74 72 69 6e 67 20 47 65 74 54 65 78 74 28 string GetText(
3a90: 53 51 4c 69 74 65 53 74 61 74 65 6d 65 6e 74 20 SQLiteStatement
3aa0: 73 74 6d 74 2c 20 69 6e 74 20 69 6e 64 65 78 29 stmt, int index)
3ab0: 3b 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 ;.. internal
3ac0: 61 62 73 74 72 61 63 74 20 6c 6f 6e 67 20 47 65 abstract long Ge
3ad0: 74 42 79 74 65 73 28 53 51 4c 69 74 65 53 74 61 tBytes(SQLiteSta
3ae0: 74 65 6d 65 6e 74 20 73 74 6d 74 2c 20 69 6e 74 tement stmt, int
3af0: 20 69 6e 64 65 78 2c 20 69 6e 74 20 6e 44 61 74 index, int nDat
3b00: 61 6f 66 66 73 65 74 2c 20 62 79 74 65 5b 5d 20 aoffset, byte[]
3b10: 62 44 65 73 74 2c 20 69 6e 74 20 6e 53 74 61 72 bDest, int nStar
3b20: 74 2c 20 69 6e 74 20 6e 4c 65 6e 67 74 68 29 3b t, int nLength);
3b30: 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 .. internal a
3b40: 62 73 74 72 61 63 74 20 6c 6f 6e 67 20 47 65 74 bstract long Get
3b50: 43 68 61 72 73 28 53 51 4c 69 74 65 53 74 61 74 Chars(SQLiteStat
3b60: 65 6d 65 6e 74 20 73 74 6d 74 2c 20 69 6e 74 20 ement stmt, int
3b70: 69 6e 64 65 78 2c 20 69 6e 74 20 6e 44 61 74 61 index, int nData
3b80: 6f 66 66 73 65 74 2c 20 63 68 61 72 5b 5d 20 62 offset, char[] b
3b90: 44 65 73 74 2c 20 69 6e 74 20 6e 53 74 61 72 74 Dest, int nStart
3ba0: 2c 20 69 6e 74 20 6e 4c 65 6e 67 74 68 29 3b 0d , int nLength);.
3bb0: 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 . internal ab
3bc0: 73 74 72 61 63 74 20 44 61 74 65 54 69 6d 65 20 stract DateTime
3bd0: 47 65 74 44 61 74 65 54 69 6d 65 28 53 51 4c 69 GetDateTime(SQLi
3be0: 74 65 53 74 61 74 65 6d 65 6e 74 20 73 74 6d 74 teStatement stmt
3bf0: 2c 20 69 6e 74 20 69 6e 64 65 78 29 3b 0d 0a 20 , int index);..
3c00: 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 internal abst
3c10: 72 61 63 74 20 62 6f 6f 6c 20 49 73 4e 75 6c 6c ract bool IsNull
3c20: 28 53 51 4c 69 74 65 53 74 61 74 65 6d 65 6e 74 (SQLiteStatement
3c30: 20 73 74 6d 74 2c 20 69 6e 74 20 69 6e 64 65 78 stmt, int index
3c40: 29 3b 0d 0a 0d 0a 20 20 20 20 69 6e 74 65 72 6e );.... intern
3c50: 61 6c 20 61 62 73 74 72 61 63 74 20 53 51 4c 69 al abstract SQLi
3c60: 74 65 45 72 72 6f 72 43 6f 64 65 20 43 72 65 61 teErrorCode Crea
3c70: 74 65 43 6f 6c 6c 61 74 69 6f 6e 28 73 74 72 69 teCollation(stri
3c80: 6e 67 20 73 74 72 43 6f 6c 6c 61 74 69 6f 6e 2c ng strCollation,
3c90: 20 53 51 4c 69 74 65 43 6f 6c 6c 61 74 69 6f 6e SQLiteCollation
3ca0: 20 66 75 6e 63 2c 20 53 51 4c 69 74 65 43 6f 6c func, SQLiteCol
3cb0: 6c 61 74 69 6f 6e 20 66 75 6e 63 31 36 2c 20 62 lation func16, b
3cc0: 6f 6f 6c 20 40 74 68 72 6f 77 29 3b 0d 0a 20 20 ool @throw);..
3cd0: 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 internal abstr
3ce0: 61 63 74 20 53 51 4c 69 74 65 45 72 72 6f 72 43 act SQLiteErrorC
3cf0: 6f 64 65 20 43 72 65 61 74 65 46 75 6e 63 74 69 ode CreateFuncti
3d00: 6f 6e 28 73 74 72 69 6e 67 20 73 74 72 46 75 6e on(string strFun
3d10: 63 74 69 6f 6e 2c 20 69 6e 74 20 6e 41 72 67 73 ction, int nArgs
3d20: 2c 20 62 6f 6f 6c 20 6e 65 65 64 43 6f 6c 6c 53 , bool needCollS
3d30: 65 71 2c 20 53 51 4c 69 74 65 43 61 6c 6c 62 61 eq, SQLiteCallba
3d40: 63 6b 20 66 75 6e 63 2c 20 53 51 4c 69 74 65 43 ck func, SQLiteC
3d50: 61 6c 6c 62 61 63 6b 20 66 75 6e 63 73 74 65 70 allback funcstep
3d60: 2c 20 53 51 4c 69 74 65 46 69 6e 61 6c 43 61 6c , SQLiteFinalCal
3d70: 6c 62 61 63 6b 20 66 75 6e 63 66 69 6e 61 6c 2c lback funcfinal,
3d80: 20 62 6f 6f 6c 20 40 74 68 72 6f 77 29 3b 0d 0a bool @throw);..
3d90: 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 73 internal abs
3da0: 74 72 61 63 74 20 43 6f 6c 6c 61 74 69 6f 6e 53 tract CollationS
3db0: 65 71 75 65 6e 63 65 20 47 65 74 43 6f 6c 6c 61 equence GetColla
3dc0: 74 69 6f 6e 53 65 71 75 65 6e 63 65 28 53 51 4c tionSequence(SQL
3dd0: 69 74 65 46 75 6e 63 74 69 6f 6e 20 66 75 6e 63 iteFunction func
3de0: 2c 20 49 6e 74 50 74 72 20 63 6f 6e 74 65 78 74 , IntPtr context
3df0: 29 3b 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c );.. internal
3e00: 20 61 62 73 74 72 61 63 74 20 69 6e 74 20 43 6f abstract int Co
3e10: 6e 74 65 78 74 43 6f 6c 6c 61 74 65 43 6f 6d 70 ntextCollateComp
3e20: 61 72 65 28 43 6f 6c 6c 61 74 69 6f 6e 45 6e 63 are(CollationEnc
3e30: 6f 64 69 6e 67 45 6e 75 6d 20 65 6e 63 2c 20 49 odingEnum enc, I
3e40: 6e 74 50 74 72 20 63 6f 6e 74 65 78 74 2c 20 73 ntPtr context, s
3e50: 74 72 69 6e 67 20 73 31 2c 20 73 74 72 69 6e 67 tring s1, string
3e60: 20 73 32 29 3b 0d 0a 20 20 20 20 69 6e 74 65 72 s2);.. inter
3e70: 6e 61 6c 20 61 62 73 74 72 61 63 74 20 69 6e 74 nal abstract int
3e80: 20 43 6f 6e 74 65 78 74 43 6f 6c 6c 61 74 65 43 ContextCollateC
3e90: 6f 6d 70 61 72 65 28 43 6f 6c 6c 61 74 69 6f 6e ompare(Collation
3ea0: 45 6e 63 6f 64 69 6e 67 45 6e 75 6d 20 65 6e 63 EncodingEnum enc
3eb0: 2c 20 49 6e 74 50 74 72 20 63 6f 6e 74 65 78 74 , IntPtr context
3ec0: 2c 20 63 68 61 72 5b 5d 20 63 31 2c 20 63 68 61 , char[] c1, cha
3ed0: 72 5b 5d 20 63 32 29 3b 0d 0a 0d 0a 20 20 20 20 r[] c2);....
3ee0: 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 61 63 internal abstrac
3ef0: 74 20 69 6e 74 20 41 67 67 72 65 67 61 74 65 43 t int AggregateC
3f00: 6f 75 6e 74 28 49 6e 74 50 74 72 20 63 6f 6e 74 ount(IntPtr cont
3f10: 65 78 74 29 3b 0d 0a 20 20 20 20 69 6e 74 65 72 ext);.. inter
3f20: 6e 61 6c 20 61 62 73 74 72 61 63 74 20 49 6e 74 nal abstract Int
3f30: 50 74 72 20 41 67 67 72 65 67 61 74 65 43 6f 6e Ptr AggregateCon
3f40: 74 65 78 74 28 49 6e 74 50 74 72 20 63 6f 6e 74 text(IntPtr cont
3f50: 65 78 74 29 3b 0d 0a 0d 0a 20 20 20 20 69 6e 74 ext);.... int
3f60: 65 72 6e 61 6c 20 61 62 73 74 72 61 63 74 20 6c ernal abstract l
3f70: 6f 6e 67 20 47 65 74 50 61 72 61 6d 56 61 6c 75 ong GetParamValu
3f80: 65 42 79 74 65 73 28 49 6e 74 50 74 72 20 70 74 eBytes(IntPtr pt
3f90: 72 2c 20 69 6e 74 20 6e 44 61 74 61 4f 66 66 73 r, int nDataOffs
3fa0: 65 74 2c 20 62 79 74 65 5b 5d 20 62 44 65 73 74 et, byte[] bDest
3fb0: 2c 20 69 6e 74 20 6e 53 74 61 72 74 2c 20 69 6e , int nStart, in
3fc0: 74 20 6e 4c 65 6e 67 74 68 29 3b 0d 0a 20 20 20 t nLength);..
3fd0: 20 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 61 internal abstra
3fe0: 63 74 20 64 6f 75 62 6c 65 20 47 65 74 50 61 72 ct double GetPar
3ff0: 61 6d 56 61 6c 75 65 44 6f 75 62 6c 65 28 49 6e amValueDouble(In
4000: 74 50 74 72 20 70 74 72 29 3b 0d 0a 20 20 20 20 tPtr ptr);..
4010: 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 61 63 internal abstrac
4020: 74 20 69 6e 74 20 47 65 74 50 61 72 61 6d 56 61 t int GetParamVa
4030: 6c 75 65 49 6e 74 33 32 28 49 6e 74 50 74 72 20 lueInt32(IntPtr
4040: 70 74 72 29 3b 0d 0a 20 20 20 20 69 6e 74 65 72 ptr);.. inter
4050: 6e 61 6c 20 61 62 73 74 72 61 63 74 20 49 6e 74 nal abstract Int
4060: 36 34 20 47 65 74 50 61 72 61 6d 56 61 6c 75 65 64 GetParamValue
4070: 49 6e 74 36 34 28 49 6e 74 50 74 72 20 70 74 72 Int64(IntPtr ptr
4080: 29 3b 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c );.. internal
4090: 20 61 62 73 74 72 61 63 74 20 73 74 72 69 6e 67 abstract string
40a0: 20 47 65 74 50 61 72 61 6d 56 61 6c 75 65 54 65 GetParamValueTe
40b0: 78 74 28 49 6e 74 50 74 72 20 70 74 72 29 3b 0d xt(IntPtr ptr);.
40c0: 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 . internal ab
40d0: 73 74 72 61 63 74 20 54 79 70 65 41 66 66 69 6e stract TypeAffin
40e0: 69 74 79 20 47 65 74 50 61 72 61 6d 56 61 6c 75 ity GetParamValu
40f0: 65 54 79 70 65 28 49 6e 74 50 74 72 20 70 74 72 eType(IntPtr ptr
4100: 29 3b 0d 0a 0d 0a 20 20 20 20 69 6e 74 65 72 6e );.... 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 42 6c 6f 62 28 49 6e 74 50 ReturnBlob(IntP
4130: 74 72 20 63 6f 6e 74 65 78 74 2c 20 62 79 74 65 tr context, byte
4140: 5b 5d 20 76 61 6c 75 65 29 3b 0d 0a 20 20 20 20 [] 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 44 6f 75 t void ReturnDou
4170: 62 6c 65 28 49 6e 74 50 74 72 20 63 6f 6e 74 65 ble(IntPtr conte
4180: 78 74 2c 20 64 6f 75 62 6c 65 20 76 61 6c 75 65 xt, double value
4190: 29 3b 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c );.. internal
41a0: 20 61 62 73 74 72 61 63 74 20 76 6f 69 64 20 52 abstract void R
41b0: 65 74 75 72 6e 45 72 72 6f 72 28 49 6e 74 50 74 eturnError(IntPt
41c0: 72 20 63 6f 6e 74 65 78 74 2c 20 73 74 72 69 6e r context, strin
41d0: 67 20 76 61 6c 75 65 29 3b 0d 0a 20 20 20 20 69 g value);.. i
41e0: 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 61 63 74 nternal abstract
41f0: 20 76 6f 69 64 20 52 65 74 75 72 6e 49 6e 74 33 void ReturnInt3
4200: 32 28 49 6e 74 50 74 72 20 63 6f 6e 74 65 78 74 2(IntPtr context
4210: 2c 20 49 6e 74 33 32 20 76 61 6c 75 65 29 3b 0d , Int32 value);.
4220: 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 . internal ab
4230: 73 74 72 61 63 74 20 76 6f 69 64 20 52 65 74 75 stract void Retu
4240: 72 6e 49 6e 74 36 34 28 49 6e 74 50 74 72 20 63 rnInt64(IntPtr c
4250: 6f 6e 74 65 78 74 2c 20 49 6e 74 36 34 20 76 61 ontext, Int64 va
4260: 6c 75 65 29 3b 0d 0a 20 20 20 20 69 6e 74 65 72 lue);.. inter
4270: 6e 61 6c 20 61 62 73 74 72 61 63 74 20 76 6f 69 nal abstract voi
4280: 64 20 52 65 74 75 72 6e 4e 75 6c 6c 28 49 6e 74 d ReturnNull(Int
4290: 50 74 72 20 63 6f 6e 74 65 78 74 29 3b 0d 0a 20 Ptr context);..
42a0: 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 internal abst
42b0: 72 61 63 74 20 76 6f 69 64 20 52 65 74 75 72 6e ract void Return
42c0: 54 65 78 74 28 49 6e 74 50 74 72 20 63 6f 6e 74 Text(IntPtr cont
42d0: 65 78 74 2c 20 73 74 72 69 6e 67 20 76 61 6c 75 ext, string valu
42e0: 65 29 3b 0d 0a 0d 0a 23 69 66 20 49 4e 54 45 52 e);....#if INTER
42f0: 4f 50 5f 56 49 52 54 55 41 4c 5f 54 41 42 4c 45 OP_VIRTUAL_TABLE
4300: 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 .. /// <summa
4310: 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 43 61 6c ry>.. /// Cal
4320: 6c 73 20 74 68 65 20 6e 61 74 69 76 65 20 53 51 ls the native SQ
4330: 4c 69 74 65 20 63 6f 72 65 20 6c 69 62 72 61 72 Lite core librar
4340: 79 20 69 6e 20 6f 72 64 65 72 20 74 6f 20 63 72 y in order to cr
4350: 65 61 74 65 20 61 20 64 69 73 70 6f 73 61 62 6c eate a disposabl
4360: 65 0d 0a 20 20 20 20 2f 2f 2f 20 6d 6f 64 75 6c e.. /// modul
4370: 65 20 63 6f 6e 74 61 69 6e 69 6e 67 20 74 68 65 e containing the
4380: 20 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 20 implementation
4390: 6f 66 20 61 20 76 69 72 74 75 61 6c 20 74 61 62 of a virtual tab
43a0: 6c 65 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 le... /// </s
43b0: 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f ummary>.. ///
43c0: 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 6d 6f <param name="mo
43d0: 64 75 6c 65 22 3e 0d 0a 20 20 20 20 2f 2f 2f 20 dule">.. ///
43e0: 54 68 65 20 6d 6f 64 75 6c 65 20 6f 62 6a 65 63 The module objec
43f0: 74 20 74 6f 20 62 65 20 75 73 65 64 20 77 68 65 t to be used whe
4400: 6e 20 63 72 65 61 74 69 6e 67 20 74 68 65 20 6e n creating the n
4410: 61 74 69 76 65 20 64 69 73 70 6f 73 61 62 6c 65 ative disposable
4420: 20 6d 6f 64 75 6c 65 2e 0d 0a 20 20 20 20 2f 2f module... //
4430: 2f 20 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 / </param>..
4440: 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d /// <param name=
4450: 22 66 6c 61 67 73 22 3e 0d 0a 20 20 20 20 2f 2f "flags">.. //
4460: 2f 20 54 68 65 20 66 6c 61 67 73 20 66 6f 72 20 / The flags for
4470: 74 68 65 20 61 73 73 6f 63 69 61 74 65 64 20 3c the associated <
4480: 73 65 65 20 63 72 65 66 3d 22 53 51 4c 69 74 65 see cref="SQLite
4490: 43 6f 6e 6e 65 63 74 69 6f 6e 22 20 2f 3e 20 6f Connection" /> o
44a0: 62 6a 65 63 74 20 69 6e 73 74 61 6e 63 65 2e 0d bject instance..
44b0: 0a 20 20 20 20 2f 2f 2f 20 3c 2f 70 61 72 61 6d . /// </param
44c0: 3e 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 >.. internal
44d0: 61 62 73 74 72 61 63 74 20 76 6f 69 64 20 43 72 abstract void Cr
44e0: 65 61 74 65 4d 6f 64 75 6c 65 28 53 51 4c 69 74 eateModule(SQLit
44f0: 65 4d 6f 64 75 6c 65 20 6d 6f 64 75 6c 65 2c 20 eModule module,
4500: 53 51 4c 69 74 65 43 6f 6e 6e 65 63 74 69 6f 6e SQLiteConnection
4510: 46 6c 61 67 73 20 66 6c 61 67 73 29 3b 0d 0a 0d Flags flags);...
4520: 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 . /// <summar
4530: 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 43 61 6c 6c y>.. /// Call
4540: 73 20 74 68 65 20 6e 61 74 69 76 65 20 53 51 4c s the native SQL
4550: 69 74 65 20 63 6f 72 65 20 6c 69 62 72 61 72 79 ite core library
4560: 20 69 6e 20 6f 72 64 65 72 20 74 6f 20 63 6c 65 in order to cle
4570: 61 6e 75 70 20 74 68 65 20 72 65 73 6f 75 72 63 anup the resourc
4580: 65 73 0d 0a 20 20 20 20 2f 2f 2f 20 61 73 73 6f es.. /// asso
4590: 63 69 61 74 65 64 20 77 69 74 68 20 61 20 6d 6f ciated with a mo
45a0: 64 75 6c 65 20 63 6f 6e 74 61 69 6e 69 6e 67 20 dule containing
45b0: 74 68 65 20 69 6d 70 6c 65 6d 65 6e 74 61 74 69 the implementati
45c0: 6f 6e 20 6f 66 20 61 20 76 69 72 74 75 61 6c 20 on of a virtual
45d0: 74 61 62 6c 65 2e 0d 0a 20 20 20 20 2f 2f 2f 20 table... ///
45e0: 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 </summary>..
45f0: 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d /// <param name=
4600: 22 6d 6f 64 75 6c 65 22 3e 0d 0a 20 20 20 20 2f "module">.. /
4610: 2f 2f 20 54 68 65 20 6d 6f 64 75 6c 65 20 6f 62 // The module ob
4620: 6a 65 63 74 20 70 72 65 76 69 6f 75 73 6c 79 20 ject previously
4630: 70 61 73 73 65 64 20 74 6f 20 74 68 65 20 3c 73 passed to the <s
4640: 65 65 20 63 72 65 66 3d 22 43 72 65 61 74 65 4d ee cref="CreateM
4650: 6f 64 75 6c 65 22 20 2f 3e 0d 0a 20 20 20 20 2f odule" />.. /
4660: 2f 2f 20 6d 65 74 68 6f 64 2e 0d 0a 20 20 20 20 // method...
4670: 2f 2f 2f 20 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 /// </param>..
4680: 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d /// <param nam
4690: 65 3d 22 66 6c 61 67 73 22 3e 0d 0a 20 20 20 20 e="flags">..
46a0: 2f 2f 2f 20 54 68 65 20 66 6c 61 67 73 20 66 6f /// The flags fo
46b0: 72 20 74 68 65 20 61 73 73 6f 63 69 61 74 65 64 r the associated
46c0: 20 3c 73 65 65 20 63 72 65 66 3d 22 53 51 4c 69 <see cref="SQLi
46d0: 74 65 43 6f 6e 6e 65 63 74 69 6f 6e 22 20 2f 3e teConnection" />
46e0: 20 6f 62 6a 65 63 74 20 69 6e 73 74 61 6e 63 65 object instance
46f0: 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 70 61 72 ... /// </par
4700: 61 6d 3e 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 am>.. interna
4710: 6c 20 61 62 73 74 72 61 63 74 20 76 6f 69 64 20 l abstract void
4720: 44 69 73 70 6f 73 65 4d 6f 64 75 6c 65 28 53 51 DisposeModule(SQ
4730: 4c 69 74 65 4d 6f 64 75 6c 65 20 6d 6f 64 75 6c LiteModule modul
4740: 65 2c 20 53 51 4c 69 74 65 43 6f 6e 6e 65 63 74 e, SQLiteConnect
4750: 69 6f 6e 46 6c 61 67 73 20 66 6c 61 67 73 29 3b ionFlags flags);
4760: 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d .... /// <sum
4770: 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 43 mary>.. /// C
4780: 61 6c 6c 73 20 74 68 65 20 6e 61 74 69 76 65 20 alls the native
4790: 53 51 4c 69 74 65 20 63 6f 72 65 20 6c 69 62 72 SQLite core libr
47a0: 61 72 79 20 69 6e 20 6f 72 64 65 72 20 74 6f 20 ary in order to
47b0: 64 65 63 6c 61 72 65 20 61 20 76 69 72 74 75 61 declare a virtua
47c0: 6c 20 74 61 62 6c 65 0d 0a 20 20 20 20 2f 2f 2f l table.. ///
47d0: 20 69 6e 20 72 65 73 70 6f 6e 73 65 20 74 6f 20 in response to
47e0: 61 20 63 61 6c 6c 20 69 6e 74 6f 20 74 68 65 20 a call into the
47f0: 3c 73 65 65 20 63 72 65 66 3d 22 49 53 51 4c 69 <see cref="ISQLi
4800: 74 65 4e 61 74 69 76 65 4d 6f 64 75 6c 65 2e 78 teNativeModule.x
4810: 43 72 65 61 74 65 22 20 2f 3e 0d 0a 20 20 20 20 Create" />..
4820: 2f 2f 2f 20 6f 72 20 3c 73 65 65 20 63 72 65 66 /// or <see cref
4830: 3d 22 49 53 51 4c 69 74 65 4e 61 74 69 76 65 4d ="ISQLiteNativeM
4840: 6f 64 75 6c 65 2e 78 43 6f 6e 6e 65 63 74 22 20 odule.xConnect"
4850: 2f 3e 20 76 69 72 74 75 61 6c 20 74 61 62 6c 65 /> virtual table
4860: 20 6d 65 74 68 6f 64 73 2e 0d 0a 20 20 20 20 2f methods... /
4870: 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 // </summary>..
4880: 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 /// <param na
4890: 6d 65 3d 22 6d 6f 64 75 6c 65 22 3e 0d 0a 20 20 me="module">..
48a0: 20 20 2f 2f 2f 20 54 68 65 20 76 69 72 74 75 61 /// The virtua
48b0: 6c 20 74 61 62 6c 65 20 6d 6f 64 75 6c 65 20 74 l table module t
48c0: 68 61 74 20 69 73 20 74 6f 20 62 65 20 72 65 73 hat is to be res
48d0: 70 6f 6e 73 69 62 6c 65 20 66 6f 72 20 74 68 65 ponsible for the
48e0: 20 76 69 72 74 75 61 6c 20 74 61 62 6c 65 0d 0a virtual table..
48f0: 20 20 20 20 2f 2f 2f 20 62 65 69 6e 67 20 64 65 /// being de
4900: 63 6c 61 72 65 64 2e 0d 0a 20 20 20 20 2f 2f 2f clared... ///
4910: 20 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 2f </param>.. /
4920: 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 // <param name="
4930: 73 74 72 53 71 6c 22 3e 0d 0a 20 20 20 20 2f 2f strSql">.. //
4940: 2f 20 54 68 65 20 73 74 72 69 6e 67 20 63 6f 6e / The string con
4950: 74 61 69 6e 69 6e 67 20 74 68 65 20 53 51 4c 20 taining the SQL
4960: 73 74 61 74 65 6d 65 6e 74 20 64 65 73 63 72 69 statement descri
4970: 62 69 6e 67 20 74 68 65 20 76 69 72 74 75 61 6c bing the virtual
4980: 20 74 61 62 6c 65 20 74 6f 0d 0a 20 20 20 20 2f table to.. /
4990: 2f 2f 20 62 65 20 64 65 63 6c 61 72 65 64 2e 0d // be declared..
49a0: 0a 20 20 20 20 2f 2f 2f 20 3c 2f 70 61 72 61 6d . /// </param
49b0: 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 >.. /// <para
49c0: 6d 20 6e 61 6d 65 3d 22 65 72 72 6f 72 22 3e 0d m name="error">.
49d0: 0a 20 20 20 20 2f 2f 2f 20 55 70 6f 6e 20 73 75 . /// Upon su
49e0: 63 63 65 73 73 2c 20 74 68 65 20 63 6f 6e 74 65 ccess, the conte
49f0: 6e 74 73 20 6f 66 20 74 68 69 73 20 70 61 72 61 nts of this para
4a00: 6d 65 74 65 72 20 61 72 65 20 75 6e 64 65 66 69 meter are undefi
4a10: 6e 65 64 2e 20 20 55 70 6f 6e 20 66 61 69 6c 75 ned. Upon failu
4a20: 72 65 2c 0d 0a 20 20 20 20 2f 2f 2f 20 69 74 20 re,.. /// it
4a30: 73 68 6f 75 6c 64 20 63 6f 6e 74 61 69 6e 20 61 should contain a
4a40: 6e 20 61 70 70 72 6f 70 72 69 61 74 65 20 65 72 n appropriate er
4a50: 72 6f 72 20 6d 65 73 73 61 67 65 2e 0d 0a 20 20 ror message...
4a60: 20 20 2f 2f 2f 20 3c 2f 70 61 72 61 6d 3e 0d 0a /// </param>..
4a70: 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 /// <returns
4a80: 3e 0d 0a 20 20 20 20 2f 2f 2f 20 41 20 73 74 61 >.. /// A sta
4a90: 6e 64 61 72 64 20 53 51 4c 69 74 65 20 72 65 74 ndard SQLite ret
4aa0: 75 72 6e 20 63 6f 64 65 2e 0d 0a 20 20 20 20 2f urn code... /
4ab0: 2f 2f 20 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 // </returns>..
4ac0: 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 internal abst
4ad0: 72 61 63 74 20 53 51 4c 69 74 65 45 72 72 6f 72 ract SQLiteError
4ae0: 43 6f 64 65 20 44 65 63 6c 61 72 65 56 69 72 74 Code DeclareVirt
4af0: 75 61 6c 54 61 62 6c 65 28 53 51 4c 69 74 65 4d ualTable(SQLiteM
4b00: 6f 64 75 6c 65 20 6d 6f 64 75 6c 65 2c 20 73 74 odule module, st
4b10: 72 69 6e 67 20 73 74 72 53 71 6c 2c 20 72 65 66 ring strSql, ref
4b20: 20 73 74 72 69 6e 67 20 65 72 72 6f 72 29 3b 0d string error);.
4b30: 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d ... /// <summ
4b40: 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 43 61 ary>.. /// Ca
4b50: 6c 6c 73 20 74 68 65 20 6e 61 74 69 76 65 20 53 lls the native S
4b60: 51 4c 69 74 65 20 63 6f 72 65 20 6c 69 62 72 61 QLite core libra
4b70: 72 79 20 69 6e 20 6f 72 64 65 72 20 74 6f 20 64 ry in order to d
4b80: 65 63 6c 61 72 65 20 61 20 76 69 72 74 75 61 6c eclare a virtual
4b90: 20 74 61 62 6c 65 0d 0a 20 20 20 20 2f 2f 2f 20 table.. ///
4ba0: 66 75 6e 63 74 69 6f 6e 20 69 6e 20 72 65 73 70 function in resp
4bb0: 6f 6e 73 65 20 74 6f 20 61 20 63 61 6c 6c 20 69 onse to a call i
4bc0: 6e 74 6f 20 74 68 65 20 3c 73 65 65 20 63 72 65 nto the <see cre
4bd0: 66 3d 22 49 53 51 4c 69 74 65 4e 61 74 69 76 65 f="ISQLiteNative
4be0: 4d 6f 64 75 6c 65 2e 78 43 72 65 61 74 65 22 20 Module.xCreate"
4bf0: 2f 3e 0d 0a 20 20 20 20 2f 2f 2f 20 6f 72 20 3c />.. /// or <
4c00: 73 65 65 20 63 72 65 66 3d 22 49 53 51 4c 69 74 see cref="ISQLit
4c10: 65 4e 61 74 69 76 65 4d 6f 64 75 6c 65 2e 78 43 eNativeModule.xC
4c20: 6f 6e 6e 65 63 74 22 20 2f 3e 20 76 69 72 74 75 onnect" /> virtu
4c30: 61 6c 20 74 61 62 6c 65 20 6d 65 74 68 6f 64 73 al table methods
4c40: 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d ... /// </sum
4c50: 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c mary>.. /// <
4c60: 70 61 72 61 6d 20 6e 61 6d 65 3d 22 6d 6f 64 75 param name="modu
4c70: 6c 65 22 3e 0d 0a 20 20 20 20 2f 2f 2f 20 54 68 le">.. /// Th
4c80: 65 20 76 69 72 74 75 61 6c 20 74 61 62 6c 65 20 e virtual table
4c90: 6d 6f 64 75 6c 65 20 74 68 61 74 20 69 73 20 74 module that is t
4ca0: 6f 20 62 65 20 72 65 73 70 6f 6e 73 69 62 6c 65 o be responsible
4cb0: 20 66 6f 72 20 74 68 65 20 76 69 72 74 75 61 6c for the virtual
4cc0: 20 74 61 62 6c 65 0d 0a 20 20 20 20 2f 2f 2f 20 table.. ///
4cd0: 66 75 6e 63 74 69 6f 6e 20 62 65 69 6e 67 20 64 function being d
4ce0: 65 63 6c 61 72 65 64 2e 0d 0a 20 20 20 20 2f 2f eclared... //
4cf0: 2f 20 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 / </param>..
4d00: 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d /// <param name=
4d10: 22 61 72 67 75 6d 65 6e 74 43 6f 75 6e 74 22 3e "argumentCount">
4d20: 0d 0a 20 20 20 20 2f 2f 2f 20 54 68 65 20 6e 75 .. /// The nu
4d30: 6d 62 65 72 20 6f 66 20 61 72 67 75 6d 65 6e 74 mber of argument
4d40: 73 20 74 6f 20 74 68 65 20 66 75 6e 63 74 69 6f s to the functio
4d50: 6e 20 62 65 69 6e 67 20 64 65 63 6c 61 72 65 64 n being declared
4d60: 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 70 61 72 ... /// </par
4d70: 61 6d 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 70 61 am>.. /// <pa
4d80: 72 61 6d 20 6e 61 6d 65 3d 22 6e 61 6d 65 22 3e ram name="name">
4d90: 0d 0a 20 20 20 20 2f 2f 2f 20 54 68 65 20 6e 61 .. /// The na
4da0: 6d 65 20 6f 66 20 74 68 65 20 66 75 6e 63 74 69 me of the functi
4db0: 6f 6e 20 62 65 69 6e 67 20 64 65 63 6c 61 72 65 on being declare
4dc0: 64 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 70 61 d... /// </pa
4dd0: 72 61 6d 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 70 ram>.. /// <p
4de0: 61 72 61 6d 20 6e 61 6d 65 3d 22 65 72 72 6f 72 aram name="error
4df0: 22 3e 0d 0a 20 20 20 20 2f 2f 2f 20 55 70 6f 6e ">.. /// Upon
4e00: 20 73 75 63 63 65 73 73 2c 20 74 68 65 20 63 6f success, the co
4e10: 6e 74 65 6e 74 73 20 6f 66 20 74 68 69 73 20 70 ntents of this p
4e20: 61 72 61 6d 65 74 65 72 20 61 72 65 20 75 6e 64 arameter are und
4e30: 65 66 69 6e 65 64 2e 20 20 55 70 6f 6e 20 66 61 efined. Upon fa
4e40: 69 6c 75 72 65 2c 0d 0a 20 20 20 20 2f 2f 2f 20 ilure,.. ///
4e50: 69 74 20 73 68 6f 75 6c 64 20 63 6f 6e 74 61 69 it should contai
4e60: 6e 20 61 6e 20 61 70 70 72 6f 70 72 69 61 74 65 n an appropriate
4e70: 20 65 72 72 6f 72 20 6d 65 73 73 61 67 65 2e 0d error message..
4e80: 0a 20 20 20 20 2f 2f 2f 20 3c 2f 70 61 72 61 6d . /// </param
4e90: 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 >.. /// <retu
4ea0: 72 6e 73 3e 0d 0a 20 20 20 20 2f 2f 2f 20 41 20 rns>.. /// A
4eb0: 73 74 61 6e 64 61 72 64 20 53 51 4c 69 74 65 20 standard SQLite
4ec0: 72 65 74 75 72 6e 20 63 6f 64 65 2e 0d 0a 20 20 return code...
4ed0: 20 20 2f 2f 2f 20 3c 2f 72 65 74 75 72 6e 73 3e /// </returns>
4ee0: 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 .. internal a
4ef0: 62 73 74 72 61 63 74 20 53 51 4c 69 74 65 45 72 bstract SQLiteEr
4f00: 72 6f 72 43 6f 64 65 20 44 65 63 6c 61 72 65 56 rorCode DeclareV
4f10: 69 72 74 75 61 6c 46 75 6e 63 74 69 6f 6e 28 53 irtualFunction(S
4f20: 51 4c 69 74 65 4d 6f 64 75 6c 65 20 6d 6f 64 75 QLiteModule modu
4f30: 6c 65 2c 20 69 6e 74 20 61 72 67 75 6d 65 6e 74 le, int argument
4f40: 43 6f 75 6e 74 2c 20 73 74 72 69 6e 67 20 6e 61 Count, string na
4f50: 6d 65 2c 20 72 65 66 20 73 74 72 69 6e 67 20 65 me, ref string e
4f60: 72 72 6f 72 29 3b 0d 0a 23 65 6e 64 69 66 0d 0a rror);..#endif..
4f70: 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 .. /// <summa
4f80: 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 45 6e 61 ry>.. /// Ena
4f90: 62 6c 65 73 20 6f 72 20 64 69 73 61 62 6c 65 64 bles or disabled
4fa0: 20 65 78 74 65 6e 73 69 6f 6e 20 6c 6f 61 64 69 extension loadi
4fb0: 6e 67 20 62 79 20 53 51 4c 69 74 65 2e 0d 0a 20 ng by SQLite...
4fc0: 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 /// </summary
4fd0: 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 >.. /// <para
4fe0: 6d 20 6e 61 6d 65 3d 22 62 4f 6e 4f 66 66 22 3e m name="bOnOff">
4ff0: 0d 0a 20 20 20 20 2f 2f 2f 20 54 72 75 65 20 74 .. /// True t
5000: 6f 20 65 6e 61 62 6c 65 20 6c 6f 61 64 69 6e 67 o enable loading
5010: 20 6f 66 20 65 78 74 65 6e 73 69 6f 6e 73 2c 20 of extensions,
5020: 66 61 6c 73 65 20 74 6f 20 64 69 73 61 62 6c 65 false to disable
5030: 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 70 61 72 ... /// </par
5040: 61 6d 3e 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 am>.. interna
5050: 6c 20 61 62 73 74 72 61 63 74 20 76 6f 69 64 20 l abstract void
5060: 53 65 74 4c 6f 61 64 45 78 74 65 6e 73 69 6f 6e SetLoadExtension
5070: 28 62 6f 6f 6c 20 62 4f 6e 4f 66 66 29 3b 0d 0a (bool bOnOff);..
5080: 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 /// <summary
5090: 3e 0d 0a 20 20 20 20 2f 2f 2f 20 4c 6f 61 64 73 >.. /// Loads
50a0: 20 61 20 53 51 4c 69 74 65 20 65 78 74 65 6e 73 a SQLite extens
50b0: 69 6f 6e 20 6c 69 62 72 61 72 79 20 66 72 6f 6d ion library from
50c0: 20 74 68 65 20 6e 61 6d 65 64 20 66 69 6c 65 2e the named file.
50d0: 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d .. /// </summ
50e0: 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 70 ary>.. /// <p
50f0: 61 72 61 6d 20 6e 61 6d 65 3d 22 66 69 6c 65 4e aram name="fileN
5100: 61 6d 65 22 3e 0d 0a 20 20 20 20 2f 2f 2f 20 54 ame">.. /// T
5110: 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 64 he name of the d
5120: 79 6e 61 6d 69 63 20 6c 69 6e 6b 20 6c 69 62 72 ynamic link libr
5130: 61 72 79 20 66 69 6c 65 20 63 6f 6e 74 61 69 6e ary file contain
5140: 69 6e 67 20 74 68 65 20 65 78 74 65 6e 73 69 6f ing the extensio
5150: 6e 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 70 61 n... /// </pa
5160: 72 61 6d 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 70 ram>.. /// <p
5170: 61 72 61 6d 20 6e 61 6d 65 3d 22 70 72 6f 63 4e aram name="procN
5180: 61 6d 65 22 3e 0d 0a 20 20 20 20 2f 2f 2f 20 54 ame">.. /// T
5190: 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 65 he name of the e
51a0: 78 70 6f 72 74 65 64 20 66 75 6e 63 74 69 6f 6e xported function
51b0: 20 75 73 65 64 20 74 6f 20 69 6e 69 74 69 61 6c used to initial
51c0: 69 7a 65 20 74 68 65 20 65 78 74 65 6e 73 69 6f ize the extensio
51d0: 6e 2e 0d 0a 20 20 20 20 2f 2f 2f 20 49 66 20 6e n... /// If n
51e0: 75 6c 6c 2c 20 74 68 65 20 64 65 66 61 75 6c 74 ull, the default
51f0: 20 22 73 71 6c 69 74 65 33 5f 65 78 74 65 6e 73 "sqlite3_extens
5200: 69 6f 6e 5f 69 6e 69 74 22 20 77 69 6c 6c 20 62 ion_init" will b
5210: 65 20 75 73 65 64 2e 0d 0a 20 20 20 20 2f 2f 2f e used... ///
5220: 20 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 69 </param>.. i
5230: 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 61 63 74 nternal abstract
5240: 20 76 6f 69 64 20 4c 6f 61 64 45 78 74 65 6e 73 void LoadExtens
5250: 69 6f 6e 28 73 74 72 69 6e 67 20 66 69 6c 65 4e ion(string fileN
5260: 61 6d 65 2c 20 73 74 72 69 6e 67 20 70 72 6f 63 ame, string proc
5270: 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 2f 2f 2f 20 Name);.. ///
5280: 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f <summary>.. /
5290: 2f 2f 20 45 6e 61 62 6c 65 73 20 6f 72 20 64 69 // Enables or di
52a0: 73 61 62 6c 65 64 20 65 78 74 65 6e 65 64 20 72 sabled extened r
52b0: 65 73 75 6c 74 20 63 6f 64 65 73 20 72 65 74 75 esult codes retu
52c0: 72 6e 65 64 20 62 79 20 53 51 4c 69 74 65 0d 0a rned by SQLite..
52d0: 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 /// </summar
52e0: 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 70 61 72 y>.. /// <par
52f0: 61 6d 20 6e 61 6d 65 3d 22 62 4f 6e 4f 66 66 22 am name="bOnOff"
5300: 3e 74 72 75 65 20 74 6f 20 65 6e 61 62 6c 65 20 >true to enable
5310: 65 78 74 65 6e 64 65 64 20 72 65 73 75 6c 74 20 extended result
5320: 63 6f 64 65 73 2c 20 66 61 6c 73 65 20 74 6f 20 codes, false to
5330: 64 69 73 61 62 6c 65 2e 3c 2f 70 61 72 61 6d 3e disable.</param>
5340: 0d 0a 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 72 .. /// <retur
5350: 6e 73 3e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 ns></returns>..
5360: 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 internal abst
5370: 72 61 63 74 20 76 6f 69 64 20 53 65 74 45 78 74 ract void SetExt
5380: 65 6e 64 65 64 52 65 73 75 6c 74 43 6f 64 65 73 endedResultCodes
5390: 28 62 6f 6f 6c 20 62 4f 6e 4f 66 66 29 3b 0d 0a (bool bOnOff);..
53a0: 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 /// <summary
53b0: 3e 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 >.. /// Retur
53c0: 6e 73 20 74 68 65 20 6e 75 6d 65 72 69 63 20 72 ns the numeric r
53d0: 65 73 75 6c 74 20 63 6f 64 65 20 66 6f 72 20 74 esult code for t
53e0: 68 65 20 6d 6f 73 74 20 72 65 63 65 6e 74 20 66 he most recent f
53f0: 61 69 6c 65 64 20 53 51 4c 69 74 65 20 41 50 49 ailed SQLite API
5400: 20 63 61 6c 6c 0d 0a 20 20 20 20 2f 2f 2f 20 61 call.. /// a
5410: 73 73 6f 63 69 61 74 65 64 20 77 69 74 68 20 74 ssociated with t
5420: 68 65 20 64 61 74 61 62 61 73 65 20 63 6f 6e 6e he database conn
5430: 65 63 74 69 6f 6e 2e 0d 0a 20 20 20 20 2f 2f 2f ection... ///
5440: 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 </summary>..
5450: 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 3e 52 65 /// <returns>Re
5460: 73 75 6c 74 20 63 6f 64 65 3c 2f 72 65 74 75 72 sult code</retur
5470: 6e 73 3e 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 ns>.. interna
5480: 6c 20 61 62 73 74 72 61 63 74 20 53 51 4c 69 74 l abstract SQLit
5490: 65 45 72 72 6f 72 43 6f 64 65 20 52 65 73 75 6c eErrorCode Resul
54a0: 74 43 6f 64 65 28 29 3b 0d 0a 20 20 20 20 2f 2f tCode();.. //
54b0: 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 / <summary>..
54c0: 20 2f 2f 2f 20 52 65 74 75 72 6e 73 20 74 68 65 /// Returns the
54d0: 20 65 78 74 65 6e 64 65 64 20 6e 75 6d 65 72 69 extended numeri
54e0: 63 20 72 65 73 75 6c 74 20 63 6f 64 65 20 66 6f c result code fo
54f0: 72 20 74 68 65 20 6d 6f 73 74 20 72 65 63 65 6e r the most recen
5500: 74 20 66 61 69 6c 65 64 20 53 51 4c 69 74 65 20 t failed SQLite
5510: 41 50 49 20 63 61 6c 6c 0d 0a 20 20 20 20 2f 2f API call.. //
5520: 2f 20 61 73 73 6f 63 69 61 74 65 64 20 77 69 74 / associated wit
5530: 68 20 74 68 65 20 64 61 74 61 62 61 73 65 20 63 h the database c
5540: 6f 6e 6e 65 63 74 69 6f 6e 2e 0d 0a 20 20 20 20 onnection...
5550: 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a /// </summary>..
5560: 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 /// <returns
5570: 3e 45 78 74 65 6e 64 65 64 20 72 65 73 75 6c 74 >Extended result
5580: 20 63 6f 64 65 3c 2f 72 65 74 75 72 6e 73 3e 0d code</returns>.
5590: 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 . internal ab
55a0: 73 74 72 61 63 74 20 53 51 4c 69 74 65 45 72 72 stract SQLiteErr
55b0: 6f 72 43 6f 64 65 20 45 78 74 65 6e 64 65 64 52 orCode ExtendedR
55c0: 65 73 75 6c 74 43 6f 64 65 28 29 3b 0d 0a 0d 0a esultCode();....
55d0: 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 /// <summary
55e0: 3e 0d 0a 20 20 20 20 2f 2f 2f 20 41 64 64 20 61 >.. /// Add a
55f0: 20 6c 6f 67 20 6d 65 73 73 61 67 65 20 76 69 61 log message via
5600: 20 74 68 65 20 53 51 4c 69 74 65 20 73 71 6c 69 the SQLite sqli
5610: 74 65 33 5f 6c 6f 67 20 69 6e 74 65 72 66 61 63 te3_log interfac
5620: 65 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 e... /// </su
5630: 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 mmary>.. ///
5640: 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 69 45 72 <param name="iEr
5650: 72 43 6f 64 65 22 3e 45 72 72 6f 72 20 63 6f 64 rCode">Error cod
5660: 65 20 74 6f 20 62 65 20 6c 6f 67 67 65 64 20 77 e to be logged w
5670: 69 74 68 20 74 68 65 20 6d 65 73 73 61 67 65 2e ith the message.
5680: 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 2f 2f </param>.. //
5690: 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 7a / <param name="z
56a0: 4d 65 73 73 61 67 65 22 3e 53 74 72 69 6e 67 20 Message">String
56b0: 74 6f 20 62 65 20 6c 6f 67 67 65 64 2e 20 20 55 to be logged. U
56c0: 6e 6c 69 6b 65 20 74 68 65 20 53 51 4c 69 74 65 nlike the SQLite
56d0: 20 73 71 6c 69 74 65 33 5f 6c 6f 67 28 29 0d 0a sqlite3_log()..
56e0: 20 20 20 20 2f 2f 2f 20 69 6e 74 65 72 66 61 63 /// interfac
56f0: 65 2c 20 74 68 69 73 20 73 68 6f 75 6c 64 20 62 e, this should b
5700: 65 20 70 72 65 2d 66 6f 72 6d 61 74 74 65 64 2e e pre-formatted.
5710: 20 20 43 6f 6e 73 69 64 65 72 20 75 73 69 6e 67 Consider using
5720: 20 74 68 65 0d 0a 20 20 20 20 2f 2f 2f 20 53 74 the.. /// St
5730: 72 69 6e 67 2e 46 6f 72 6d 61 74 28 29 20 66 75 ring.Format() fu
5740: 6e 63 74 69 6f 6e 2e 3c 2f 70 61 72 61 6d 3e 0d nction.</param>.
5750: 0a 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 72 6e . /// <return
5760: 73 3e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 20 s></returns>..
5770: 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 internal abstr
5780: 61 63 74 20 76 6f 69 64 20 4c 6f 67 4d 65 73 73 act void LogMess
5790: 61 67 65 28 53 51 4c 69 74 65 45 72 72 6f 72 43 age(SQLiteErrorC
57a0: 6f 64 65 20 69 45 72 72 43 6f 64 65 2c 20 73 74 ode iErrCode, st
57b0: 72 69 6e 67 20 7a 4d 65 73 73 61 67 65 29 3b 0d ring zMessage);.
57c0: 0a 0d 0a 23 69 66 20 49 4e 54 45 52 4f 50 5f 43 ...#if INTEROP_C
57d0: 4f 44 45 43 20 7c 7c 20 49 4e 54 45 52 4f 50 5f ODEC || INTEROP_
57e0: 49 4e 43 4c 55 44 45 5f 53 45 45 0d 0a 20 20 20 INCLUDE_SEE..
57f0: 20 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 61 internal abstra
5800: 63 74 20 76 6f 69 64 20 53 65 74 50 61 73 73 77 ct void SetPassw
5810: 6f 72 64 28 62 79 74 65 5b 5d 20 70 61 73 73 77 ord(byte[] passw
5820: 6f 72 64 42 79 74 65 73 29 3b 0d 0a 20 20 20 20 ordBytes);..
5830: 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 61 63 internal abstrac
5840: 74 20 76 6f 69 64 20 43 68 61 6e 67 65 50 61 73 t void ChangePas
5850: 73 77 6f 72 64 28 62 79 74 65 5b 5d 20 6e 65 77 sword(byte[] new
5860: 50 61 73 73 77 6f 72 64 42 79 74 65 73 29 3b 0d PasswordBytes);.
5870: 0a 23 65 6e 64 69 66 0d 0a 0d 0a 20 20 20 20 69 .#endif.... i
5880: 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 61 63 74 nternal abstract
5890: 20 76 6f 69 64 20 53 65 74 50 72 6f 67 72 65 73 void SetProgres
58a0: 73 48 6f 6f 6b 28 69 6e 74 20 6e 4f 70 73 2c 20 sHook(int nOps,
58b0: 53 51 4c 69 74 65 50 72 6f 67 72 65 73 73 43 61 SQLiteProgressCa
58c0: 6c 6c 62 61 63 6b 20 66 75 6e 63 29 3b 0d 0a 20 llback func);..
58d0: 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 internal abst
58e0: 72 61 63 74 20 76 6f 69 64 20 53 65 74 41 75 74 ract void SetAut
58f0: 68 6f 72 69 7a 65 72 48 6f 6f 6b 28 53 51 4c 69 horizerHook(SQLi
5900: 74 65 41 75 74 68 6f 72 69 7a 65 72 43 61 6c 6c teAuthorizerCall
5910: 62 61 63 6b 20 66 75 6e 63 29 3b 0d 0a 20 20 20 back func);..
5920: 20 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 61 internal abstra
5930: 63 74 20 76 6f 69 64 20 53 65 74 55 70 64 61 74 ct void SetUpdat
5940: 65 48 6f 6f 6b 28 53 51 4c 69 74 65 55 70 64 61 eHook(SQLiteUpda
5950: 74 65 43 61 6c 6c 62 61 63 6b 20 66 75 6e 63 29 teCallback func)
5960: 3b 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 ;.. internal
5970: 61 62 73 74 72 61 63 74 20 76 6f 69 64 20 53 65 abstract void Se
5980: 74 43 6f 6d 6d 69 74 48 6f 6f 6b 28 53 51 4c 69 tCommitHook(SQLi
5990: 74 65 43 6f 6d 6d 69 74 43 61 6c 6c 62 61 63 6b teCommitCallback
59a0: 20 66 75 6e 63 29 3b 0d 0a 20 20 20 20 69 6e 74 func);.. int
59b0: 65 72 6e 61 6c 20 61 62 73 74 72 61 63 74 20 76 ernal abstract v
59c0: 6f 69 64 20 53 65 74 54 72 61 63 65 43 61 6c 6c oid SetTraceCall
59d0: 62 61 63 6b 28 53 51 4c 69 74 65 54 72 61 63 65 back(SQLiteTrace
59e0: 43 61 6c 6c 62 61 63 6b 20 66 75 6e 63 29 3b 0d Callback func);.
59f0: 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 . internal ab
5a00: 73 74 72 61 63 74 20 76 6f 69 64 20 53 65 74 52 stract void SetR
5a10: 6f 6c 6c 62 61 63 6b 48 6f 6f 6b 28 53 51 4c 69 ollbackHook(SQLi
5a20: 74 65 52 6f 6c 6c 62 61 63 6b 43 61 6c 6c 62 61 teRollbackCallba
5a30: 63 6b 20 66 75 6e 63 29 3b 0d 0a 20 20 20 20 69 ck func);.. i
5a40: 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 61 63 74 nternal abstract
5a50: 20 53 51 4c 69 74 65 45 72 72 6f 72 43 6f 64 65 SQLiteErrorCode
5a60: 20 53 65 74 4c 6f 67 43 61 6c 6c 62 61 63 6b 28 SetLogCallback(
5a70: 53 51 4c 69 74 65 4c 6f 67 43 61 6c 6c 62 61 63 SQLiteLogCallbac
5a80: 6b 20 66 75 6e 63 29 3b 0d 0a 0d 0a 20 20 20 20 k func);....
5a90: 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 /// <summary>..
5aa0: 20 20 20 2f 2f 2f 20 43 68 65 63 6b 73 20 69 66 /// Checks if
5ab0: 20 74 68 65 20 53 51 4c 69 74 65 20 63 6f 72 65 the SQLite core
5ac0: 20 6c 69 62 72 61 72 79 20 68 61 73 20 62 65 65 library has bee
5ad0: 6e 20 69 6e 69 74 69 61 6c 69 7a 65 64 20 69 6e n initialized in
5ae0: 20 74 68 65 20 63 75 72 72 65 6e 74 20 70 72 6f the current pro
5af0: 63 65 73 73 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c cess... /// <
5b00: 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f /summary>.. /
5b10: 2f 2f 20 3c 72 65 74 75 72 6e 73 3e 0d 0a 20 20 // <returns>..
5b20: 20 20 2f 2f 2f 20 4e 6f 6e 2d 7a 65 72 6f 20 69 /// Non-zero i
5b30: 66 20 74 68 65 20 53 51 4c 69 74 65 20 63 6f 72 f the SQLite cor
5b40: 65 20 6c 69 62 72 61 72 79 20 68 61 73 20 62 65 e library has be
5b50: 65 6e 20 69 6e 69 74 69 61 6c 69 7a 65 64 20 69 en initialized i
5b60: 6e 20 74 68 65 20 63 75 72 72 65 6e 74 20 70 72 n the current pr
5b70: 6f 63 65 73 73 2c 0d 0a 20 20 20 20 2f 2f 2f 20 ocess,.. ///
5b80: 7a 65 72 6f 20 6f 74 68 65 72 77 69 73 65 2e 0d zero otherwise..
5b90: 0a 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 74 75 72 . /// </retur
5ba0: 6e 73 3e 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 ns>.. interna
5bb0: 6c 20 61 62 73 74 72 61 63 74 20 62 6f 6f 6c 20 l abstract bool
5bc0: 49 73 49 6e 69 74 69 61 6c 69 7a 65 64 28 29 3b IsInitialized();
5bd0: 0d 0a 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c .... internal
5be0: 20 61 62 73 74 72 61 63 74 20 69 6e 74 20 47 65 abstract int Ge
5bf0: 74 43 75 72 73 6f 72 46 6f 72 54 61 62 6c 65 28 tCursorForTable(
5c00: 53 51 4c 69 74 65 53 74 61 74 65 6d 65 6e 74 20 SQLiteStatement
5c10: 73 74 6d 74 2c 20 69 6e 74 20 64 61 74 61 62 61 stmt, int databa
5c20: 73 65 2c 20 69 6e 74 20 72 6f 6f 74 50 61 67 65 se, int rootPage
5c30: 29 3b 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c );.. internal
5c40: 20 61 62 73 74 72 61 63 74 20 6c 6f 6e 67 20 47 abstract long G
5c50: 65 74 52 6f 77 49 64 46 6f 72 43 75 72 73 6f 72 etRowIdForCursor
5c60: 28 53 51 4c 69 74 65 53 74 61 74 65 6d 65 6e 74 (SQLiteStatement
5c70: 20 73 74 6d 74 2c 20 69 6e 74 20 63 75 72 73 6f stmt, int curso
5c80: 72 29 3b 0d 0a 0d 0a 20 20 20 20 69 6e 74 65 72 r);.... inter
5c90: 6e 61 6c 20 61 62 73 74 72 61 63 74 20 6f 62 6a nal abstract obj
5ca0: 65 63 74 20 47 65 74 56 61 6c 75 65 28 53 51 4c ect GetValue(SQL
5cb0: 69 74 65 53 74 61 74 65 6d 65 6e 74 20 73 74 6d iteStatement stm
5cc0: 74 2c 20 53 51 4c 69 74 65 43 6f 6e 6e 65 63 74 t, SQLiteConnect
5cd0: 69 6f 6e 46 6c 61 67 73 20 66 6c 61 67 73 2c 20 ionFlags flags,
5ce0: 69 6e 74 20 69 6e 64 65 78 2c 20 53 51 4c 69 74 int index, SQLit
5cf0: 65 54 79 70 65 20 74 79 70 29 3b 0d 0a 0d 0a 20 eType typ);....
5d00: 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e /// <summary>
5d10: 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 6e .. /// Return
5d20: 73 20 6e 6f 6e 2d 7a 65 72 6f 20 69 66 20 74 68 s non-zero if th
5d30: 65 20 67 69 76 65 6e 20 64 61 74 61 62 61 73 65 e given database
5d40: 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 69 73 20 69 connection is i
5d50: 6e 20 61 75 74 6f 63 6f 6d 6d 69 74 20 6d 6f 64 n autocommit mod
5d60: 65 2e 0d 0a 20 20 20 20 2f 2f 2f 20 41 75 74 6f e... /// Auto
5d70: 63 6f 6d 6d 69 74 20 6d 6f 64 65 20 69 73 20 6f commit mode is o
5d80: 6e 20 62 79 20 64 65 66 61 75 6c 74 2e 20 20 41 n by default. A
5d90: 75 74 6f 63 6f 6d 6d 69 74 20 6d 6f 64 65 20 69 utocommit mode i
5da0: 73 20 64 69 73 61 62 6c 65 64 20 62 79 20 61 20 s disabled by a
5db0: 42 45 47 49 4e 0d 0a 20 20 20 20 2f 2f 2f 20 73 BEGIN.. /// s
5dc0: 74 61 74 65 6d 65 6e 74 2e 20 20 41 75 74 6f 63 tatement. Autoc
5dd0: 6f 6d 6d 69 74 20 6d 6f 64 65 20 69 73 20 72 65 ommit mode is re
5de0: 2d 65 6e 61 62 6c 65 64 20 62 79 20 61 20 43 4f -enabled by a CO
5df0: 4d 4d 49 54 20 6f 72 20 52 4f 4c 4c 42 41 43 4b MMIT or ROLLBACK
5e00: 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d ... /// </sum
5e10: 6d 61 72 79 3e 0d 0a 20 20 20 20 69 6e 74 65 72 mary>.. inter
5e20: 6e 61 6c 20 61 62 73 74 72 61 63 74 20 62 6f 6f nal abstract boo
5e30: 6c 20 41 75 74 6f 43 6f 6d 6d 69 74 0d 0a 20 20 l AutoCommit..
5e40: 20 20 7b 0d 0a 20 20 20 20 20 20 67 65 74 3b 0d {.. get;.
5e50: 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 69 6e . }.... in
5e60: 74 65 72 6e 61 6c 20 61 62 73 74 72 61 63 74 20 ternal abstract
5e70: 53 51 4c 69 74 65 45 72 72 6f 72 43 6f 64 65 20 SQLiteErrorCode
5e80: 46 69 6c 65 43 6f 6e 74 72 6f 6c 28 73 74 72 69 FileControl(stri
5e90: 6e 67 20 7a 44 62 4e 61 6d 65 2c 20 69 6e 74 20 ng zDbName, int
5ea0: 6f 70 2c 20 49 6e 74 50 74 72 20 70 41 72 67 29 op, IntPtr pArg)
5eb0: 3b 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 ;.... /// <su
5ec0: 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 mmary>.. ///
5ed0: 43 72 65 61 74 65 73 20 61 20 6e 65 77 20 53 51 Creates a new SQ
5ee0: 4c 69 74 65 20 62 61 63 6b 75 70 20 6f 62 6a 65 Lite backup obje
5ef0: 63 74 20 62 61 73 65 64 20 6f 6e 20 74 68 65 20 ct based on the
5f00: 70 72 6f 76 69 64 65 64 20 64 65 73 74 69 6e 61 provided destina
5f10: 74 69 6f 6e 0d 0a 20 20 20 20 2f 2f 2f 20 64 61 tion.. /// da
5f20: 74 61 62 61 73 65 20 63 6f 6e 6e 65 63 74 69 6f tabase connectio
5f30: 6e 2e 20 20 54 68 65 20 73 6f 75 72 63 65 20 64 n. The source d
5f40: 61 74 61 62 61 73 65 20 63 6f 6e 6e 65 63 74 69 atabase connecti
5f50: 6f 6e 20 69 73 20 74 68 65 20 6f 6e 65 0d 0a 20 on is the one..
5f60: 20 20 20 2f 2f 2f 20 61 73 73 6f 63 69 61 74 65 /// associate
5f70: 64 20 77 69 74 68 20 74 68 69 73 20 6f 62 6a 65 d with this obje
5f80: 63 74 2e 20 20 54 68 65 20 73 6f 75 72 63 65 20 ct. The source
5f90: 61 6e 64 20 64 65 73 74 69 6e 61 74 69 6f 6e 20 and destination
5fa0: 64 61 74 61 62 61 73 65 0d 0a 20 20 20 20 2f 2f database.. //
5fb0: 2f 20 63 6f 6e 6e 65 63 74 69 6f 6e 73 20 63 61 / connections ca
5fc0: 6e 6e 6f 74 20 62 65 20 74 68 65 20 73 61 6d 65 nnot be the same
5fd0: 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d ... /// </sum
5fe0: 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c mary>.. /// <
5ff0: 70 61 72 61 6d 20 6e 61 6d 65 3d 22 64 65 73 74 param name="dest
6000: 43 6e 6e 22 3e 54 68 65 20 64 65 73 74 69 6e 61 Cnn">The destina
6010: 74 69 6f 6e 20 64 61 74 61 62 61 73 65 20 63 6f tion database co
6020: 6e 6e 65 63 74 69 6f 6e 2e 3c 2f 70 61 72 61 6d nnection.</param
6030: 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 >.. /// <para
6040: 6d 20 6e 61 6d 65 3d 22 64 65 73 74 4e 61 6d 65 m name="destName
6050: 22 3e 54 68 65 20 64 65 73 74 69 6e 61 74 69 6f ">The destinatio
6060: 6e 20 64 61 74 61 62 61 73 65 20 6e 61 6d 65 2e n database name.
6070: 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 2f 2f </param>.. //
6080: 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 73 / <param name="s
6090: 6f 75 72 63 65 4e 61 6d 65 22 3e 54 68 65 20 73 ourceName">The s
60a0: 6f 75 72 63 65 20 64 61 74 61 62 61 73 65 20 6e ource database n
60b0: 61 6d 65 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 ame.</param>..
60c0: 20 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 3e 54 /// <returns>T
60d0: 68 65 20 6e 65 77 6c 79 20 63 72 65 61 74 65 64 he newly created
60e0: 20 62 61 63 6b 75 70 20 6f 62 6a 65 63 74 2e 3c backup object.<
60f0: 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 69 /returns>.. i
6100: 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 61 63 74 nternal abstract
6110: 20 53 51 4c 69 74 65 42 61 63 6b 75 70 20 49 6e SQLiteBackup In
6120: 69 74 69 61 6c 69 7a 65 42 61 63 6b 75 70 28 0d itializeBackup(.
6130: 0a 20 20 20 20 20 20 20 20 53 51 4c 69 74 65 43 . SQLiteC
6140: 6f 6e 6e 65 63 74 69 6f 6e 20 64 65 73 74 43 6e onnection destCn
6150: 6e 2c 20 73 74 72 69 6e 67 20 64 65 73 74 4e 61 n, string destNa
6160: 6d 65 2c 0d 0a 20 20 20 20 20 20 20 20 73 74 72 me,.. str
6170: 69 6e 67 20 73 6f 75 72 63 65 4e 61 6d 65 29 3b ing sourceName);
6180: 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d .... /// <sum
6190: 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 43 mary>.. /// C
61a0: 6f 70 69 65 73 20 75 70 20 74 6f 20 4e 20 70 61 opies up to N pa
61b0: 67 65 73 20 66 72 6f 6d 20 74 68 65 20 73 6f 75 ges from the sou
61c0: 72 63 65 20 64 61 74 61 62 61 73 65 20 74 6f 20 rce database to
61d0: 74 68 65 20 64 65 73 74 69 6e 61 74 69 6f 6e 0d the destination.
61e0: 0a 20 20 20 20 2f 2f 2f 20 64 61 74 61 62 61 73 . /// databas
61f0: 65 20 61 73 73 6f 63 69 61 74 65 64 20 77 69 74 e associated wit
6200: 68 20 74 68 65 20 73 70 65 63 69 66 69 65 64 20 h the specified
6210: 62 61 63 6b 75 70 20 6f 62 6a 65 63 74 2e 0d 0a backup object...
6220: 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 /// </summar
6230: 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 70 61 72 y>.. /// <par
6240: 61 6d 20 6e 61 6d 65 3d 22 62 61 63 6b 75 70 22 am name="backup"
6250: 3e 54 68 65 20 62 61 63 6b 75 70 20 6f 62 6a 65 >The backup obje
6260: 63 74 20 74 6f 20 75 73 65 2e 3c 2f 70 61 72 61 ct to use.</para
6270: 6d 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 70 61 72 m>.. /// <par
6280: 61 6d 20 6e 61 6d 65 3d 22 6e 50 61 67 65 22 3e am name="nPage">
6290: 0d 0a 20 20 20 20 2f 2f 2f 20 54 68 65 20 6e 75 .. /// The nu
62a0: 6d 62 65 72 20 6f 66 20 70 61 67 65 73 20 74 6f mber of pages to
62b0: 20 63 6f 70 79 20 6f 72 20 6e 65 67 61 74 69 76 copy or negativ
62c0: 65 20 74 6f 20 63 6f 70 79 20 61 6c 6c 20 72 65 e to copy all re
62d0: 6d 61 69 6e 69 6e 67 20 70 61 67 65 73 2e 0d 0a maining pages...
62e0: 20 20 20 20 2f 2f 2f 20 3c 2f 70 61 72 61 6d 3e /// </param>
62f0: 0d 0a 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d .. /// <param
6300: 20 6e 61 6d 65 3d 22 72 65 74 72 79 22 3e 0d 0a name="retry">..
6310: 20 20 20 20 2f 2f 2f 20 53 65 74 20 74 6f 20 74 /// Set to t
6320: 72 75 65 20 69 66 20 74 68 65 20 6f 70 65 72 61 rue if the opera
6330: 74 69 6f 6e 20 6e 65 65 64 73 20 74 6f 20 62 65 tion needs to be
6340: 20 72 65 74 72 69 65 64 20 64 75 65 20 74 6f 20 retried due to
6350: 64 61 74 61 62 61 73 65 0d 0a 20 20 20 20 2f 2f database.. //
6360: 2f 20 6c 6f 63 6b 69 6e 67 20 69 73 73 75 65 73 / locking issues
6370: 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 70 61 72 ... /// </par
6380: 61 6d 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 72 65 am>.. /// <re
6390: 74 75 72 6e 73 3e 0d 0a 20 20 20 20 2f 2f 2f 20 turns>.. ///
63a0: 54 72 75 65 20 69 66 20 74 68 65 72 65 20 61 72 True if there ar
63b0: 65 20 6d 6f 72 65 20 70 61 67 65 73 20 74 6f 20 e more pages to
63c0: 62 65 20 63 6f 70 69 65 64 2c 20 66 61 6c 73 65 be copied, false
63d0: 20 6f 74 68 65 72 77 69 73 65 2e 0d 0a 20 20 20 otherwise...
63e0: 20 2f 2f 2f 20 3c 2f 72 65 74 75 72 6e 73 3e 0d /// </returns>.
63f0: 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 . internal ab
6400: 73 74 72 61 63 74 20 62 6f 6f 6c 20 53 74 65 70 stract bool Step
6410: 42 61 63 6b 75 70 28 53 51 4c 69 74 65 42 61 63 Backup(SQLiteBac
6420: 6b 75 70 20 62 61 63 6b 75 70 2c 20 69 6e 74 20 kup backup, int
6430: 6e 50 61 67 65 2c 20 72 65 66 20 62 6f 6f 6c 20 nPage, ref bool
6440: 72 65 74 72 79 29 3b 0d 0a 0d 0a 20 20 20 20 2f retry);.... /
6450: 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 // <summary>..
6460: 20 20 2f 2f 2f 20 52 65 74 75 72 6e 73 20 74 68 /// Returns th
6470: 65 20 6e 75 6d 62 65 72 20 6f 66 20 70 61 67 65 e number of page
6480: 73 20 72 65 6d 61 69 6e 69 6e 67 20 74 6f 20 62 s remaining to b
6490: 65 20 63 6f 70 69 65 64 20 66 72 6f 6d 20 74 68 e copied from th
64a0: 65 20 73 6f 75 72 63 65 0d 0a 20 20 20 20 2f 2f e source.. //
64b0: 2f 20 64 61 74 61 62 61 73 65 20 74 6f 20 74 68 / database to th
64c0: 65 20 64 65 73 74 69 6e 61 74 69 6f 6e 20 64 61 e destination da
64d0: 74 61 62 61 73 65 20 61 73 73 6f 63 69 61 74 65 tabase associate
64e0: 64 20 77 69 74 68 20 74 68 65 20 73 70 65 63 69 d with the speci
64f0: 66 69 65 64 0d 0a 20 20 20 20 2f 2f 2f 20 62 61 fied.. /// ba
6500: 63 6b 75 70 20 6f 62 6a 65 63 74 2e 0d 0a 20 20 ckup object...
6510: 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e /// </summary>
6520: 0d 0a 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d .. /// <param
6530: 20 6e 61 6d 65 3d 22 62 61 63 6b 75 70 22 3e 54 name="backup">T
6540: 68 65 20 62 61 63 6b 75 70 20 6f 62 6a 65 63 74 he backup object
6550: 20 74 6f 20 63 68 65 63 6b 2e 3c 2f 70 61 72 61 to check.</para
6560: 6d 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 72 65 74 m>.. /// <ret
6570: 75 72 6e 73 3e 54 68 65 20 6e 75 6d 62 65 72 20 urns>The number
6580: 6f 66 20 70 61 67 65 73 20 72 65 6d 61 69 6e 69 of pages remaini
6590: 6e 67 20 74 6f 20 62 65 20 63 6f 70 69 65 64 2e ng to be copied.
65a0: 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 </returns>..
65b0: 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 61 63 internal abstrac
65c0: 74 20 69 6e 74 20 52 65 6d 61 69 6e 69 6e 67 42 t int RemainingB
65d0: 61 63 6b 75 70 28 53 51 4c 69 74 65 42 61 63 6b ackup(SQLiteBack
65e0: 75 70 20 62 61 63 6b 75 70 29 3b 0d 0a 0d 0a 20 up backup);....
65f0: 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e /// <summary>
6600: 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 74 75 72 6e .. /// Return
6610: 73 20 74 68 65 20 74 6f 74 61 6c 20 6e 75 6d 62 s the total numb
6620: 65 72 20 6f 66 20 70 61 67 65 73 20 69 6e 20 74 er of pages in t
6630: 68 65 20 73 6f 75 72 63 65 20 64 61 74 61 62 61 he source databa
6640: 73 65 20 61 73 73 6f 63 69 61 74 65 64 0d 0a 20 se associated..
6650: 20 20 20 2f 2f 2f 20 77 69 74 68 20 74 68 65 20 /// with the
6660: 73 70 65 63 69 66 69 65 64 20 62 61 63 6b 75 70 specified backup
6670: 20 6f 62 6a 65 63 74 2e 0d 0a 20 20 20 20 2f 2f object... //
6680: 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 / </summary>..
6690: 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d /// <param nam
66a0: 65 3d 22 62 61 63 6b 75 70 22 3e 54 68 65 20 62 e="backup">The b
66b0: 61 63 6b 75 70 20 6f 62 6a 65 63 74 20 74 6f 20 ackup object to
66c0: 63 68 65 63 6b 2e 3c 2f 70 61 72 61 6d 3e 0d 0a check.</param>..
66d0: 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 /// <returns
66e0: 3e 54 68 65 20 74 6f 74 61 6c 20 6e 75 6d 62 65 >The total numbe
66f0: 72 20 6f 66 20 70 61 67 65 73 20 69 6e 20 74 68 r of pages in th
6700: 65 20 73 6f 75 72 63 65 20 64 61 74 61 62 61 73 e source databas
6710: 65 2e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 20 e.</returns>..
6720: 20 20 69 6e 74 65 72 6e 61 6c 20 61 62 73 74 72 internal abstr
6730: 61 63 74 20 69 6e 74 20 50 61 67 65 43 6f 75 6e act int PageCoun
6740: 74 42 61 63 6b 75 70 28 53 51 4c 69 74 65 42 61 tBackup(SQLiteBa
6750: 63 6b 75 70 20 62 61 63 6b 75 70 29 3b 0d 0a 0d ckup backup);...
6760: 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 . /// <summar
6770: 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 44 65 73 74 y>.. /// Dest
6780: 72 6f 79 73 20 74 68 65 20 62 61 63 6b 75 70 20 roys the backup
6790: 6f 62 6a 65 63 74 2c 20 72 6f 6c 6c 69 6e 67 20 object, rolling
67a0: 62 61 63 6b 20 61 6e 79 20 62 61 63 6b 75 70 20 back any backup
67b0: 74 68 61 74 20 6d 61 79 20 62 65 20 69 6e 0d 0a that may be in..
67c0: 20 20 20 20 2f 2f 2f 20 70 72 6f 67 65 73 73 2e /// progess.
67d0: 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d .. /// </summ
67e0: 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 70 ary>.. /// <p
67f0: 61 72 61 6d 20 6e 61 6d 65 3d 22 62 61 63 6b 75 aram name="backu
6800: 70 22 3e 54 68 65 20 62 61 63 6b 75 70 20 6f 62 p">The backup ob
6810: 6a 65 63 74 20 74 6f 20 64 65 73 74 72 6f 79 2e ject to destroy.
6820: 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 69 6e </param>.. in
6830: 74 65 72 6e 61 6c 20 61 62 73 74 72 61 63 74 20 ternal abstract
6840: 76 6f 69 64 20 46 69 6e 69 73 68 42 61 63 6b 75 void FinishBacku
6850: 70 28 53 51 4c 69 74 65 42 61 63 6b 75 70 20 62 p(SQLiteBackup b
6860: 61 63 6b 75 70 29 3b 0d 0a 0d 0a 20 20 20 20 2f ackup);.... /
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 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
68c0: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 0d 0a //////////////..
68d0: 0d 0a 20 20 20 20 23 72 65 67 69 6f 6e 20 49 44 .. #region ID
68e0: 69 73 70 6f 73 61 62 6c 65 20 4d 65 6d 62 65 72 isposable Member
68f0: 73 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 76 6f s.. public vo
6900: 69 64 20 44 69 73 70 6f 73 65 28 29 0d 0a 20 20 id Dispose()..
6910: 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 44 69 73 {.. Dis
6920: 70 6f 73 65 28 74 72 75 65 29 3b 0d 0a 20 20 20 pose(true);..
6930: 20 20 20 20 20 47 43 2e 53 75 70 70 72 65 73 73 GC.Suppress
6940: 46 69 6e 61 6c 69 7a 65 28 74 68 69 73 29 3b 0d Finalize(this);.
6950: 0a 20 20 20 20 7d 0d 0a 20 20 20 20 23 65 6e 64 . }.. #end
6960: 72 65 67 69 6f 6e 0d 0a 0d 0a 20 20 20 20 2f 2f region.... //
6970: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
6980: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
6990: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
69a0: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
69b0: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
69c0: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 0d 0a 0d /////////////...
69d0: 0a 20 20 20 20 23 72 65 67 69 6f 6e 20 49 44 69 . #region IDi
69e0: 73 70 6f 73 61 62 6c 65 20 22 50 61 74 74 65 72 sposable "Patter
69f0: 6e 22 20 4d 65 6d 62 65 72 73 0d 0a 20 20 20 20 n" Members..
6a00: 70 72 69 76 61 74 65 20 62 6f 6f 6c 20 64 69 73 private bool dis
6a10: 70 6f 73 65 64 3b 0d 0a 20 20 20 20 70 72 69 76 posed;.. priv
6a20: 61 74 65 20 76 6f 69 64 20 43 68 65 63 6b 44 69 ate void CheckDi
6a30: 73 70 6f 73 65 64 28 29 20 2f 2a 20 74 68 72 6f sposed() /* thro
6a40: 77 20 2a 2f 0d 0a 20 20 20 20 7b 0d 0a 23 69 66 w */.. {..#if
6a50: 20 54 48 52 4f 57 5f 4f 4e 5f 44 49 53 50 4f 53 THROW_ON_DISPOS
6a60: 45 44 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 ED.. if (
6a70: 64 69 73 70 6f 73 65 64 29 0d 0a 20 20 20 20 20 disposed)..
6a80: 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 throw new
6a90: 20 4f 62 6a 65 63 74 44 69 73 70 6f 73 65 64 45 ObjectDisposedE
6aa0: 78 63 65 70 74 69 6f 6e 28 74 79 70 65 6f 66 28 xception(typeof(
6ab0: 53 51 4c 69 74 65 42 61 73 65 29 2e 4e 61 6d 65 SQLiteBase).Name
6ac0: 29 3b 0d 0a 23 65 6e 64 69 66 0d 0a 20 20 20 20 );..#endif..
6ad0: 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 2f 2f 2f 2f }.... ///////
6ae0: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
6af0: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
6b00: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
6b10: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
6b20: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
6b30: 2f 2f 2f 2f 2f 2f 2f 2f 0d 0a 0d 0a 20 20 20 20 ////////....
6b40: 70 72 6f 74 65 63 74 65 64 20 76 69 72 74 75 61 protected virtua
6b50: 6c 20 76 6f 69 64 20 44 69 73 70 6f 73 65 28 62 l void Dispose(b
6b60: 6f 6f 6c 20 64 69 73 70 6f 73 69 6e 67 29 0d 0a ool disposing)..
6b70: 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 {.. i
6b80: 66 20 28 21 64 69 73 70 6f 73 65 64 29 0d 0a 20 f (!disposed)..
6b90: 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 {..
6ba0: 20 20 20 20 20 20 2f 2f 69 66 20 28 64 69 73 70 //if (disp
6bb0: 6f 73 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 osing)..
6bc0: 20 20 20 20 2f 2f 7b 0d 0a 20 20 20 20 20 20 20 //{..
6bd0: 20 20 20 20 20 2f 2f 20 20 20 20 2f 2f 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 0d ///////////////.
6c00: 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 . //
6c10: 20 20 20 2f 2f 20 64 69 73 70 6f 73 65 20 6d 61 // dispose ma
6c20: 6e 61 67 65 64 20 72 65 73 6f 75 72 63 65 73 20 naged resources
6c30: 68 65 72 65 2e 2e 2e 0d 0a 20 20 20 20 20 20 20 here.....
6c40: 20 20 20 20 20 2f 2f 20 20 20 20 2f 2f 2f 2f 2f // /////
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 0d ///////////////.
6c70: 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 7d . //}
6c80: 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ....
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 2f 2f 2f 2f ////////////////
6cb0: 2f 2f 2f 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 20 //////..
6cc0: 20 20 20 20 2f 2f 20 72 65 6c 65 61 73 65 20 75 // release u
6cd0: 6e 6d 61 6e 61 67 65 64 20 72 65 73 6f 75 72 63 nmanaged resourc
6ce0: 65 73 20 68 65 72 65 2e 2e 2e 0d 0a 20 20 20 20 es here.....
6cf0: 20 20 20 20 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f ////////
6d00: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
6d10: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 0d 0a //////////////..
6d20: 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 64 69 .. di
6d30: 73 70 6f 73 65 64 20 3d 20 74 72 75 65 3b 0d 0a sposed = true;..
6d40: 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 7d }.. }
6d50: 0d 0a 20 20 20 20 23 65 6e 64 72 65 67 69 6f 6e .. #endregion
6d60: 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f .... ////////
6d70: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
6d80: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
6d90: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
6da0: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
6db0: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
6dc0: 2f 2f 2f 2f 2f 2f 2f 0d 0a 0d 0a 20 20 20 20 23 ///////.... #
6dd0: 72 65 67 69 6f 6e 20 44 65 73 74 72 75 63 74 6f region Destructo
6de0: 72 0d 0a 20 20 20 20 7e 53 51 4c 69 74 65 42 61 r.. ~SQLiteBa
6df0: 73 65 28 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 se().. {..
6e00: 20 20 20 20 20 44 69 73 70 6f 73 65 28 66 61 6c Dispose(fal
6e10: 73 65 29 3b 0d 0a 20 20 20 20 7d 0d 0a 20 20 20 se);.. }..
6e20: 20 23 65 6e 64 72 65 67 69 6f 6e 0d 0a 0d 0a 20 #endregion....
6e30: 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f /////////////
6e40: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
6e50: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
6e60: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
6e70: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
6e80: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
6e90: 2f 2f 0d 0a 0d 0a 20 20 20 20 2f 2f 20 54 68 65 //.... // The
6ea0: 73 65 20 73 74 61 74 69 63 73 20 61 72 65 20 68 se statics are h
6eb0: 65 72 65 20 66 6f 72 20 6c 61 63 6b 20 6f 66 20 ere for lack of
6ec0: 61 20 62 65 74 74 65 72 20 70 6c 61 63 65 20 74 a better place t
6ed0: 6f 20 70 75 74 20 74 68 65 6d 2e 0d 0a 20 20 20 o put them...
6ee0: 20 2f 2f 20 54 68 65 79 20 65 78 69 73 74 20 68 // They exist h
6ef0: 65 72 65 20 62 65 63 61 75 73 65 20 74 68 65 79 ere because they
6f00: 20 61 72 65 20 63 61 6c 6c 65 64 20 64 75 72 69 are called duri
6f10: 6e 67 20 74 68 65 20 66 69 6e 61 6c 69 7a 61 74 ng the finalizat
6f20: 69 6f 6e 20 6f 66 0d 0a 20 20 20 20 2f 2f 20 61 ion of.. // a
6f30: 20 53 51 4c 69 74 65 53 74 61 74 65 6d 65 6e 74 SQLiteStatement
6f40: 48 61 6e 64 6c 65 2c 20 53 51 4c 69 74 65 43 6f Handle, SQLiteCo
6f50: 6e 6e 65 63 74 69 6f 6e 48 61 6e 64 6c 65 2c 20 nnectionHandle,
6f60: 61 6e 64 20 53 51 4c 69 74 65 46 75 6e 63 74 69 and SQLiteFuncti
6f70: 6f 6e 43 6f 6f 6b 69 65 48 61 6e 64 6c 65 2e 0d onCookieHandle..
6f80: 0a 20 20 20 20 2f 2f 20 54 68 65 72 65 66 6f 72 . // Therefor
6f90: 65 20 74 68 65 73 65 20 66 75 6e 63 74 69 6f 6e e these function
6fa0: 73 20 68 61 76 65 20 74 6f 20 62 65 20 73 74 61 s have to be sta
6fb0: 74 69 63 2c 20 61 6e 64 20 68 61 76 65 20 74 6f tic, and have to
6fc0: 20 62 65 20 6c 6f 77 2d 6c 65 76 65 6c 2e 0d 0a be low-level...
6fd0: 0d 0a 20 20 20 20 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f .. //////////
6fe0: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
6ff0: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
7000: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
7010: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
7020: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
7030: 2f 2f 2f 2f 2f 0d 0a 0d 0a 20 20 20 20 70 72 69 /////.... pri
7040: 76 61 74 65 20 73 74 61 74 69 63 20 73 74 72 69 vate static stri
7050: 6e 67 5b 5d 20 5f 65 72 72 6f 72 4d 65 73 73 61 ng[] _errorMessa
7060: 67 65 73 20 3d 20 7b 0d 0a 20 20 20 20 20 20 20 ges = {..
7070: 20 2f 2a 20 53 51 4c 49 54 45 5f 4f 4b 20 20 20 /* SQLITE_OK
7080: 20 20 20 20 20 20 20 2a 2f 20 22 6e 6f 74 20 61 */ "not a
7090: 6e 20 65 72 72 6f 72 22 2c 0d 0a 20 20 20 20 20 n error",..
70a0: 20 20 20 2f 2a 20 53 51 4c 49 54 45 5f 45 52 52 /* SQLITE_ERR
70b0: 4f 52 20 20 20 20 20 20 20 2a 2f 20 22 53 51 4c OR */ "SQL
70c0: 20 6c 6f 67 69 63 20 65 72 72 6f 72 20 6f 72 20 logic error or
70d0: 6d 69 73 73 69 6e 67 20 64 61 74 61 62 61 73 65 missing database
70e0: 22 2c 0d 0a 20 20 20 20 20 20 20 20 2f 2a 20 53 ",.. /* S
70f0: 51 4c 49 54 45 5f 49 4e 54 45 52 4e 41 4c 20 20 QLITE_INTERNAL
7100: 20 20 2a 2f 20 22 69 6e 74 65 72 6e 61 6c 20 6c */ "internal l
7110: 6f 67 69 63 20 65 72 72 6f 72 22 2c 0d 0a 20 20 ogic error",..
7120: 20 20 20 20 20 20 2f 2a 20 53 51 4c 49 54 45 5f /* SQLITE_
7130: 50 45 52 4d 20 20 20 20 20 20 20 20 2a 2f 20 22 PERM */ "
7140: 61 63 63 65 73 73 20 70 65 72 6d 69 73 73 69 6f access permissio
7150: 6e 20 64 65 6e 69 65 64 22 2c 0d 0a 20 20 20 20 n denied",..
7160: 20 20 20 20 2f 2a 20 53 51 4c 49 54 45 5f 41 42 /* SQLITE_AB
7170: 4f 52 54 20 20 20 20 20 20 20 2a 2f 20 22 63 61 ORT */ "ca
7180: 6c 6c 62 61 63 6b 20 72 65 71 75 65 73 74 65 64 llback requested
7190: 20 71 75 65 72 79 20 61 62 6f 72 74 22 2c 0d 0a query abort",..
71a0: 20 20 20 20 20 20 20 20 2f 2a 20 53 51 4c 49 54 /* SQLIT
71b0: 45 5f 42 55 53 59 20 20 20 20 20 20 20 20 2a 2f E_BUSY */
71c0: 20 22 64 61 74 61 62 61 73 65 20 69 73 20 6c 6f "database is lo
71d0: 63 6b 65 64 22 2c 0d 0a 20 20 20 20 20 20 20 20 cked",..
71e0: 2f 2a 20 53 51 4c 49 54 45 5f 4c 4f 43 4b 45 44 /* SQLITE_LOCKED
71f0: 20 20 20 20 20 20 2a 2f 20 22 64 61 74 61 62 61 */ "databa
7200: 73 65 20 74 61 62 6c 65 20 69 73 20 6c 6f 63 6b se table is lock
7210: 65 64 22 2c 0d 0a 20 20 20 20 20 20 20 20 2f 2a ed",.. /*
7220: 20 53 51 4c 49 54 45 5f 4e 4f 4d 45 4d 20 20 20 SQLITE_NOMEM
7230: 20 20 20 20 2a 2f 20 22 6f 75 74 20 6f 66 20 6d */ "out of m
7240: 65 6d 6f 72 79 22 2c 0d 0a 20 20 20 20 20 20 20 emory",..
7250: 20 2f 2a 20 53 51 4c 49 54 45 5f 52 45 41 44 4f /* SQLITE_READO
7260: 4e 4c 59 20 20 20 20 2a 2f 20 22 61 74 74 65 6d NLY */ "attem
7270: 70 74 20 74 6f 20 77 72 69 74 65 20 61 20 72 65 pt to write a re
7280: 61 64 6f 6e 6c 79 20 64 61 74 61 62 61 73 65 22 adonly database"
7290: 2c 0d 0a 20 20 20 20 20 20 20 20 2f 2a 20 53 51 ,.. /* SQ
72a0: 4c 49 54 45 5f 49 4e 54 45 52 52 55 50 54 20 20 LITE_INTERRUPT
72b0: 20 2a 2f 20 22 69 6e 74 65 72 72 75 70 74 65 64 */ "interrupted
72c0: 22 2c 0d 0a 20 20 20 20 20 20 20 20 2f 2a 20 53 ",.. /* S
72d0: 51 4c 49 54 45 5f 49 4f 45 52 52 20 20 20 20 20 QLITE_IOERR
72e0: 20 20 2a 2f 20 22 64 69 73 6b 20 49 2f 4f 20 65 */ "disk I/O e
72f0: 72 72 6f 72 22 2c 0d 0a 20 20 20 20 20 20 20 20 rror",..
7300: 2f 2a 20 53 51 4c 49 54 45 5f 43 4f 52 52 55 50 /* SQLITE_CORRUP
7310: 54 20 20 20 20 20 2a 2f 20 22 64 61 74 61 62 61 T */ "databa
7320: 73 65 20 64 69 73 6b 20 69 6d 61 67 65 20 69 73 se disk image is
7330: 20 6d 61 6c 66 6f 72 6d 65 64 22 2c 0d 0a 20 20 malformed",..
7340: 20 20 20 20 20 20 2f 2a 20 53 51 4c 49 54 45 5f /* SQLITE_
7350: 4e 4f 54 46 4f 55 4e 44 20 20 20 20 2a 2f 20 22 NOTFOUND */ "
7360: 75 6e 6b 6e 6f 77 6e 20 6f 70 65 72 61 74 69 6f unknown operatio
7370: 6e 22 2c 0d 0a 20 20 20 20 20 20 20 20 2f 2a 20 n",.. /*
7380: 53 51 4c 49 54 45 5f 46 55 4c 4c 20 20 20 20 20 SQLITE_FULL
7390: 20 20 20 2a 2f 20 22 64 61 74 61 62 61 73 65 20 */ "database
73a0: 6f 72 20 64 69 73 6b 20 69 73 20 66 75 6c 6c 22 or disk is full"
73b0: 2c 0d 0a 20 20 20 20 20 20 20 20 2f 2a 20 53 51 ,.. /* SQ
73c0: 4c 49 54 45 5f 43 41 4e 54 4f 50 45 4e 20 20 20 LITE_CANTOPEN
73d0: 20 2a 2f 20 22 75 6e 61 62 6c 65 20 74 6f 20 6f */ "unable to o
73e0: 70 65 6e 20 64 61 74 61 62 61 73 65 20 66 69 6c pen database fil
73f0: 65 22 2c 0d 0a 20 20 20 20 20 20 20 20 2f 2a 20 e",.. /*
7400: 53 51 4c 49 54 45 5f 50 52 4f 54 4f 43 4f 4c 20 SQLITE_PROTOCOL
7410: 20 20 20 2a 2f 20 22 6c 6f 63 6b 69 6e 67 20 70 */ "locking p
7420: 72 6f 74 6f 63 6f 6c 22 2c 0d 0a 20 20 20 20 20 rotocol",..
7430: 20 20 20 2f 2a 20 53 51 4c 49 54 45 5f 45 4d 50 /* SQLITE_EMP
7440: 54 59 20 20 20 20 20 20 20 2a 2f 20 22 74 61 62 TY */ "tab
7450: 6c 65 20 63 6f 6e 74 61 69 6e 73 20 6e 6f 20 64 le contains no d
7460: 61 74 61 22 2c 0d 0a 20 20 20 20 20 20 20 20 2f ata",.. /
7470: 2a 20 53 51 4c 49 54 45 5f 53 43 48 45 4d 41 20 * SQLITE_SCHEMA
7480: 20 20 20 20 20 2a 2f 20 22 64 61 74 61 62 61 73 */ "databas
7490: 65 20 73 63 68 65 6d 61 20 68 61 73 20 63 68 61 e schema has cha
74a0: 6e 67 65 64 22 2c 0d 0a 20 20 20 20 20 20 20 20 nged",..
74b0: 2f 2a 20 53 51 4c 49 54 45 5f 54 4f 4f 42 49 47 /* SQLITE_TOOBIG
74c0: 20 20 20 20 20 20 2a 2f 20 22 73 74 72 69 6e 67 */ "string
74d0: 20 6f 72 20 62 6c 6f 62 20 74 6f 6f 20 62 69 67 or blob too big
74e0: 22 2c 0d 0a 20 20 20 20 20 20 20 20 2f 2a 20 53 ",.. /* S
74f0: 51 4c 49 54 45 5f 43 4f 4e 53 54 52 41 49 4e 54 QLITE_CONSTRAINT
7500: 20 20 2a 2f 20 22 63 6f 6e 73 74 72 61 69 6e 74 */ "constraint
7510: 20 66 61 69 6c 65 64 22 2c 0d 0a 20 20 20 20 20 failed",..
7520: 20 20 20 2f 2a 20 53 51 4c 49 54 45 5f 4d 49 53 /* SQLITE_MIS
7530: 4d 41 54 43 48 20 20 20 20 2a 2f 20 22 64 61 74 MATCH */ "dat
7540: 61 74 79 70 65 20 6d 69 73 6d 61 74 63 68 22 2c atype mismatch",
7550: 0d 0a 20 20 20 20 20 20 20 20 2f 2a 20 53 51 4c .. /* SQL
7560: 49 54 45 5f 4d 49 53 55 53 45 20 20 20 20 20 20 ITE_MISUSE
7570: 2a 2f 20 22 6c 69 62 72 61 72 79 20 72 6f 75 74 */ "library rout
7580: 69 6e 65 20 63 61 6c 6c 65 64 20 6f 75 74 20 6f ine called out o
7590: 66 20 73 65 71 75 65 6e 63 65 22 2c 0d 0a 20 20 f sequence",..
75a0: 20 20 20 20 20 20 2f 2a 20 53 51 4c 49 54 45 5f /* SQLITE_
75b0: 4e 4f 4c 46 53 20 20 20 20 20 20 20 2a 2f 20 22 NOLFS */ "
75c0: 6c 61 72 67 65 20 66 69 6c 65 20 73 75 70 70 6f large file suppo
75d0: 72 74 20 69 73 20 64 69 73 61 62 6c 65 64 22 2c rt is disabled",
75e0: 0d 0a 20 20 20 20 20 20 20 20 2f 2a 20 53 51 4c .. /* SQL
75f0: 49 54 45 5f 41 55 54 48 20 20 20 20 20 20 20 20 ITE_AUTH
7600: 2a 2f 20 22 61 75 74 68 6f 72 69 7a 61 74 69 6f */ "authorizatio
7610: 6e 20 64 65 6e 69 65 64 22 2c 0d 0a 20 20 20 20 n denied",..
7620: 20 20 20 20 2f 2a 20 53 51 4c 49 54 45 5f 46 4f /* SQLITE_FO
7630: 52 4d 41 54 20 20 20 20 20 20 2a 2f 20 22 61 75 RMAT */ "au
7640: 78 69 6c 69 61 72 79 20 64 61 74 61 62 61 73 65 xiliary database
7650: 20 66 6f 72 6d 61 74 20 65 72 72 6f 72 22 2c 0d format error",.
7660: 0a 20 20 20 20 20 20 20 20 2f 2a 20 53 51 4c 49 . /* SQLI
7670: 54 45 5f 52 41 4e 47 45 20 20 20 20 20 20 20 2a TE_RANGE *
7680: 2f 20 22 62 69 6e 64 20 6f 72 20 63 6f 6c 75 6d / "bind or colum
7690: 6e 20 69 6e 64 65 78 20 6f 75 74 20 6f 66 20 72 n index out of r
76a0: 61 6e 67 65 22 2c 0d 0a 20 20 20 20 20 20 20 20 ange",..
76b0: 2f 2a 20 53 51 4c 49 54 45 5f 4e 4f 54 41 44 42 /* SQLITE_NOTADB
76c0: 20 20 20 20 20 20 2a 2f 20 22 66 69 6c 65 20 69 */ "file i
76d0: 73 20 65 6e 63 72 79 70 74 65 64 20 6f 72 20 69 s encrypted or i
76e0: 73 20 6e 6f 74 20 61 20 64 61 74 61 62 61 73 65 s not a database
76f0: 22 2c 0d 0a 20 20 20 20 20 20 20 20 2f 2a 20 53 ",.. /* S
7700: 51 4c 49 54 45 5f 4e 4f 54 49 43 45 20 20 20 20 QLITE_NOTICE
7710: 20 20 2a 2f 20 22 6e 6f 74 69 66 69 63 61 74 69 */ "notificati
7720: 6f 6e 20 6d 65 73 73 61 67 65 22 2c 0d 0a 20 20 on message",..
7730: 20 20 20 20 20 20 2f 2a 20 53 51 4c 49 54 45 5f /* SQLITE_
7740: 57 41 52 4e 49 4e 47 20 20 20 20 20 2a 2f 20 22 WARNING */ "
7750: 77 61 72 6e 69 6e 67 20 6d 65 73 73 61 67 65 22 warning message"
7760: 0d 0a 20 20 20 20 7d 3b 0d 0a 0d 0a 20 20 20 20 .. };....
7770: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
7780: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
7790: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
77a0: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
77b0: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
77c0: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 0d ///////////////.
77d0: 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d ... /// <summ
77e0: 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 52 65 ary>.. /// Re
77f0: 74 75 72 6e 73 20 74 68 65 20 65 72 72 6f 72 20 turns the error
7800: 6d 65 73 73 61 67 65 20 66 6f 72 20 74 68 65 20 message for the
7810: 73 70 65 63 69 66 69 65 64 20 53 51 4c 69 74 65 specified SQLite
7820: 20 72 65 74 75 72 6e 20 63 6f 64 65 20 75 73 69 return code usi
7830: 6e 67 0d 0a 20 20 20 20 2f 2f 2f 20 74 68 65 20 ng.. /// the
7840: 69 6e 74 65 72 6e 61 6c 20 73 74 61 74 69 63 20 internal static
7850: 6c 6f 6f 6b 75 70 20 74 61 62 6c 65 2e 0d 0a 20 lookup table...
7860: 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 /// </summary
7870: 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 >.. /// <para
7880: 6d 20 6e 61 6d 65 3d 22 72 63 22 3e 54 68 65 20 m name="rc">The
7890: 53 51 4c 69 74 65 20 72 65 74 75 72 6e 20 63 6f SQLite return co
78a0: 64 65 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 de.</param>..
78b0: 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 3e 54 68 /// <returns>Th
78c0: 65 20 65 72 72 6f 72 20 6d 65 73 73 61 67 65 20 e error message
78d0: 6f 72 20 6e 75 6c 6c 20 69 66 20 69 74 20 63 61 or null if it ca
78e0: 6e 6e 6f 74 20 62 65 20 66 6f 75 6e 64 2e 3c 2f nnot be found.</
78f0: 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 70 72 returns>.. pr
7900: 6f 74 65 63 74 65 64 20 73 74 61 74 69 63 20 73 otected static s
7910: 74 72 69 6e 67 20 46 61 6c 6c 62 61 63 6b 47 65 tring FallbackGe
7920: 74 45 72 72 6f 72 53 74 72 69 6e 67 28 53 51 4c tErrorString(SQL
7930: 69 74 65 45 72 72 6f 72 43 6f 64 65 20 72 63 29 iteErrorCode rc)
7940: 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 .. {..
7950: 20 69 66 20 28 5f 65 72 72 6f 72 4d 65 73 73 61 if (_errorMessa
7960: 67 65 73 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 ges == null)..
7970: 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e return
7980: 20 6e 75 6c 6c 3b 0d 0a 0d 0a 20 20 20 20 20 20 null;....
7990: 20 20 69 6e 74 20 69 6e 64 65 78 20 3d 20 28 69 int index = (i
79a0: 6e 74 29 72 63 3b 0d 0a 0d 0a 20 20 20 20 20 20 nt)rc;....
79b0: 20 20 69 66 20 28 28 69 6e 64 65 78 20 3c 20 30 if ((index < 0
79c0: 29 20 7c 7c 20 28 69 6e 64 65 78 20 3e 3d 20 5f ) || (index >= _
79d0: 65 72 72 6f 72 4d 65 73 73 61 67 65 73 2e 4c 65 errorMessages.Le
79e0: 6e 67 74 68 29 29 0d 0a 20 20 20 20 20 20 20 20 ngth))..
79f0: 20 20 20 20 69 6e 64 65 78 20 3d 20 28 69 6e 74 index = (int
7a00: 29 53 51 4c 69 74 65 45 72 72 6f 72 43 6f 64 65 )SQLiteErrorCode
7a10: 2e 45 72 72 6f 72 3b 20 2f 2a 20 4d 61 6b 65 20 .Error; /* Make
7a20: 69 6e 74 6f 20 67 65 6e 65 72 69 63 20 65 72 72 into generic err
7a30: 6f 72 2e 20 2a 2f 0d 0a 0d 0a 20 20 20 20 20 20 or. */....
7a40: 20 20 72 65 74 75 72 6e 20 5f 65 72 72 6f 72 4d return _errorM
7a50: 65 73 73 61 67 65 73 5b 69 6e 64 65 78 5d 3b 0d essages[index];.
7a60: 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 69 6e . }.... in
7a70: 74 65 72 6e 61 6c 20 73 74 61 74 69 63 20 73 74 ternal static st
7a80: 72 69 6e 67 20 47 65 74 4c 61 73 74 45 72 72 6f ring GetLastErro
7a90: 72 28 53 51 4c 69 74 65 43 6f 6e 6e 65 63 74 69 r(SQLiteConnecti
7aa0: 6f 6e 48 61 6e 64 6c 65 20 68 64 6c 2c 20 49 6e onHandle hdl, In
7ab0: 74 50 74 72 20 64 62 29 0d 0a 20 20 20 20 7b 0d tPtr db).. {.
7ac0: 0a 20 20 20 20 20 20 20 20 69 66 20 28 28 68 64 . if ((hd
7ad0: 6c 20 3d 3d 20 6e 75 6c 6c 29 20 7c 7c 20 28 64 l == null) || (d
7ae0: 62 20 3d 3d 20 49 6e 74 50 74 72 2e 5a 65 72 6f b == IntPtr.Zero
7af0: 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ))..
7b00: 72 65 74 75 72 6e 20 22 6e 75 6c 6c 20 63 6f 6e return "null con
7b10: 6e 65 63 74 69 6f 6e 20 6f 72 20 64 61 74 61 62 nection or datab
7b20: 61 73 65 20 68 61 6e 64 6c 65 22 3b 0d 0a 0d 0a ase handle";....
7b30: 20 20 20 20 20 20 20 20 73 74 72 69 6e 67 20 72 string r
7b40: 65 73 75 6c 74 20 3d 20 6e 75 6c 6c 3b 0d 0a 0d esult = null;...
7b50: 0a 20 20 20 20 20 20 20 20 74 72 79 0d 0a 20 20 . try..
7b60: 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 {..
7b70: 20 20 20 20 20 2f 2f 20 64 6f 20 6e 6f 74 68 69 // do nothi
7b80: 6e 67 2e 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a ng... }..
7b90: 20 20 20 20 20 20 20 20 66 69 6e 61 6c 6c 79 20 finally
7ba0: 2f 2a 20 4e 4f 54 45 3a 20 54 68 72 65 61 64 2e /* NOTE: Thread.
7bb0: 41 62 6f 72 74 28 29 20 70 72 6f 74 65 63 74 69 Abort() protecti
7bc0: 6f 6e 2e 20 2a 2f 0d 0a 20 20 20 20 20 20 20 20 on. */..
7bd0: 7b 0d 0a 23 69 66 20 50 4c 41 54 46 4f 52 4d 5f {..#if PLATFORM_
7be0: 43 4f 4d 50 41 43 54 46 52 41 4d 45 57 4f 52 4b COMPACTFRAMEWORK
7bf0: 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6c 6f .. lo
7c00: 63 6b 20 28 68 64 6c 2e 73 79 6e 63 52 6f 6f 74 ck (hdl.syncRoot
7c10: 29 0d 0a 23 65 6c 73 65 0d 0a 20 20 20 20 20 20 )..#else..
7c20: 20 20 20 20 20 20 6c 6f 63 6b 20 28 68 64 6c 29 lock (hdl)
7c30: 0d 0a 23 65 6e 64 69 66 0d 0a 20 20 20 20 20 20 ..#endif..
7c40: 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 {..
7c50: 20 20 20 20 20 20 20 20 20 69 66 20 28 21 68 64 if (!hd
7c60: 6c 2e 49 73 49 6e 76 61 6c 69 64 20 26 26 20 21 l.IsInvalid && !
7c70: 68 64 6c 2e 49 73 43 6c 6f 73 65 64 29 0d 0a 20 hdl.IsClosed)..
7c80: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b {
7c90: 0d 0a 23 69 66 20 21 53 51 4c 49 54 45 5f 53 54 ..#if !SQLITE_ST
7ca0: 41 4e 44 41 52 44 0d 0a 20 20 20 20 20 20 20 20 ANDARD..
7cb0: 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 74 20 int
7cc0: 6c 65 6e 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 len = 0;..
7cd0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 re
7ce0: 73 75 6c 74 20 3d 20 55 54 46 38 54 6f 53 74 72 sult = UTF8ToStr
7cf0: 69 6e 67 28 55 6e 73 61 66 65 4e 61 74 69 76 65 ing(UnsafeNative
7d00: 4d 65 74 68 6f 64 73 2e 73 71 6c 69 74 65 33 5f Methods.sqlite3_
7d10: 65 72 72 6d 73 67 5f 69 6e 74 65 72 6f 70 28 64 errmsg_interop(d
7d20: 62 2c 20 72 65 66 20 6c 65 6e 29 2c 20 6c 65 6e b, ref len), len
7d30: 29 3b 0d 0a 23 65 6c 73 65 0d 0a 20 20 20 20 20 );..#else..
7d40: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 r
7d50: 65 73 75 6c 74 20 3d 20 55 54 46 38 54 6f 53 74 esult = UTF8ToSt
7d60: 72 69 6e 67 28 55 6e 73 61 66 65 4e 61 74 69 76 ring(UnsafeNativ
7d70: 65 4d 65 74 68 6f 64 73 2e 73 71 6c 69 74 65 33 eMethods.sqlite3
7d80: 5f 65 72 72 6d 73 67 28 64 62 29 2c 20 2d 31 29 _errmsg(db), -1)
7d90: 3b 0d 0a 23 65 6e 64 69 66 0d 0a 20 20 20 20 20 ;..#endif..
7da0: 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 }..
7db0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c el
7dc0: 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 se..
7dd0: 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 {..
7de0: 20 20 20 20 20 20 20 20 20 20 20 72 65 73 75 6c resul
7df0: 74 20 3d 20 22 63 6c 6f 73 65 64 20 6f 72 20 69 t = "closed or i
7e00: 6e 76 61 6c 69 64 20 63 6f 6e 6e 65 63 74 69 6f nvalid connectio
7e10: 6e 20 68 61 6e 64 6c 65 22 3b 0d 0a 20 20 20 20 n handle";..
7e20: 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 }..
7e30: 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 }..
7e40: 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 }..
7e50: 20 47 43 2e 4b 65 65 70 41 6c 69 76 65 28 68 64 GC.KeepAlive(hd
7e60: 6c 29 3b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 l);.. ret
7e70: 75 72 6e 20 72 65 73 75 6c 74 3b 0d 0a 20 20 20 urn result;..
7e80: 20 7d 0d 0a 0d 0a 20 20 20 20 69 6e 74 65 72 6e }.... intern
7e90: 61 6c 20 73 74 61 74 69 63 20 76 6f 69 64 20 46 al static void F
7ea0: 69 6e 69 73 68 42 61 63 6b 75 70 28 53 51 4c 69 inishBackup(SQLi
7eb0: 74 65 43 6f 6e 6e 65 63 74 69 6f 6e 48 61 6e 64 teConnectionHand
7ec0: 6c 65 20 68 64 6c 2c 20 49 6e 74 50 74 72 20 62 le hdl, IntPtr b
7ed0: 61 63 6b 75 70 29 0d 0a 20 20 20 20 7b 0d 0a 20 ackup).. {..
7ee0: 20 20 20 20 20 20 20 69 66 20 28 28 68 64 6c 20 if ((hdl
7ef0: 3d 3d 20 6e 75 6c 6c 29 20 7c 7c 20 28 62 61 63 == null) || (bac
7f00: 6b 75 70 20 3d 3d 20 49 6e 74 50 74 72 2e 5a 65 kup == IntPtr.Ze
7f10: 72 6f 29 29 20 72 65 74 75 72 6e 3b 0d 0a 0d 0a ro)) return;....
7f20: 20 20 20 20 20 20 20 20 74 72 79 0d 0a 20 20 20 try..
7f30: 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 {..
7f40: 20 20 20 20 2f 2f 20 64 6f 20 6e 6f 74 68 69 6e // do nothin
7f50: 67 2e 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 g... }..
7f60: 20 20 20 20 20 20 20 66 69 6e 61 6c 6c 79 20 2f finally /
7f70: 2a 20 4e 4f 54 45 3a 20 54 68 72 65 61 64 2e 41 * NOTE: Thread.A
7f80: 62 6f 72 74 28 29 20 70 72 6f 74 65 63 74 69 6f bort() protectio
7f90: 6e 2e 20 2a 2f 0d 0a 20 20 20 20 20 20 20 20 7b n. */.. {
7fa0: 0d 0a 23 69 66 20 50 4c 41 54 46 4f 52 4d 5f 43 ..#if PLATFORM_C
7fb0: 4f 4d 50 41 43 54 46 52 41 4d 45 57 4f 52 4b 0d OMPACTFRAMEWORK.
7fc0: 0a 20 20 20 20 20 20 20 20 20 20 20 20 6c 6f 63 . loc
7fd0: 6b 20 28 68 64 6c 2e 73 79 6e 63 52 6f 6f 74 29 k (hdl.syncRoot)
7fe0: 0d 0a 23 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 ..#else..
7ff0: 20 20 20 20 20 6c 6f 63 6b 20 28 68 64 6c 29 0d lock (hdl).
8000: 0a 23 65 6e 64 69 66 0d 0a 20 20 20 20 20 20 20 .#endif..
8010: 20 20 20 20 20 7b 0d 0a 23 69 66 20 21 53 51 4c {..#if !SQL
8020: 49 54 45 5f 53 54 41 4e 44 41 52 44 0d 0a 20 20 ITE_STANDARD..
8030: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 53 51 SQ
8040: 4c 69 74 65 45 72 72 6f 72 43 6f 64 65 20 6e 20 LiteErrorCode n
8050: 3d 20 55 6e 73 61 66 65 4e 61 74 69 76 65 4d 65 = UnsafeNativeMe
8060: 74 68 6f 64 73 2e 73 71 6c 69 74 65 33 5f 62 61 thods.sqlite3_ba
8070: 63 6b 75 70 5f 66 69 6e 69 73 68 5f 69 6e 74 65 ckup_finish_inte
8080: 72 6f 70 28 62 61 63 6b 75 70 29 3b 0d 0a 23 65 rop(backup);..#e
8090: 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 lse..
80a0: 20 20 20 20 20 53 51 4c 69 74 65 45 72 72 6f 72 SQLiteError
80b0: 43 6f 64 65 20 6e 20 3d 20 55 6e 73 61 66 65 4e Code n = UnsafeN
80c0: 61 74 69 76 65 4d 65 74 68 6f 64 73 2e 73 71 6c ativeMethods.sql
80d0: 69 74 65 33 5f 62 61 63 6b 75 70 5f 66 69 6e 69 ite3_backup_fini
80e0: 73 68 28 62 61 63 6b 75 70 29 3b 0d 0a 23 65 6e sh(backup);..#en
80f0: 64 69 66 0d 0a 20 20 20 20 20 20 20 20 20 20 20 dif..
8100: 20 20 20 20 20 69 66 20 28 6e 20 21 3d 20 53 51 if (n != SQ
8110: 4c 69 74 65 45 72 72 6f 72 43 6f 64 65 2e 4f 6b LiteErrorCode.Ok
8120: 29 20 74 68 72 6f 77 20 6e 65 77 20 53 51 4c 69 ) throw new SQLi
8130: 74 65 45 78 63 65 70 74 69 6f 6e 28 6e 2c 20 6e teException(n, n
8140: 75 6c 6c 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 ull);..
8150: 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d }.. }.
8160: 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 69 6e . }.... in
8170: 74 65 72 6e 61 6c 20 73 74 61 74 69 63 20 76 6f ternal static vo
8180: 69 64 20 46 69 6e 61 6c 69 7a 65 53 74 61 74 65 id FinalizeState
8190: 6d 65 6e 74 28 53 51 4c 69 74 65 43 6f 6e 6e 65 ment(SQLiteConne
81a0: 63 74 69 6f 6e 48 61 6e 64 6c 65 20 68 64 6c 2c ctionHandle hdl,
81b0: 20 49 6e 74 50 74 72 20 73 74 6d 74 29 0d 0a 20 IntPtr stmt)..
81c0: 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 {.. if
81d0: 20 28 28 68 64 6c 20 3d 3d 20 6e 75 6c 6c 29 20 ((hdl == null)
81e0: 7c 7c 20 28 73 74 6d 74 20 3d 3d 20 49 6e 74 50 || (stmt == IntP
81f0: 74 72 2e 5a 65 72 6f 29 29 20 72 65 74 75 72 6e tr.Zero)) return
8200: 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 74 72 79 ;.... try
8210: 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 .. {..
8220: 20 20 20 20 20 20 20 20 20 2f 2f 20 64 6f 20 6e // do n
8230: 6f 74 68 69 6e 67 2e 0d 0a 20 20 20 20 20 20 20 othing...
8240: 20 7d 0d 0a 20 20 20 20 20 20 20 20 66 69 6e 61 }.. fina
8250: 6c 6c 79 20 2f 2a 20 4e 4f 54 45 3a 20 54 68 72 lly /* NOTE: Thr
8260: 65 61 64 2e 41 62 6f 72 74 28 29 20 70 72 6f 74 ead.Abort() prot
8270: 65 63 74 69 6f 6e 2e 20 2a 2f 0d 0a 20 20 20 20 ection. */..
8280: 20 20 20 20 7b 0d 0a 23 69 66 20 50 4c 41 54 46 {..#if PLATF
8290: 4f 52 4d 5f 43 4f 4d 50 41 43 54 46 52 41 4d 45 ORM_COMPACTFRAME
82a0: 57 4f 52 4b 0d 0a 20 20 20 20 20 20 20 20 20 20 WORK..
82b0: 20 20 6c 6f 63 6b 20 28 68 64 6c 2e 73 79 6e 63 lock (hdl.sync
82c0: 52 6f 6f 74 29 0d 0a 23 65 6c 73 65 0d 0a 20 20 Root)..#else..
82d0: 20 20 20 20 20 20 20 20 20 20 6c 6f 63 6b 20 28 lock (
82e0: 68 64 6c 29 0d 0a 23 65 6e 64 69 66 0d 0a 20 20 hdl)..#endif..
82f0: 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 23 69 66 {..#if
8300: 20 21 53 51 4c 49 54 45 5f 53 54 41 4e 44 41 52 !SQLITE_STANDAR
8310: 44 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 D..
8320: 20 20 20 53 51 4c 69 74 65 45 72 72 6f 72 43 6f SQLiteErrorCo
8330: 64 65 20 6e 20 3d 20 55 6e 73 61 66 65 4e 61 74 de n = UnsafeNat
8340: 69 76 65 4d 65 74 68 6f 64 73 2e 73 71 6c 69 74 iveMethods.sqlit
8350: 65 33 5f 66 69 6e 61 6c 69 7a 65 5f 69 6e 74 65 e3_finalize_inte
8360: 72 6f 70 28 73 74 6d 74 29 3b 0d 0a 23 65 6c 73 rop(stmt);..#els
8370: 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 e..
8380: 20 20 20 53 51 4c 69 74 65 45 72 72 6f 72 43 6f SQLiteErrorCo
8390: 64 65 20 6e 20 3d 20 55 6e 73 61 66 65 4e 61 74 de n = UnsafeNat
83a0: 69 76 65 4d 65 74 68 6f 64 73 2e 73 71 6c 69 74 iveMethods.sqlit
83b0: 65 33 5f 66 69 6e 61 6c 69 7a 65 28 73 74 6d 74 e3_finalize(stmt
83c0: 29 3b 0d 0a 23 65 6e 64 69 66 0d 0a 20 20 20 20 );..#endif..
83d0: 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 if (
83e0: 6e 20 21 3d 20 53 51 4c 69 74 65 45 72 72 6f 72 n != SQLiteError
83f0: 43 6f 64 65 2e 4f 6b 29 20 74 68 72 6f 77 20 6e Code.Ok) throw n
8400: 65 77 20 53 51 4c 69 74 65 45 78 63 65 70 74 69 ew SQLiteExcepti
8410: 6f 6e 28 6e 2c 20 6e 75 6c 6c 29 3b 0d 0a 20 20 on(n, null);..
8420: 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 }..
8430: 20 20 20 20 20 7d 0d 0a 20 20 20 20 7d 0d 0a 0d }.. }...
8440: 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 73 74 . internal st
8450: 61 74 69 63 20 76 6f 69 64 20 43 6c 6f 73 65 43 atic void CloseC
8460: 6f 6e 6e 65 63 74 69 6f 6e 28 53 51 4c 69 74 65 onnection(SQLite
8470: 43 6f 6e 6e 65 63 74 69 6f 6e 48 61 6e 64 6c 65 ConnectionHandle
8480: 20 68 64 6c 2c 20 49 6e 74 50 74 72 20 64 62 29 hdl, IntPtr db)
8490: 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 .. {..
84a0: 20 69 66 20 28 28 68 64 6c 20 3d 3d 20 6e 75 6c if ((hdl == nul
84b0: 6c 29 20 7c 7c 20 28 64 62 20 3d 3d 20 49 6e 74 l) || (db == Int
84c0: 50 74 72 2e 5a 65 72 6f 29 29 20 72 65 74 75 72 Ptr.Zero)) retur
84d0: 6e 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 74 72 n;.... tr
84e0: 79 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 y.. {..
84f0: 20 20 20 20 20 20 20 20 20 20 2f 2f 20 64 6f 20 // do
8500: 6e 6f 74 68 69 6e 67 2e 0d 0a 20 20 20 20 20 20 nothing...
8510: 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 66 69 6e }.. fin
8520: 61 6c 6c 79 20 2f 2a 20 4e 4f 54 45 3a 20 54 68 ally /* NOTE: Th
8530: 72 65 61 64 2e 41 62 6f 72 74 28 29 20 70 72 6f read.Abort() pro
8540: 74 65 63 74 69 6f 6e 2e 20 2a 2f 0d 0a 20 20 20 tection. */..
8550: 20 20 20 20 20 7b 0d 0a 23 69 66 20 50 4c 41 54 {..#if PLAT
8560: 46 4f 52 4d 5f 43 4f 4d 50 41 43 54 46 52 41 4d FORM_COMPACTFRAM
8570: 45 57 4f 52 4b 0d 0a 20 20 20 20 20 20 20 20 20 EWORK..
8580: 20 20 20 6c 6f 63 6b 20 28 68 64 6c 2e 73 79 6e lock (hdl.syn
8590: 63 52 6f 6f 74 29 0d 0a 23 65 6c 73 65 0d 0a 20 cRoot)..#else..
85a0: 20 20 20 20 20 20 20 20 20 20 20 6c 6f 63 6b 20 lock
85b0: 28 68 64 6c 29 0d 0a 23 65 6e 64 69 66 0d 0a 20 (hdl)..#endif..
85c0: 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 23 69 {..#i
85d0: 66 20 21 53 51 4c 49 54 45 5f 53 54 41 4e 44 41 f !SQLITE_STANDA
85e0: 52 44 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 RD..
85f0: 20 20 20 20 53 51 4c 69 74 65 45 72 72 6f 72 43 SQLiteErrorC
8600: 6f 64 65 20 6e 20 3d 20 55 6e 73 61 66 65 4e 61 ode n = UnsafeNa
8610: 74 69 76 65 4d 65 74 68 6f 64 73 2e 73 71 6c 69 tiveMethods.sqli
8620: 74 65 33 5f 63 6c 6f 73 65 5f 69 6e 74 65 72 6f te3_close_intero
8630: 70 28 64 62 29 3b 0d 0a 23 65 6c 73 65 0d 0a 20 p(db);..#else..
8640: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 52 R
8650: 65 73 65 74 43 6f 6e 6e 65 63 74 69 6f 6e 28 68 esetConnection(h
8660: 64 6c 2c 20 64 62 2c 20 66 61 6c 73 65 29 3b 0d dl, db, false);.
8670: 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ...
8680: 20 20 20 53 51 4c 69 74 65 45 72 72 6f 72 43 6f SQLiteErrorCo
8690: 64 65 20 6e 20 3d 20 55 6e 73 61 66 65 4e 61 74 de n = UnsafeNat
86a0: 69 76 65 4d 65 74 68 6f 64 73 2e 73 71 6c 69 74 iveMethods.sqlit
86b0: 65 33 5f 63 6c 6f 73 65 28 64 62 29 3b 0d 0a 23 e3_close(db);..#
86c0: 65 6e 64 69 66 0d 0a 20 20 20 20 20 20 20 20 20 endif..
86d0: 20 20 20 20 20 20 20 69 66 20 28 6e 20 21 3d 20 if (n !=
86e0: 53 51 4c 69 74 65 45 72 72 6f 72 43 6f 64 65 2e SQLiteErrorCode.
86f0: 4f 6b 29 20 74 68 72 6f 77 20 6e 65 77 20 53 51 Ok) throw new SQ
8700: 4c 69 74 65 45 78 63 65 70 74 69 6f 6e 28 6e 2c LiteException(n,
8710: 20 47 65 74 4c 61 73 74 45 72 72 6f 72 28 68 64 GetLastError(hd
8720: 6c 2c 20 64 62 29 29 3b 0d 0a 20 20 20 20 20 20 l, db));..
8730: 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 }..
8740: 20 7d 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 23 69 66 }.. }....#if
8750: 20 21 49 4e 54 45 52 4f 50 5f 4c 45 47 41 43 59 !INTEROP_LEGACY
8760: 5f 43 4c 4f 53 45 0d 0a 20 20 20 20 69 6e 74 65 _CLOSE.. inte
8770: 72 6e 61 6c 20 73 74 61 74 69 63 20 76 6f 69 64 rnal static void
8780: 20 43 6c 6f 73 65 43 6f 6e 6e 65 63 74 69 6f 6e CloseConnection
8790: 56 32 28 53 51 4c 69 74 65 43 6f 6e 6e 65 63 74 V2(SQLiteConnect
87a0: 69 6f 6e 48 61 6e 64 6c 65 20 68 64 6c 2c 20 49 ionHandle hdl, I
87b0: 6e 74 50 74 72 20 64 62 29 0d 0a 20 20 20 20 7b ntPtr db).. {
87c0: 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 28 68 .. if ((h
87d0: 64 6c 20 3d 3d 20 6e 75 6c 6c 29 20 7c 7c 20 28 dl == null) || (
87e0: 64 62 20 3d 3d 20 49 6e 74 50 74 72 2e 5a 65 72 db == IntPtr.Zer
87f0: 6f 29 29 20 72 65 74 75 72 6e 3b 0d 0a 0d 0a 20 o)) return;....
8800: 20 20 20 20 20 20 20 74 72 79 0d 0a 20 20 20 20 try..
8810: 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 {..
8820: 20 20 20 2f 2f 20 64 6f 20 6e 6f 74 68 69 6e 67 // do nothing
8830: 2e 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 ... }..
8840: 20 20 20 20 20 20 66 69 6e 61 6c 6c 79 20 2f 2a finally /*
8850: 20 4e 4f 54 45 3a 20 54 68 72 65 61 64 2e 41 62 NOTE: Thread.Ab
8860: 6f 72 74 28 29 20 70 72 6f 74 65 63 74 69 6f 6e ort() protection
8870: 2e 20 2a 2f 0d 0a 20 20 20 20 20 20 20 20 7b 0d . */.. {.
8880: 0a 23 69 66 20 50 4c 41 54 46 4f 52 4d 5f 43 4f .#if PLATFORM_CO
8890: 4d 50 41 43 54 46 52 41 4d 45 57 4f 52 4b 0d 0a MPACTFRAMEWORK..
88a0: 20 20 20 20 20 20 20 20 20 20 20 20 6c 6f 63 6b lock
88b0: 20 28 68 64 6c 2e 73 79 6e 63 52 6f 6f 74 29 0d (hdl.syncRoot).
88c0: 0a 23 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 .#else..
88d0: 20 20 20 20 6c 6f 63 6b 20 28 68 64 6c 29 0d 0a lock (hdl)..
88e0: 23 65 6e 64 69 66 0d 0a 20 20 20 20 20 20 20 20 #endif..
88f0: 20 20 20 20 7b 0d 0a 23 69 66 20 21 53 51 4c 49 {..#if !SQLI
8900: 54 45 5f 53 54 41 4e 44 41 52 44 0d 0a 20 20 20 TE_STANDARD..
8910: 20 20 20 20 20 20 20 20 20 20 20 20 20 53 51 4c SQL
8920: 69 74 65 45 72 72 6f 72 43 6f 64 65 20 6e 20 3d iteErrorCode n =
8930: 20 55 6e 73 61 66 65 4e 61 74 69 76 65 4d 65 74 UnsafeNativeMet
8940: 68 6f 64 73 2e 73 71 6c 69 74 65 33 5f 63 6c 6f hods.sqlite3_clo
8950: 73 65 5f 69 6e 74 65 72 6f 70 28 64 62 29 3b 0d se_interop(db);.
8960: 0a 23 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 .#else..
8970: 20 20 20 20 20 20 20 20 52 65 73 65 74 43 6f 6e ResetCon
8980: 6e 65 63 74 69 6f 6e 28 68 64 6c 2c 20 64 62 2c nection(hdl, db,
8990: 20 66 61 6c 73 65 29 3b 0d 0a 0d 0a 20 20 20 20 false);....
89a0: 20 20 20 20 20 20 20 20 20 20 20 20 53 51 4c 69 SQLi
89b0: 74 65 45 72 72 6f 72 43 6f 64 65 20 6e 20 3d 20 teErrorCode n =
89c0: 55 6e 73 61 66 65 4e 61 74 69 76 65 4d 65 74 68 UnsafeNativeMeth
89d0: 6f 64 73 2e 73 71 6c 69 74 65 33 5f 63 6c 6f 73 ods.sqlite3_clos
89e0: 65 5f 76 32 28 64 62 29 3b 0d 0a 23 65 6e 64 69 e_v2(db);..#endi
89f0: 66 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 f..
8a00: 20 20 20 69 66 20 28 6e 20 21 3d 20 53 51 4c 69 if (n != SQLi
8a10: 74 65 45 72 72 6f 72 43 6f 64 65 2e 4f 6b 29 20 teErrorCode.Ok)
8a20: 74 68 72 6f 77 20 6e 65 77 20 53 51 4c 69 74 65 throw new SQLite
8a30: 45 78 63 65 70 74 69 6f 6e 28 6e 2c 20 47 65 74 Exception(n, Get
8a40: 4c 61 73 74 45 72 72 6f 72 28 68 64 6c 2c 20 64 LastError(hdl, d
8a50: 62 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 b));..
8a60: 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a }.. }..
8a70: 20 20 20 20 7d 0d 0a 23 65 6e 64 69 66 0d 0a 0d }..#endif...
8a80: 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 73 74 . internal st
8a90: 61 74 69 63 20 62 6f 6f 6c 20 52 65 73 65 74 43 atic bool ResetC
8aa0: 6f 6e 6e 65 63 74 69 6f 6e 28 53 51 4c 69 74 65 onnection(SQLite
8ab0: 43 6f 6e 6e 65 63 74 69 6f 6e 48 61 6e 64 6c 65 ConnectionHandle
8ac0: 20 68 64 6c 2c 20 49 6e 74 50 74 72 20 64 62 2c hdl, IntPtr db,
8ad0: 20 62 6f 6f 6c 20 63 61 6e 54 68 72 6f 77 29 0d bool canThrow).
8ae0: 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 . {..
8af0: 69 66 20 28 28 68 64 6c 20 3d 3d 20 6e 75 6c 6c if ((hdl == null
8b00: 29 20 7c 7c 20 28 64 62 20 3d 3d 20 49 6e 74 50 ) || (db == IntP
8b10: 74 72 2e 5a 65 72 6f 29 29 20 72 65 74 75 72 6e tr.Zero)) return
8b20: 20 66 61 6c 73 65 3b 0d 0a 0d 0a 20 20 20 20 20 false;....
8b30: 20 20 20 62 6f 6f 6c 20 72 65 73 75 6c 74 20 3d bool result =
8b40: 20 66 61 6c 73 65 3b 0d 0a 0d 0a 20 20 20 20 20 false;....
8b50: 20 20 20 74 72 79 0d 0a 20 20 20 20 20 20 20 20 try..
8b60: 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f {.. /
8b70: 2f 20 64 6f 20 6e 6f 74 68 69 6e 67 2e 0d 0a 20 / do nothing...
8b80: 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 }..
8b90: 20 20 66 69 6e 61 6c 6c 79 20 2f 2a 20 4e 4f 54 finally /* NOT
8ba0: 45 3a 20 54 68 72 65 61 64 2e 41 62 6f 72 74 28 E: Thread.Abort(
8bb0: 29 20 70 72 6f 74 65 63 74 69 6f 6e 2e 20 2a 2f ) protection. */
8bc0: 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 23 69 66 .. {..#if
8bd0: 20 50 4c 41 54 46 4f 52 4d 5f 43 4f 4d 50 41 43 PLATFORM_COMPAC
8be0: 54 46 52 41 4d 45 57 4f 52 4b 0d 0a 20 20 20 20 TFRAMEWORK..
8bf0: 20 20 20 20 20 20 20 20 6c 6f 63 6b 20 28 68 64 lock (hd
8c00: 6c 2e 73 79 6e 63 52 6f 6f 74 29 0d 0a 23 65 6c l.syncRoot)..#el
8c10: 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 se..
8c20: 6c 6f 63 6b 20 28 68 64 6c 29 0d 0a 23 65 6e 64 lock (hdl)..#end
8c30: 69 66 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 if..
8c40: 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 {..
8c50: 20 20 20 69 66 20 28 63 61 6e 54 68 72 6f 77 20 if (canThrow
8c60: 26 26 20 68 64 6c 2e 49 73 49 6e 76 61 6c 69 64 && hdl.IsInvalid
8c70: 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 )..
8c80: 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 throw new
8c90: 20 49 6e 76 61 6c 69 64 4f 70 65 72 61 74 69 6f InvalidOperatio
8ca0: 6e 45 78 63 65 70 74 69 6f 6e 28 22 54 68 65 20 nException("The
8cb0: 63 6f 6e 6e 65 63 74 69 6f 6e 20 68 61 6e 64 6c connection handl
8cc0: 65 20 69 73 20 69 6e 76 61 6c 69 64 2e 22 29 3b e is invalid.");
8cd0: 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ....
8ce0: 20 20 20 20 69 66 20 28 63 61 6e 54 68 72 6f 77 if (canThrow
8cf0: 20 26 26 20 68 64 6c 2e 49 73 43 6c 6f 73 65 64 && hdl.IsClosed
8d00: 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 )..
8d10: 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 throw new
8d20: 20 49 6e 76 61 6c 69 64 4f 70 65 72 61 74 69 6f InvalidOperatio
8d30: 6e 45 78 63 65 70 74 69 6f 6e 28 22 54 68 65 20 nException("The
8d40: 63 6f 6e 6e 65 63 74 69 6f 6e 20 68 61 6e 64 6c connection handl
8d50: 65 20 69 73 20 63 6c 6f 73 65 64 2e 22 29 3b 0d e is closed.");.
8d60: 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ...
8d70: 20 20 20 69 66 20 28 21 68 64 6c 2e 49 73 49 6e if (!hdl.IsIn
8d80: 76 61 6c 69 64 20 26 26 20 21 68 64 6c 2e 49 73 valid && !hdl.Is
8d90: 43 6c 6f 73 65 64 29 0d 0a 20 20 20 20 20 20 20 Closed)..
8da0: 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 {..
8db0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
8dc0: 49 6e 74 50 74 72 20 73 74 6d 74 20 3d 20 49 6e IntPtr stmt = In
8dd0: 74 50 74 72 2e 5a 65 72 6f 3b 0d 0a 20 20 20 20 tPtr.Zero;..
8de0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
8df0: 53 51 4c 69 74 65 45 72 72 6f 72 43 6f 64 65 20 SQLiteErrorCode
8e00: 6e 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 n;....
8e10: 20 20 20 20 20 20 20 20 20 20 64 6f 0d 0a 20 20 do..
8e20: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
8e30: 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 {..
8e40: 20 20 20 20 20 20 20 20 20 20 20 20 20 73 74 6d stm
8e50: 74 20 3d 20 55 6e 73 61 66 65 4e 61 74 69 76 65 t = UnsafeNative
8e60: 4d 65 74 68 6f 64 73 2e 73 71 6c 69 74 65 33 5f Methods.sqlite3_
8e70: 6e 65 78 74 5f 73 74 6d 74 28 64 62 2c 20 73 74 next_stmt(db, st
8e80: 6d 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 mt);..
8e90: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 if
8ea0: 20 28 73 74 6d 74 20 21 3d 20 49 6e 74 50 74 72 (stmt != IntPtr
8eb0: 2e 5a 65 72 6f 29 0d 0a 20 20 20 20 20 20 20 20 .Zero)..
8ec0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
8ed0: 7b 0d 0a 23 69 66 20 21 53 51 4c 49 54 45 5f 53 {..#if !SQLITE_S
8ee0: 54 41 4e 44 41 52 44 0d 0a 20 20 20 20 20 20 20 TANDARD..
8ef0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
8f00: 20 20 20 20 20 6e 20 3d 20 55 6e 73 61 66 65 4e n = UnsafeN
8f10: 61 74 69 76 65 4d 65 74 68 6f 64 73 2e 73 71 6c ativeMethods.sql
8f20: 69 74 65 33 5f 72 65 73 65 74 5f 69 6e 74 65 72 ite3_reset_inter
8f30: 6f 70 28 73 74 6d 74 29 3b 0d 0a 23 65 6c 73 65 op(stmt);..#else
8f40: 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..
8f50: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6e 20 n
8f60: 3d 20 55 6e 73 61 66 65 4e 61 74 69 76 65 4d 65 = UnsafeNativeMe
8f70: 74 68 6f 64 73 2e 73 71 6c 69 74 65 33 5f 72 65 thods.sqlite3_re
8f80: 73 65 74 28 73 74 6d 74 29 3b 0d 0a 23 65 6e 64 set(stmt);..#end
8f90: 69 66 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 if..
8fa0: 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 }..
8fb0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
8fc0: 20 20 20 7d 20 77 68 69 6c 65 20 28 73 74 6d 74 } while (stmt
8fd0: 20 21 3d 20 49 6e 74 50 74 72 2e 5a 65 72 6f 29 != IntPtr.Zero)
8fe0: 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ;....
8ff0: 20 20 20 20 20 20 20 20 20 2f 2f 0d 0a 20 20 20 //..
9000: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9010: 20 2f 2f 20 4e 4f 54 45 3a 20 49 73 20 61 20 74 // NOTE: Is a t
9020: 72 61 6e 73 61 63 74 69 6f 6e 20 4e 4f 54 20 70 ransaction NOT p
9030: 65 6e 64 69 6e 67 20 6f 6e 20 74 68 65 20 63 6f ending on the co
9040: 6e 6e 65 63 74 69 6f 6e 3f 0d 0a 20 20 20 20 20 nnection?..
9050: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f /
9060: 2f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 /..
9070: 20 20 20 20 20 20 20 69 66 20 28 49 73 41 75 74 if (IsAut
9080: 6f 63 6f 6d 6d 69 74 28 68 64 6c 2c 20 64 62 29 ocommit(hdl, db)
9090: 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 )..
90a0: 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 {..
90b0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
90c0: 20 20 72 65 73 75 6c 74 20 3d 20 74 72 75 65 3b result = true;
90d0: 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..
90e0: 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 }..
90f0: 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 els
9100: 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 e..
9110: 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 {..
9120: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9130: 20 20 6e 20 3d 20 55 6e 73 61 66 65 4e 61 74 69 n = UnsafeNati
9140: 76 65 4d 65 74 68 6f 64 73 2e 73 71 6c 69 74 65 veMethods.sqlite
9150: 33 5f 65 78 65 63 28 0d 0a 20 20 20 20 20 20 20 3_exec(..
9160: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9170: 20 20 20 20 20 64 62 2c 20 54 6f 55 54 46 38 28 db, ToUTF8(
9180: 22 52 4f 4c 4c 42 41 43 4b 22 29 2c 20 49 6e 74 "ROLLBACK"), Int
9190: 50 74 72 2e 5a 65 72 6f 2c 20 49 6e 74 50 74 72 Ptr.Zero, IntPtr
91a0: 2e 5a 65 72 6f 2c 0d 0a 20 20 20 20 20 20 20 20 .Zero,..
91b0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
91c0: 20 20 20 20 72 65 66 20 73 74 6d 74 29 3b 0d 0a ref stmt);..
91d0: 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..
91e0: 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6e 20 if (n
91f0: 3d 3d 20 53 51 4c 69 74 65 45 72 72 6f 72 43 6f == SQLiteErrorCo
9200: 64 65 2e 4f 6b 29 0d 0a 20 20 20 20 20 20 20 20 de.Ok)..
9210: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9220: 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 {..
9230: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 r
9240: 65 73 75 6c 74 20 3d 20 74 72 75 65 3b 0d 0a 20 esult = true;..
9250: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9260: 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 }..
9270: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9280: 20 20 65 6c 73 65 20 69 66 20 28 63 61 6e 54 68 else if (canTh
9290: 72 6f 77 29 0d 0a 20 20 20 20 20 20 20 20 20 20 row)..
92a0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d {.
92b0: 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .
92c0: 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 thr
92d0: 6f 77 20 6e 65 77 20 53 51 4c 69 74 65 45 78 63 ow new SQLiteExc
92e0: 65 70 74 69 6f 6e 28 6e 2c 20 47 65 74 4c 61 73 eption(n, GetLas
92f0: 74 45 72 72 6f 72 28 68 64 6c 2c 20 64 62 29 29 tError(hdl, db))
9300: 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ;..
9310: 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 }..
9320: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
9330: 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 }..
9340: 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 }..
9350: 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d }.. }
9360: 0d 0a 20 20 20 20 20 20 20 20 47 43 2e 4b 65 65 .. GC.Kee
9370: 70 41 6c 69 76 65 28 68 64 6c 29 3b 0d 0a 20 20 pAlive(hdl);..
9380: 20 20 20 20 20 20 72 65 74 75 72 6e 20 72 65 73 return res
9390: 75 6c 74 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 ult;.. }....
93a0: 20 20 20 69 6e 74 65 72 6e 61 6c 20 73 74 61 74 internal stat
93b0: 69 63 20 62 6f 6f 6c 20 49 73 41 75 74 6f 63 6f ic bool IsAutoco
93c0: 6d 6d 69 74 28 53 51 4c 69 74 65 43 6f 6e 6e 65 mmit(SQLiteConne
93d0: 63 74 69 6f 6e 48 61 6e 64 6c 65 20 68 64 6c 2c ctionHandle hdl,
93e0: 20 49 6e 74 50 74 72 20 64 62 29 0d 0a 20 20 20 IntPtr db)..
93f0: 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 {.. if (
9400: 28 68 64 6c 20 3d 3d 20 6e 75 6c 6c 29 20 7c 7c (hdl == null) ||
9410: 20 28 64 62 20 3d 3d 20 49 6e 74 50 74 72 2e 5a (db == IntPtr.Z
9420: 65 72 6f 29 29 20 72 65 74 75 72 6e 20 66 61 6c ero)) return fal
9430: 73 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 62 se;.... b
9440: 6f 6f 6c 20 72 65 73 75 6c 74 20 3d 20 66 61 6c ool result = fal
9450: 73 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 74 se;.... t
9460: 72 79 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 ry.. {..
9470: 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 64 6f // do
9480: 20 6e 6f 74 68 69 6e 67 2e 0d 0a 20 20 20 20 20 nothing...
9490: 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 66 69 }.. fi
94a0: 6e 61 6c 6c 79 20 2f 2a 20 4e 4f 54 45 3a 20 54 nally /* NOTE: T
94b0: 68 72 65 61 64 2e 41 62 6f 72 74 28 29 20 70 72 hread.Abort() pr
94c0: 6f 74 65 63 74 69 6f 6e 2e 20 2a 2f 0d 0a 20 20 otection. */..
94d0: 20 20 20 20 20 20 7b 0d 0a 23 69 66 20 50 4c 41 {..#if PLA
94e0: 54 46 4f 52 4d 5f 43 4f 4d 50 41 43 54 46 52 41 TFORM_COMPACTFRA
94f0: 4d 45 57 4f 52 4b 0d 0a 20 20 20 20 20 20 20 20 MEWORK..
9500: 20 20 20 20 6c 6f 63 6b 20 28 68 64 6c 2e 73 79 lock (hdl.sy
9510: 6e 63 52 6f 6f 74 29 0d 0a 23 65 6c 73 65 0d 0a ncRoot)..#else..
9520: 20 20 20 20 20 20 20 20 20 20 20 20 6c 6f 63 6b lock
9530: 20 28 68 64 6c 29 0d 0a 23 65 6e 64 69 66 0d 0a (hdl)..#endif..
9540: 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 {..
9550: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 i
9560: 66 20 28 21 68 64 6c 2e 49 73 49 6e 76 61 6c 69 f (!hdl.IsInvali
9570: 64 20 26 26 20 21 68 64 6c 2e 49 73 43 6c 6f 73 d && !hdl.IsClos
9580: 65 64 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ed)..
9590: 20 20 20 20 20 20 20 20 20 72 65 73 75 6c 74 20 result
95a0: 3d 20 28 55 6e 73 61 66 65 4e 61 74 69 76 65 4d = (UnsafeNativeM
95b0: 65 74 68 6f 64 73 2e 73 71 6c 69 74 65 33 5f 67 ethods.sqlite3_g
95c0: 65 74 5f 61 75 74 6f 63 6f 6d 6d 69 74 28 64 62 et_autocommit(db
95d0: 29 20 3d 3d 20 31 29 3b 0d 0a 20 20 20 20 20 20 ) == 1);..
95e0: 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 }..
95f0: 20 7d 0d 0a 20 20 20 20 20 20 20 20 47 43 2e 4b }.. GC.K
9600: 65 65 70 41 6c 69 76 65 28 68 64 6c 29 3b 20 2f eepAlive(hdl); /
9610: 2a 20 4e 4f 54 45 3a 20 55 6e 72 65 61 63 68 61 * NOTE: Unreacha
9620: 62 6c 65 20 63 6f 64 65 2e 20 2a 2f 0d 0a 20 20 ble code. */..
9630: 20 20 20 20 20 20 72 65 74 75 72 6e 20 72 65 73 return res
9640: 75 6c 74 3b 0d 0a 20 20 20 20 7d 0d 0a 20 20 7d ult;.. }.. }
9650: 0d 0a 0d 0a 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 .... /// <summa
9660: 72 79 3e 0d 0a 20 20 2f 2f 2f 0d 0a 20 20 2f 2f ry>.. ///.. //
9670: 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 / </summary>..
9680: 70 75 62 6c 69 63 20 69 6e 74 65 72 66 61 63 65 public interface
9690: 20 49 53 51 4c 69 74 65 53 63 68 65 6d 61 45 78 ISQLiteSchemaEx
96a0: 74 65 6e 73 69 6f 6e 73 0d 0a 20 20 7b 0d 0a 20 tensions.. {..
96b0: 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 /// <summar
96c0: 79 3e 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 43 72 y>.. /// Cr
96d0: 65 61 74 65 73 20 74 65 6d 70 6f 72 61 72 79 20 eates temporary
96e0: 74 61 62 6c 65 73 20 6f 6e 20 74 68 65 20 63 6f tables on the co
96f0: 6e 6e 65 63 74 69 6f 6e 20 73 6f 20 73 63 68 65 nnection so sche
9700: 6d 61 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 63 ma information c
9710: 61 6e 20 62 65 20 71 75 65 72 69 65 64 2e 0d 0a an be queried...
9720: 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d /// </summ
9730: 61 72 79 3e 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 ary>.. ///
9740: 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 63 6f 6e <param name="con
9750: 6e 65 63 74 69 6f 6e 22 3e 0d 0a 20 20 20 20 20 nection">..
9760: 20 2f 2f 2f 20 54 68 65 20 63 6f 6e 6e 65 63 74 /// The connect
9770: 69 6f 6e 20 75 70 6f 6e 20 77 68 69 63 68 20 74 ion upon which t
9780: 6f 20 62 75 69 6c 64 20 74 68 65 20 73 63 68 65 o build the sche
9790: 6d 61 20 74 61 62 6c 65 73 2e 0d 0a 20 20 20 20 ma tables...
97a0: 20 20 2f 2f 2f 20 3c 2f 70 61 72 61 6d 3e 0d 0a /// </param>..
97b0: 20 20 20 20 20 20 76 6f 69 64 20 42 75 69 6c 64 void Build
97c0: 54 65 6d 70 53 63 68 65 6d 61 28 53 51 4c 69 74 TempSchema(SQLit
97d0: 65 43 6f 6e 6e 65 63 74 69 6f 6e 20 63 6f 6e 6e eConnection conn
97e0: 65 63 74 69 6f 6e 29 3b 0d 0a 20 20 7d 0d 0a 0d ection);.. }...
97f0: 0a 20 20 5b 46 6c 61 67 73 5d 0d 0a 20 20 69 6e . [Flags].. in
9800: 74 65 72 6e 61 6c 20 65 6e 75 6d 20 53 51 4c 69 ternal enum SQLi
9810: 74 65 4f 70 65 6e 46 6c 61 67 73 45 6e 75 6d 0d teOpenFlagsEnum.
9820: 0a 20 20 7b 0d 0a 20 20 20 20 4e 6f 6e 65 20 3d . {.. None =
9830: 20 30 2c 0d 0a 20 20 20 20 52 65 61 64 4f 6e 6c 0,.. ReadOnl
9840: 79 20 3d 20 30 78 30 31 2c 0d 0a 20 20 20 20 52 y = 0x01,.. R
9850: 65 61 64 57 72 69 74 65 20 3d 20 30 78 30 32 2c eadWrite = 0x02,
9860: 0d 0a 20 20 20 20 43 72 65 61 74 65 20 3d 20 30 .. Create = 0
9870: 78 30 34 2c 0d 0a 20 20 20 20 55 72 69 20 3d 20 x04,.. Uri =
9880: 30 78 34 30 2c 0d 0a 20 20 20 20 53 68 61 72 65 0x40,.. Share
9890: 64 43 61 63 68 65 20 3d 20 30 78 30 31 30 30 30 dCache = 0x01000
98a0: 30 30 30 2c 0d 0a 20 20 20 20 44 65 66 61 75 6c 000,.. Defaul
98b0: 74 20 3d 20 30 78 30 36 2c 0d 0a 20 20 7d 0d 0a t = 0x06,.. }..
98c0: 0d 0a 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 .. /// <summary
98d0: 3e 0d 0a 20 20 2f 2f 2f 20 54 68 65 20 65 78 74 >.. /// The ext
98e0: 72 61 20 62 65 68 61 76 69 6f 72 61 6c 20 66 6c ra behavioral fl
98f0: 61 67 73 20 74 68 61 74 20 63 61 6e 20 62 65 20 ags that can be
9900: 61 70 70 6c 69 65 64 20 74 6f 20 61 20 63 6f 6e applied to a con
9910: 6e 65 63 74 69 6f 6e 2e 0d 0a 20 20 2f 2f 2f 20 nection... ///
9920: 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 5b 46 </summary>.. [F
9930: 6c 61 67 73 28 29 5d 0d 0a 20 20 70 75 62 6c 69 lags()].. publi
9940: 63 20 65 6e 75 6d 20 53 51 4c 69 74 65 43 6f 6e c enum SQLiteCon
9950: 6e 65 63 74 69 6f 6e 46 6c 61 67 73 20 3a 20 6c nectionFlags : l
9960: 6f 6e 67 0d 0a 20 20 7b 0d 0a 20 20 20 20 20 20 ong.. {..
9970: 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 /// <summary>..
9980: 20 20 20 20 20 2f 2f 2f 20 4e 6f 20 65 78 74 72 /// No extr
9990: 61 20 66 6c 61 67 73 2e 0d 0a 20 20 20 20 20 20 a flags...
99a0: 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a /// </summary>..
99b0: 20 20 20 20 20 20 4e 6f 6e 65 20 3d 20 30 78 30 None = 0x0
99c0: 2c 0d 0a 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c ,.... /// <
99d0: 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 summary>..
99e0: 2f 2f 2f 20 45 6e 61 62 6c 65 20 6c 6f 67 67 69 /// Enable loggi
99f0: 6e 67 20 6f 66 20 61 6c 6c 20 53 51 4c 20 73 74 ng of all SQL st
9a00: 61 74 65 6d 65 6e 74 73 20 74 6f 20 62 65 20 70 atements to be p
9a10: 72 65 70 61 72 65 64 2e 0d 0a 20 20 20 20 20 20 repared...
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 50 72 65 70 61 72 65 LogPrepare
9a40: 20 3d 20 30 78 31 2c 0d 0a 0d 0a 20 20 20 20 20 = 0x1,....
9a50: 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a /// <summary>..
9a60: 20 20 20 20 20 20 2f 2f 2f 20 45 6e 61 62 6c 65 /// Enable
9a70: 20 6c 6f 67 67 69 6e 67 20 6f 66 20 61 6c 6c 20 logging of all
9a80: 62 6f 75 6e 64 20 70 61 72 61 6d 65 74 65 72 20 bound parameter
9a90: 74 79 70 65 73 20 61 6e 64 20 72 61 77 20 76 61 types and raw va
9aa0: 6c 75 65 73 2e 0d 0a 20 20 20 20 20 20 2f 2f 2f lues... ///
9ab0: 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 </summary>..
9ac0: 20 20 20 4c 6f 67 50 72 65 42 69 6e 64 20 3d 20 LogPreBind =
9ad0: 30 78 32 2c 0d 0a 0d 0a 20 20 20 20 20 20 2f 2f 0x2,.... //
9ae0: 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 / <summary>..
9af0: 20 20 20 2f 2f 2f 20 45 6e 61 62 6c 65 20 6c 6f /// Enable lo
9b00: 67 67 69 6e 67 20 6f 66 20 61 6c 6c 20 62 6f 75 gging of all bou
9b10: 6e 64 20 70 61 72 61 6d 65 74 65 72 20 73 74 72 nd parameter str
9b20: 6f 6e 67 6c 79 20 74 79 70 65 64 20 76 61 6c 75 ongly typed valu
9b30: 65 73 2e 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c es... /// <
9b40: 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 /summary>..
9b50: 20 4c 6f 67 42 69 6e 64 20 3d 20 30 78 34 2c 0d LogBind = 0x4,.
9b60: 0a 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 ... /// <su
9b70: 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 2f 2f mmary>.. //
9b80: 2f 20 45 6e 61 62 6c 65 20 6c 6f 67 67 69 6e 67 / Enable logging
9b90: 20 6f 66 20 61 6c 6c 20 65 78 63 65 70 74 69 6f of all exceptio
9ba0: 6e 73 20 63 61 75 67 68 74 20 66 72 6f 6d 20 75 ns caught from u
9bb0: 73 65 72 2d 70 72 6f 76 69 64 65 64 0d 0a 20 20 ser-provided..
9bc0: 20 20 20 20 2f 2f 2f 20 6d 61 6e 61 67 65 64 20 /// managed
9bd0: 63 6f 64 65 20 63 61 6c 6c 65 64 20 66 72 6f 6d code called from
9be0: 20 6e 61 74 69 76 65 20 63 6f 64 65 20 76 69 61 native code via
9bf0: 20 64 65 6c 65 67 61 74 65 73 2e 0d 0a 20 20 20 delegates...
9c00: 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 /// </summary
9c10: 3e 0d 0a 20 20 20 20 20 20 4c 6f 67 43 61 6c 6c >.. LogCall
9c20: 62 61 63 6b 45 78 63 65 70 74 69 6f 6e 20 3d 20 backException =
9c30: 30 78 38 2c 0d 0a 0d 0a 20 20 20 20 20 20 2f 2f 0x8,.... //
9c40: 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 / <summary>..
9c50: 20 20 20 2f 2f 2f 20 45 6e 61 62 6c 65 20 6c 6f /// Enable lo
9c60: 67 67 69 6e 67 20 6f 66 20 62 61 63 6b 75 70 20 gging of backup
9c70: 41 50 49 20 65 72 72 6f 72 73 2e 0d 0a 20 20 20 API errors...
9c80: 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 /// </summary
9c90: 3e 0d 0a 20 20 20 20 20 20 4c 6f 67 42 61 63 6b >.. LogBack
9ca0: 75 70 20 3d 20 30 78 31 30 2c 0d 0a 0d 0a 20 20 up = 0x10,....
9cb0: 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 /// <summary
9cc0: 3e 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 53 6b 69 >.. /// Ski
9cd0: 70 20 61 64 64 69 6e 67 20 74 68 65 20 65 78 74 p adding the ext
9ce0: 65 6e 73 69 6f 6e 20 66 75 6e 63 74 69 6f 6e 73 ension functions
9cf0: 20 70 72 6f 76 69 64 65 64 20 62 79 20 74 68 65 provided by the
9d00: 20 6e 61 74 69 76 65 0d 0a 20 20 20 20 20 20 2f native.. /
9d10: 2f 2f 20 69 6e 74 65 72 6f 70 20 61 73 73 65 6d // interop assem
9d20: 62 6c 79 2e 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 bly... ///
9d30: 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 </summary>..
9d40: 20 20 4e 6f 45 78 74 65 6e 73 69 6f 6e 46 75 6e NoExtensionFun
9d50: 63 74 69 6f 6e 73 20 3d 20 30 78 32 30 2c 0d 0a ctions = 0x20,..
9d60: 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d .. /// <sum
9d70: 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 2f 2f 2f mary>.. ///
9d80: 20 57 68 65 6e 20 62 69 6e 64 69 6e 67 20 70 61 When binding pa
9d90: 72 61 6d 65 74 65 72 20 76 61 6c 75 65 73 20 77 rameter values w
9da0: 69 74 68 20 74 68 65 20 3c 73 65 65 20 63 72 65 ith the <see cre
9db0: 66 3d 22 55 49 6e 74 33 32 22 20 2f 3e 0d 0a 20 f="UInt32" />..
9dc0: 20 20 20 20 20 2f 2f 2f 20 74 79 70 65 2c 20 75 /// type, u
9dd0: 73 65 20 74 68 65 20 69 6e 74 65 72 6f 70 20 6d se the interop m
9de0: 65 74 68 6f 64 20 74 68 61 74 20 61 63 63 65 70 ethod that accep
9df0: 74 73 20 61 6e 20 3c 73 65 65 20 63 72 65 66 3d ts an <see cref=
9e00: 22 49 6e 74 36 34 22 20 2f 3e 0d 0a 20 20 20 20 "Int64" />..
9e10: 20 20 2f 2f 2f 20 76 61 6c 75 65 2e 0d 0a 20 20 /// value...
9e20: 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 /// </summar
9e30: 79 3e 0d 0a 20 20 20 20 20 20 42 69 6e 64 55 49 y>.. BindUI
9e40: 6e 74 33 32 41 73 49 6e 74 36 34 20 3d 20 30 78 nt32AsInt64 = 0x
9e50: 34 30 2c 0d 0a 0d 0a 20 20 20 20 20 20 2f 2f 2f 40,.... ///
9e60: 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 <summary>..
9e70: 20 20 2f 2f 2f 20 57 68 65 6e 20 62 69 6e 64 69 /// When bindi
9e80: 6e 67 20 70 61 72 61 6d 65 74 65 72 20 76 61 6c ng parameter val
9e90: 75 65 73 2c 20 61 6c 77 61 79 73 20 62 69 6e 64 ues, always bind
9ea0: 20 74 68 65 6d 20 61 73 20 74 68 6f 75 67 68 20 them as though
9eb0: 74 68 65 79 20 77 65 72 65 0d 0a 20 20 20 20 20 they were..
9ec0: 20 2f 2f 2f 20 70 6c 61 69 6e 20 74 65 78 74 20 /// plain text
9ed0: 28 69 2e 65 2e 20 6e 6f 20 6e 75 6d 65 72 69 63 (i.e. no numeric
9ee0: 2c 20 64 61 74 65 2f 74 69 6d 65 2c 20 6f 72 20 , date/time, or
9ef0: 6f 74 68 65 72 20 63 6f 6e 76 65 72 73 69 6f 6e other conversion
9f00: 73 20 73 68 6f 75 6c 64 0d 0a 20 20 20 20 20 20 s should..
9f10: 2f 2f 2f 20 62 65 20 61 74 74 65 6d 70 74 65 64 /// be attempted
9f20: 29 2e 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c 2f )... /// </
9f30: 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 summary>..
9f40: 42 69 6e 64 41 6c 6c 41 73 54 65 78 74 20 3d 20 BindAllAsText =
9f50: 30 78 38 30 2c 0d 0a 0d 0a 20 20 20 20 20 20 2f 0x80,.... /
9f60: 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 // <summary>..
9f70: 20 20 20 20 2f 2f 2f 20 57 68 65 6e 20 72 65 74 /// When ret
9f80: 75 72 6e 69 6e 67 20 63 6f 6c 75 6d 6e 20 76 61 urning column va
9f90: 6c 75 65 73 2c 20 61 6c 77 61 79 73 20 72 65 74 lues, always ret
9fa0: 75 72 6e 20 74 68 65 6d 20 61 73 20 74 68 6f 75 urn them as thou
9fb0: 67 68 20 74 68 65 79 20 77 65 72 65 0d 0a 20 20 gh they were..
9fc0: 20 20 20 20 2f 2f 2f 20 70 6c 61 69 6e 20 74 65 /// plain te
9fd0: 78 74 20 28 69 2e 65 2e 20 6e 6f 20 6e 75 6d 65 xt (i.e. no nume
9fe0: 72 69 63 2c 20 64 61 74 65 2f 74 69 6d 65 2c 20 ric, date/time,
9ff0: 6f 72 20 6f 74 68 65 72 20 63 6f 6e 76 65 72 73 or other convers
a000: 69 6f 6e 73 20 73 68 6f 75 6c 64 0d 0a 20 20 20 ions should..
a010: 20 20 20 2f 2f 2f 20 62 65 20 61 74 74 65 6d 70 /// be attemp
a020: 74 65 64 29 2e 0d 0a 20 20 20 20 20 20 2f 2f 2f ted)... ///
a030: 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 </summary>..
a040: 20 20 20 47 65 74 41 6c 6c 41 73 54 65 78 74 20 GetAllAsText
a050: 3d 20 30 78 31 30 30 2c 0d 0a 0d 0a 20 20 20 20 = 0x100,....
a060: 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d /// <summary>.
a070: 0a 20 20 20 20 20 20 2f 2f 2f 20 50 72 65 76 65 . /// Preve
a080: 6e 74 20 74 68 69 73 20 3c 73 65 65 20 63 72 65 nt this <see cre
a090: 66 3d 22 53 51 4c 69 74 65 43 6f 6e 6e 65 63 74 f="SQLiteConnect
a0a0: 69 6f 6e 22 20 2f 3e 20 6f 62 6a 65 63 74 20 69 ion" /> object i
a0b0: 6e 73 74 61 6e 63 65 20 66 72 6f 6d 0d 0a 20 20 nstance from..
a0c0: 20 20 20 20 2f 2f 2f 20 6c 6f 61 64 69 6e 67 20 /// loading
a0d0: 65 78 74 65 6e 73 69 6f 6e 73 2e 0d 0a 20 20 20 extensions...
a0e0: 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 /// </summary
a0f0: 3e 0d 0a 20 20 20 20 20 20 4e 6f 4c 6f 61 64 45 >.. NoLoadE
a100: 78 74 65 6e 73 69 6f 6e 20 3d 20 30 78 32 30 30 xtension = 0x200
a110: 2c 0d 0a 0d 0a 23 69 66 20 49 4e 54 45 52 4f 50 ,....#if INTEROP
a120: 5f 56 49 52 54 55 41 4c 5f 54 41 42 4c 45 0d 0a _VIRTUAL_TABLE..
a130: 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 /// <summa
a140: 72 79 3e 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 50 ry>.. /// P
a150: 72 65 76 65 6e 74 20 74 68 69 73 20 3c 73 65 65 revent this <see
a160: 20 63 72 65 66 3d 22 53 51 4c 69 74 65 43 6f 6e cref="SQLiteCon
a170: 6e 65 63 74 69 6f 6e 22 20 2f 3e 20 6f 62 6a 65 nection" /> obje
a180: 63 74 20 69 6e 73 74 61 6e 63 65 20 66 72 6f 6d ct instance from
a190: 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 63 72 65 61 .. /// crea
a1a0: 74 69 6e 67 20 76 69 72 74 75 61 6c 20 74 61 62 ting virtual tab
a1b0: 6c 65 20 6d 6f 64 75 6c 65 73 2e 0d 0a 20 20 20 le modules...
a1c0: 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 /// </summary
a1d0: 3e 0d 0a 20 20 20 20 20 20 4e 6f 43 72 65 61 74 >.. NoCreat
a1e0: 65 4d 6f 64 75 6c 65 20 3d 20 30 78 34 30 30 2c eModule = 0x400,
a1f0: 0d 0a 23 65 6e 64 69 66 0d 0a 0d 0a 20 20 20 20 ..#endif....
a200: 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d /// <summary>.
a210: 0a 20 20 20 20 20 20 2f 2f 2f 20 53 6b 69 70 20 . /// Skip
a220: 62 69 6e 64 69 6e 67 20 61 6e 79 20 66 75 6e 63 binding any func
a230: 74 69 6f 6e 73 20 70 72 6f 76 69 64 65 64 20 62 tions provided b
a240: 79 20 6f 74 68 65 72 20 6d 61 6e 61 67 65 64 20 y other managed
a250: 61 73 73 65 6d 62 6c 69 65 73 20 77 68 65 6e 0d assemblies when.
a260: 0a 20 20 20 20 20 20 2f 2f 2f 20 6f 70 65 6e 69 . /// openi
a270: 6e 67 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f ng the connectio
a280: 6e 2e 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c 2f n... /// </
a290: 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 summary>..
a2a0: 4e 6f 42 69 6e 64 46 75 6e 63 74 69 6f 6e 73 20 NoBindFunctions
a2b0: 3d 20 30 78 38 30 30 2c 0d 0a 0d 0a 23 69 66 20 = 0x800,....#if
a2c0: 49 4e 54 45 52 4f 50 5f 56 49 52 54 55 41 4c 5f INTEROP_VIRTUAL_
a2d0: 54 41 42 4c 45 0d 0a 20 20 20 20 20 20 2f 2f 2f TABLE.. ///
a2e0: 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 <summary>..
a2f0: 20 20 2f 2f 2f 20 53 6b 69 70 20 73 65 74 74 69 /// Skip setti
a300: 6e 67 20 74 68 65 20 6c 6f 67 67 69 6e 67 20 72 ng the logging r
a310: 65 6c 61 74 65 64 20 70 72 6f 70 65 72 74 69 65 elated propertie
a320: 73 20 6f 66 20 74 68 65 0d 0a 20 20 20 20 20 20 s of the..
a330: 2f 2f 2f 20 3c 73 65 65 20 63 72 65 66 3d 22 53 /// <see cref="S
a340: 51 4c 69 74 65 4d 6f 64 75 6c 65 22 20 2f 3e 20 QLiteModule" />
a350: 6f 62 6a 65 63 74 20 69 6e 73 74 61 6e 63 65 20 object instance
a360: 74 68 61 74 20 77 61 73 20 70 61 73 73 65 64 20 that was passed
a370: 74 6f 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 74 68 to.. /// th
a380: 65 20 3c 73 65 65 20 63 72 65 66 3d 22 53 51 4c e <see cref="SQL
a390: 69 74 65 43 6f 6e 6e 65 63 74 69 6f 6e 2e 43 72 iteConnection.Cr
a3a0: 65 61 74 65 4d 6f 64 75 6c 65 22 20 2f 3e 20 6d eateModule" /> m
a3b0: 65 74 68 6f 64 2e 0d 0a 20 20 20 20 20 20 2f 2f ethod... //
a3c0: 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 / </summary>..
a3d0: 20 20 20 20 4e 6f 4c 6f 67 4d 6f 64 75 6c 65 20 NoLogModule
a3e0: 3d 20 30 78 31 30 30 30 2c 0d 0a 0d 0a 20 20 20 = 0x1000,....
a3f0: 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e /// <summary>
a400: 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 45 6e 61 62 .. /// Enab
a410: 6c 65 20 6c 6f 67 67 69 6e 67 20 6f 66 20 61 6c le logging of al
a420: 6c 20 76 69 72 74 75 61 6c 20 74 61 62 6c 65 20 l virtual table
a430: 6d 6f 64 75 6c 65 20 65 72 72 6f 72 73 20 73 65 module errors se
a440: 65 6e 20 62 79 20 74 68 65 0d 0a 20 20 20 20 20 en by the..
a450: 20 2f 2f 2f 20 3c 73 65 65 20 63 72 65 66 3d 22 /// <see cref="
a460: 53 51 4c 69 74 65 4d 6f 64 75 6c 65 2e 53 65 74 SQLiteModule.Set
a470: 54 61 62 6c 65 45 72 72 6f 72 28 49 6e 74 50 74 TableError(IntPt
a480: 72 2c 53 74 72 69 6e 67 29 22 20 2f 3e 20 6d 65 r,String)" /> me
a490: 74 68 6f 64 2e 0d 0a 20 20 20 20 20 20 2f 2f 2f thod... ///
a4a0: 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 </summary>..
a4b0: 20 20 20 4c 6f 67 4d 6f 64 75 6c 65 45 72 72 6f LogModuleErro
a4c0: 72 20 3d 20 30 78 32 30 30 30 2c 0d 0a 0d 0a 20 r = 0x2000,....
a4d0: 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 /// <summar
a4e0: 79 3e 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 45 6e y>.. /// En
a4f0: 61 62 6c 65 20 6c 6f 67 67 69 6e 67 20 6f 66 20 able logging of
a500: 63 65 72 74 61 69 6e 20 76 69 72 74 75 61 6c 20 certain virtual
a510: 74 61 62 6c 65 20 6d 6f 64 75 6c 65 20 65 78 63 table module exc
a520: 65 70 74 69 6f 6e 73 20 74 68 61 74 20 63 61 6e eptions that can
a530: 6e 6f 74 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 62 not.. /// b
a540: 65 20 65 61 73 69 6c 79 20 64 69 73 63 6f 76 65 e easily discove
a550: 72 65 64 20 76 69 61 20 6f 74 68 65 72 20 6d 65 red via other me
a560: 61 6e 73 2e 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 ans... ///
a570: 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 </summary>..
a580: 20 20 4c 6f 67 4d 6f 64 75 6c 65 45 78 63 65 70 LogModuleExcep
a590: 74 69 6f 6e 20 3d 20 30 78 34 30 30 30 2c 0d 0a tion = 0x4000,..
a5a0: 23 65 6e 64 69 66 0d 0a 0d 0a 20 20 20 20 20 20 #endif....
a5b0: 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 /// <summary>..
a5c0: 20 20 20 20 20 2f 2f 2f 20 45 6e 61 62 6c 65 20 /// Enable
a5d0: 74 72 61 63 69 6e 67 20 6f 66 20 70 6f 74 65 6e tracing of poten
a5e0: 74 69 61 6c 6c 79 20 69 6d 70 6f 72 74 61 6e 74 tially important
a5f0: 20 5b 6e 6f 6e 2d 66 61 74 61 6c 5d 20 65 72 72 [non-fatal] err
a600: 6f 72 20 63 6f 6e 64 69 74 69 6f 6e 73 0d 0a 20 or conditions..
a610: 20 20 20 20 20 2f 2f 2f 20 74 68 61 74 20 63 61 /// that ca
a620: 6e 6e 6f 74 20 62 65 20 65 61 73 69 6c 79 20 72 nnot be easily r
a630: 65 70 6f 72 74 65 64 20 74 68 72 6f 75 67 68 20 eported through
a640: 6f 74 68 65 72 20 6d 65 61 6e 73 2e 0d 0a 20 20 other means...
a650: 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 /// </summar
a660: 79 3e 0d 0a 20 20 20 20 20 20 54 72 61 63 65 57 y>.. TraceW
a670: 61 72 6e 69 6e 67 20 3d 20 30 78 38 30 30 30 2c arning = 0x8000,
a680: 0d 0a 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c 73 .... /// <s
a690: 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 2f ummary>.. /
a6a0: 2f 2f 20 57 68 65 6e 20 62 69 6e 64 69 6e 67 20 // When binding
a6b0: 70 61 72 61 6d 65 74 65 72 20 76 61 6c 75 65 73 parameter values
a6c0: 2c 20 61 6c 77 61 79 73 20 75 73 65 20 74 68 65 , always use the
a6d0: 20 69 6e 76 61 72 69 61 6e 74 20 63 75 6c 74 75 invariant cultu
a6e0: 72 65 20 77 68 65 6e 0d 0a 20 20 20 20 20 20 2f re when.. /
a6f0: 2f 2f 20 63 6f 6e 76 65 72 74 69 6e 67 20 74 68 // converting th
a700: 65 69 72 20 76 61 6c 75 65 73 20 66 72 6f 6d 20 eir values from
a710: 73 74 72 69 6e 67 73 2e 0d 0a 20 20 20 20 20 20 strings...
a720: 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a /// </summary>..
a730: 20 20 20 20 20 20 43 6f 6e 76 65 72 74 49 6e 76 ConvertInv
a740: 61 72 69 61 6e 74 54 65 78 74 20 3d 20 30 78 31 ariantText = 0x1
a750: 30 30 30 30 2c 0d 0a 0d 0a 20 20 20 20 20 20 2f 0000,.... /
a760: 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 // <summary>..
a770: 20 20 20 20 2f 2f 2f 20 57 68 65 6e 20 62 69 6e /// When bin
a780: 64 69 6e 67 20 70 61 72 61 6d 65 74 65 72 20 76 ding parameter v
a790: 61 6c 75 65 73 2c 20 61 6c 77 61 79 73 20 75 73 alues, always us
a7a0: 65 20 74 68 65 20 69 6e 76 61 72 69 61 6e 74 20 e the invariant
a7b0: 63 75 6c 74 75 72 65 20 77 68 65 6e 0d 0a 20 20 culture when..
a7c0: 20 20 20 20 2f 2f 2f 20 63 6f 6e 76 65 72 74 69 /// converti
a7d0: 6e 67 20 74 68 65 69 72 20 76 61 6c 75 65 73 20 ng their values
a7e0: 74 6f 20 73 74 72 69 6e 67 73 2e 0d 0a 20 20 20 to strings...
a7f0: 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 /// </summary
a800: 3e 0d 0a 20 20 20 20 20 20 42 69 6e 64 49 6e 76 >.. BindInv
a810: 61 72 69 61 6e 74 54 65 78 74 20 3d 20 30 78 32 ariantText = 0x2
a820: 30 30 30 30 2c 0d 0a 0d 0a 20 20 20 20 20 20 2f 0000,.... /
a830: 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 // <summary>..
a840: 20 20 20 20 2f 2f 2f 20 44 69 73 61 62 6c 65 20 /// Disable
a850: 75 73 69 6e 67 20 74 68 65 20 63 6f 6e 6e 65 63 using the connec
a860: 74 69 6f 6e 20 70 6f 6f 6c 20 62 79 20 64 65 66 tion pool by def
a870: 61 75 6c 74 2e 20 20 49 66 20 74 68 65 20 22 50 ault. If the "P
a880: 6f 6f 6c 69 6e 67 22 0d 0a 20 20 20 20 20 20 2f ooling".. /
a890: 2f 2f 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 73 74 // connection st
a8a0: 72 69 6e 67 20 70 72 6f 70 65 72 74 79 20 69 73 ring property is
a8b0: 20 73 70 65 63 69 66 69 65 64 2c 20 69 74 73 20 specified, its
a8c0: 76 61 6c 75 65 20 77 69 6c 6c 20 6f 76 65 72 72 value will overr
a8d0: 69 64 65 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 74 ide.. /// t
a8e0: 68 69 73 20 66 6c 61 67 2e 20 20 54 68 65 20 70 his flag. The p
a8f0: 72 65 63 69 73 65 20 6f 75 74 63 6f 6d 65 20 6f recise outcome o
a900: 66 20 63 6f 6d 62 69 6e 69 6e 67 20 74 68 69 73 f combining this
a910: 20 66 6c 61 67 20 77 69 74 68 20 74 68 65 0d 0a flag with the..
a920: 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 20 63 /// <see c
a930: 72 65 66 3d 22 55 73 65 43 6f 6e 6e 65 63 74 69 ref="UseConnecti
a940: 6f 6e 50 6f 6f 6c 22 20 2f 3e 20 66 6c 61 67 20 onPool" /> flag
a950: 69 73 20 75 6e 73 70 65 63 69 66 69 65 64 3b 20 is unspecified;
a960: 68 6f 77 65 76 65 72 2c 0d 0a 20 20 20 20 20 20 however,..
a970: 2f 2f 2f 20 6f 6e 65 20 6f 66 20 74 68 65 20 66 /// one of the f
a980: 6c 61 67 73 20 77 69 6c 6c 20 62 65 20 69 6e 20 lags will be in
a990: 65 66 66 65 63 74 2e 0d 0a 20 20 20 20 20 20 2f effect... /
a9a0: 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 // </summary>..
a9b0: 20 20 20 20 20 4e 6f 43 6f 6e 6e 65 63 74 69 6f NoConnectio
a9c0: 6e 50 6f 6f 6c 20 3d 20 30 78 34 30 30 30 30 2c nPool = 0x40000,
a9d0: 0d 0a 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c 73 .... /// <s
a9e0: 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 2f ummary>.. /
a9f0: 2f 2f 20 45 6e 61 62 6c 65 20 75 73 69 6e 67 20 // Enable using
aa00: 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 70 the connection p
aa10: 6f 6f 6c 20 62 79 20 64 65 66 61 75 6c 74 2e 20 ool by default.
aa20: 20 49 66 20 74 68 65 20 22 50 6f 6f 6c 69 6e 67 If the "Pooling
aa30: 22 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 63 6f 6e ".. /// con
aa40: 6e 65 63 74 69 6f 6e 20 73 74 72 69 6e 67 20 70 nection string p
aa50: 72 6f 70 65 72 74 79 20 69 73 20 73 70 65 63 69 roperty is speci
aa60: 66 69 65 64 2c 20 69 74 73 20 76 61 6c 75 65 20 fied, its value
aa70: 77 69 6c 6c 20 6f 76 65 72 72 69 64 65 0d 0a 20 will override..
aa80: 20 20 20 20 20 2f 2f 2f 20 74 68 69 73 20 66 6c /// this fl
aa90: 61 67 2e 20 20 54 68 65 20 70 72 65 63 69 73 65 ag. The precise
aaa0: 20 6f 75 74 63 6f 6d 65 20 6f 66 20 63 6f 6d 62 outcome of comb
aab0: 69 6e 69 6e 67 20 74 68 69 73 20 66 6c 61 67 20 ining this flag
aac0: 77 69 74 68 20 74 68 65 0d 0a 20 20 20 20 20 20 with the..
aad0: 2f 2f 2f 20 3c 73 65 65 20 63 72 65 66 3d 22 4e /// <see cref="N
aae0: 6f 43 6f 6e 6e 65 63 74 69 6f 6e 50 6f 6f 6c 22 oConnectionPool"
aaf0: 20 2f 3e 20 66 6c 61 67 20 69 73 20 75 6e 73 70 /> flag is unsp
ab00: 65 63 69 66 69 65 64 3b 20 68 6f 77 65 76 65 72 ecified; however
ab10: 2c 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 6f 6e 65 ,.. /// one
ab20: 20 6f 66 20 74 68 65 20 66 6c 61 67 73 20 77 69 of the flags wi
ab30: 6c 6c 20 62 65 20 69 6e 20 65 66 66 65 63 74 2e ll be in effect.
ab40: 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 .. /// </su
ab50: 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 55 73 mmary>.. Us
ab60: 65 43 6f 6e 6e 65 63 74 69 6f 6e 50 6f 6f 6c 20 eConnectionPool
ab70: 3d 20 30 78 38 30 30 30 30 2c 0d 0a 0d 0a 20 20 = 0x80000,....
ab80: 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 /// <summary
ab90: 3e 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 45 6e 61 >.. /// Ena
aba0: 62 6c 65 20 75 73 69 6e 67 20 70 65 72 2d 63 6f ble using per-co
abb0: 6e 6e 65 63 74 69 6f 6e 20 6d 61 70 70 69 6e 67 nnection mapping
abc0: 73 20 62 65 74 77 65 65 6e 20 74 79 70 65 20 6e s between type n
abd0: 61 6d 65 73 20 61 6e 64 0d 0a 20 20 20 20 20 20 ames and..
abe0: 2f 2f 2f 20 3c 73 65 65 20 63 72 65 66 3d 22 44 /// <see cref="D
abf0: 62 54 79 70 65 22 20 2f 3e 20 76 61 6c 75 65 73 bType" /> values
ac00: 2e 20 20 41 6c 73 6f 20 73 65 65 20 74 68 65 0d . Also see the.
ac10: 0a 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 20 . /// <see
ac20: 63 72 65 66 3d 22 53 51 4c 69 74 65 43 6f 6e 6e cref="SQLiteConn
ac30: 65 63 74 69 6f 6e 2e 43 6c 65 61 72 54 79 70 65 ection.ClearType
ac40: 4d 61 70 70 69 6e 67 73 22 20 2f 3e 2c 0d 0a 20 Mappings" />,..
ac50: 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 20 63 72 /// <see cr
ac60: 65 66 3d 22 53 51 4c 69 74 65 43 6f 6e 6e 65 63 ef="SQLiteConnec
ac70: 74 69 6f 6e 2e 47 65 74 54 79 70 65 4d 61 70 70 tion.GetTypeMapp
ac80: 69 6e 67 73 22 20 2f 3e 2c 20 61 6e 64 0d 0a 20 ings" />, and..
ac90: 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 20 63 72 /// <see cr
aca0: 65 66 3d 22 53 51 4c 69 74 65 43 6f 6e 6e 65 63 ef="SQLiteConnec
acb0: 74 69 6f 6e 2e 41 64 64 54 79 70 65 4d 61 70 70 tion.AddTypeMapp
acc0: 69 6e 67 22 20 2f 3e 20 6d 65 74 68 6f 64 73 2e ing" /> methods.
acd0: 20 20 54 68 65 73 65 0d 0a 20 20 20 20 20 20 2f These.. /
ace0: 2f 2f 20 70 65 72 2d 63 6f 6e 6e 65 63 74 69 6f // per-connectio
acf0: 6e 20 6d 61 70 70 69 6e 67 73 2c 20 77 68 65 6e n mappings, when
ad00: 20 70 72 65 73 65 6e 74 2c 20 6f 76 65 72 72 69 present, overri
ad10: 64 65 20 74 68 65 20 63 6f 72 72 65 73 70 6f 6e de the correspon
ad20: 64 69 6e 67 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 ding.. ///
ad30: 67 6c 6f 62 61 6c 20 6d 61 70 70 69 6e 67 73 2e global mappings.
ad40: 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 .. /// </su
ad50: 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 55 73 mmary>.. Us
ad60: 65 43 6f 6e 6e 65 63 74 69 6f 6e 54 79 70 65 73 eConnectionTypes
ad70: 20 3d 20 30 78 31 30 30 30 30 30 2c 0d 0a 0d 0a = 0x100000,....
ad80: 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 /// <summa
ad90: 72 79 3e 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 44 ry>.. /// D
ada0: 69 73 61 62 6c 65 20 75 73 69 6e 67 20 67 6c 6f isable using glo
adb0: 62 61 6c 20 6d 61 70 70 69 6e 67 73 20 62 65 74 bal mappings bet
adc0: 77 65 65 6e 20 74 79 70 65 20 6e 61 6d 65 73 20 ween type names
add0: 61 6e 64 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c and.. /// <
ade0: 73 65 65 20 63 72 65 66 3d 22 44 62 54 79 70 65 see cref="DbType
adf0: 22 20 2f 3e 20 76 61 6c 75 65 73 2e 20 20 54 68 " /> values. Th
ae00: 69 73 20 6d 61 79 20 62 65 20 75 73 65 66 75 6c is may be useful
ae10: 20 69 6e 20 73 6f 6d 65 20 76 65 72 79 20 6e 61 in some very na
ae20: 72 72 6f 77 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 rrow.. ///
ae30: 63 61 73 65 73 3b 20 68 6f 77 65 76 65 72 2c 20 cases; however,
ae40: 69 66 20 74 68 65 72 65 20 61 72 65 20 6e 6f 20 if there are no
ae50: 70 65 72 2d 63 6f 6e 6e 65 63 74 69 6f 6e 20 74 per-connection t
ae60: 79 70 65 20 6d 61 70 70 69 6e 67 73 2c 20 74 68 ype mappings, th
ae70: 65 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 66 61 6c e.. /// fal
ae80: 6c 62 61 63 6b 20 64 65 66 61 75 6c 74 73 20 77 lback defaults w
ae90: 69 6c 6c 20 62 65 20 75 73 65 64 20 66 6f 72 20 ill be used for
aea0: 62 6f 74 68 20 74 79 70 65 20 6e 61 6d 65 73 20 both type names
aeb0: 61 6e 64 20 74 68 65 69 72 0d 0a 20 20 20 20 20 and their..
aec0: 20 2f 2f 2f 20 61 73 73 6f 63 69 61 74 65 64 20 /// associated
aed0: 3c 73 65 65 20 63 72 65 66 3d 22 44 62 54 79 70 <see cref="DbTyp
aee0: 65 22 20 2f 3e 20 76 61 6c 75 65 73 2e 20 20 54 e" /> values. T
aef0: 68 65 72 65 66 6f 72 65 2c 20 75 73 65 20 6f 66 herefore, use of
af00: 20 74 68 69 73 20 66 6c 61 67 0d 0a 20 20 20 20 this flag..
af10: 20 20 2f 2f 2f 20 69 73 20 6e 6f 74 20 72 65 63 /// is not rec
af20: 6f 6d 6d 65 6e 64 65 64 2e 0d 0a 20 20 20 20 20 ommended...
af30: 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d /// </summary>.
af40: 0a 20 20 20 20 20 20 4e 6f 47 6c 6f 62 61 6c 54 . NoGlobalT
af50: 79 70 65 73 20 3d 20 30 78 32 30 30 30 30 30 2c ypes = 0x200000,
af60: 0d 0a 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c 73 .... /// <s
af70: 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 2f ummary>.. /
af80: 2f 2f 20 57 68 65 6e 20 74 68 65 20 3c 73 65 65 // When the <see
af90: 20 63 72 65 66 3d 22 53 51 4c 69 74 65 44 61 74 cref="SQLiteDat
afa0: 61 52 65 61 64 65 72 2e 48 61 73 52 6f 77 73 22 aReader.HasRows"
afb0: 20 2f 3e 20 70 72 6f 70 65 72 74 79 20 69 73 20 /> property is
afc0: 75 73 65 64 2c 20 69 74 0d 0a 20 20 20 20 20 20 used, it..
afd0: 2f 2f 2f 20 73 68 6f 75 6c 64 20 72 65 74 75 72 /// should retur
afe0: 6e 20 6e 6f 6e 2d 7a 65 72 6f 20 69 66 20 74 68 n non-zero if th
aff0: 65 72 65 20 77 65 72 65 20 65 76 65 72 20 61 6e ere were ever an
b000: 79 20 72 6f 77 73 20 69 6e 20 74 68 65 20 61 73 y rows in the as
b010: 73 6f 63 69 61 74 65 64 0d 0a 20 20 20 20 20 20 sociated..
b020: 2f 2f 2f 20 72 65 73 75 6c 74 20 73 65 74 73 2e /// result sets.
b030: 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 .. /// </su
b040: 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 53 74 mmary>.. St
b050: 69 63 6b 79 48 61 73 52 6f 77 73 20 3d 20 30 78 ickyHasRows = 0x
b060: 34 30 30 30 30 30 2c 0d 0a 0d 0a 20 20 20 20 20 400000,....
b070: 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a /// <summary>..
b080: 20 20 20 20 20 20 2f 2f 2f 20 45 6e 61 62 6c 65 /// Enable
b090: 20 22 73 74 72 69 63 74 22 20 74 72 61 6e 73 61 "strict" transa
b0a0: 63 74 69 6f 6e 20 65 6e 6c 69 73 74 6d 65 6e 74 ction enlistment
b0b0: 20 73 65 6d 61 6e 74 69 63 73 2e 20 20 53 65 74 semantics. Set
b0c0: 74 69 6e 67 20 74 68 69 73 20 66 6c 61 67 0d 0a ting this flag..
b0d0: 20 20 20 20 20 20 2f 2f 2f 20 77 69 6c 6c 20 63 /// will c
b0e0: 61 75 73 65 20 61 6e 20 65 78 63 65 70 74 69 6f ause an exceptio
b0f0: 6e 20 74 6f 20 62 65 20 74 68 72 6f 77 6e 20 69 n to be thrown i
b100: 66 20 61 6e 20 61 74 74 65 6d 70 74 20 69 73 20 f an attempt is
b110: 6d 61 64 65 20 74 6f 20 65 6e 6c 69 73 74 0d 0a made to enlist..
b120: 20 20 20 20 20 20 2f 2f 2f 20 69 6e 20 61 20 74 /// in a t
b130: 72 61 6e 73 61 63 74 69 6f 6e 20 77 69 74 68 20 ransaction with
b140: 61 6e 20 75 6e 61 76 61 69 6c 61 62 6c 65 20 6f an unavailable o
b150: 72 20 75 6e 73 75 70 70 6f 72 74 65 64 20 69 73 r unsupported is
b160: 6f 6c 61 74 69 6f 6e 20 6c 65 76 65 6c 2e 0d 0a olation level...
b170: 20 20 20 20 20 20 2f 2f 2f 20 49 6e 20 74 68 65 /// In the
b180: 20 66 75 74 75 72 65 2c 20 6d 6f 72 65 20 65 78 future, more ex
b190: 74 65 6e 73 69 76 65 20 63 68 65 63 6b 73 20 6d tensive checks m
b1a0: 61 79 20 62 65 20 65 6e 61 62 6c 65 64 20 62 79 ay be enabled by
b1b0: 20 74 68 69 73 20 66 6c 61 67 20 61 73 0d 0a 20 this flag as..
b1c0: 20 20 20 20 20 2f 2f 2f 20 77 65 6c 6c 2e 0d 0a /// well...
b1d0: 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d /// </summ
b1e0: 61 72 79 3e 0d 0a 20 20 20 20 20 20 53 74 72 69 ary>.. Stri
b1f0: 63 74 45 6e 6c 69 73 74 6d 65 6e 74 20 3d 20 30 ctEnlistment = 0
b200: 78 38 30 30 30 30 30 2c 0d 0a 0d 0a 20 20 20 20 x800000,....
b210: 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d /// <summary>.
b220: 0a 20 20 20 20 20 20 2f 2f 2f 20 45 6e 61 62 6c . /// Enabl
b230: 65 20 6d 61 70 70 69 6e 67 20 6f 66 20 75 6e 73 e mapping of uns
b240: 75 70 70 6f 72 74 65 64 20 74 72 61 6e 73 61 63 upported transac
b250: 74 69 6f 6e 20 69 73 6f 6c 61 74 69 6f 6e 20 6c tion isolation l
b260: 65 76 65 6c 73 20 74 6f 20 74 68 65 0d 0a 20 20 evels to the..
b270: 20 20 20 20 2f 2f 2f 20 63 6c 6f 73 65 73 74 20 /// closest
b280: 73 75 70 70 6f 72 74 65 64 20 74 72 61 6e 73 61 supported transa
b290: 63 74 69 6f 6e 20 69 73 6f 6c 61 74 69 6f 6e 20 ction isolation
b2a0: 6c 65 76 65 6c 2e 0d 0a 20 20 20 20 20 20 2f 2f level... //
b2b0: 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 / </summary>..
b2c0: 20 20 20 20 4d 61 70 49 73 6f 6c 61 74 69 6f 6e MapIsolation
b2d0: 4c 65 76 65 6c 73 20 3d 20 30 78 31 30 30 30 30 Levels = 0x10000
b2e0: 30 30 2c 0d 0a 0d 0a 20 20 20 20 20 20 2f 2f 2f 00,.... ///
b2f0: 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 <summary>..
b300: 20 20 2f 2f 2f 20 57 68 65 6e 20 72 65 74 75 72 /// When retur
b310: 6e 69 6e 67 20 63 6f 6c 75 6d 6e 20 76 61 6c 75 ning column valu
b320: 65 73 2c 20 61 74 74 65 6d 70 74 20 74 6f 20 64 es, attempt to d
b330: 65 74 65 63 74 20 74 68 65 20 61 66 66 69 6e 69 etect the affini
b340: 74 79 20 6f 66 0d 0a 20 20 20 20 20 20 2f 2f 2f ty of.. ///
b350: 20 74 65 78 74 75 61 6c 20 76 61 6c 75 65 73 20 textual values
b360: 62 79 20 63 68 65 63 6b 69 6e 67 20 69 66 20 74 by checking if t
b370: 68 65 79 20 66 75 6c 6c 79 20 63 6f 6e 66 6f 72 hey fully confor
b380: 6d 20 74 6f 20 74 68 6f 73 65 20 6f 66 20 74 68 m to those of th
b390: 65 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 e.. /// <se
b3a0: 65 20 63 72 65 66 3d 22 54 79 70 65 41 66 66 69 e cref="TypeAffi
b3b0: 6e 69 74 79 2e 4e 75 6c 6c 22 20 2f 3e 2c 0d 0a nity.Null" />,..
b3c0: 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 20 63 /// <see c
b3d0: 72 65 66 3d 22 54 79 70 65 41 66 66 69 6e 69 74 ref="TypeAffinit
b3e0: 79 2e 49 6e 74 36 34 22 20 2f 3e 2c 0d 0a 20 20 y.Int64" />,..
b3f0: 20 20 20 20 2f 2f 2f 20 3c 73 65 65 20 63 72 65 /// <see cre
b400: 66 3d 22 54 79 70 65 41 66 66 69 6e 69 74 79 2e f="TypeAffinity.
b410: 44 6f 75 62 6c 65 22 20 2f 3e 2c 0d 0a 20 20 20 Double" />,..
b420: 20 20 20 2f 2f 2f 20 6f 72 20 3c 73 65 65 20 63 /// or <see c
b430: 72 65 66 3d 22 54 79 70 65 41 66 66 69 6e 69 74 ref="TypeAffinit
b440: 79 2e 44 61 74 65 54 69 6d 65 22 20 2f 3e 20 74 y.DateTime" /> t
b450: 79 70 65 73 2e 0d 0a 20 20 20 20 20 20 2f 2f 2f ypes... ///
b460: 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 </summary>..
b470: 20 20 20 44 65 74 65 63 74 54 65 78 74 41 66 66 DetectTextAff
b480: 69 6e 69 74 79 20 3d 20 30 78 32 30 30 30 30 30 inity = 0x200000
b490: 30 2c 0d 0a 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 0,.... ///
b4a0: 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 <summary>..
b4b0: 20 2f 2f 2f 20 57 68 65 6e 20 72 65 74 75 72 6e /// When return
b4c0: 69 6e 67 20 63 6f 6c 75 6d 6e 20 76 61 6c 75 65 ing column value
b4d0: 73 2c 20 61 74 74 65 6d 70 74 20 74 6f 20 64 65 s, attempt to de
b4e0: 74 65 63 74 20 74 68 65 20 74 79 70 65 20 6f 66 tect the type of
b4f0: 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 73 74 72 69 .. /// stri
b500: 6e 67 20 76 61 6c 75 65 73 20 62 79 20 63 68 65 ng values by che
b510: 63 6b 69 6e 67 20 69 66 20 74 68 65 79 20 66 75 cking if they fu
b520: 6c 6c 79 20 63 6f 6e 66 6f 72 6d 20 74 6f 20 74 lly conform to t
b530: 68 6f 73 65 20 6f 66 0d 0a 20 20 20 20 20 20 2f hose of.. /
b540: 2f 2f 20 74 68 65 20 3c 73 65 65 20 63 72 65 66 // the <see cref
b550: 3d 22 54 79 70 65 41 66 66 69 6e 69 74 79 2e 4e ="TypeAffinity.N
b560: 75 6c 6c 22 20 2f 3e 2c 0d 0a 20 20 20 20 20 20 ull" />,..
b570: 2f 2f 2f 20 3c 73 65 65 20 63 72 65 66 3d 22 54 /// <see cref="T
b580: 79 70 65 41 66 66 69 6e 69 74 79 2e 49 6e 74 36 ypeAffinity.Int6
b590: 34 22 20 2f 3e 2c 0d 0a 20 20 20 20 20 20 2f 2f 4" />,.. //
b5a0: 2f 20 3c 73 65 65 20 63 72 65 66 3d 22 54 79 70 / <see cref="Typ
b5b0: 65 41 66 66 69 6e 69 74 79 2e 44 6f 75 62 6c 65 eAffinity.Double
b5c0: 22 20 2f 3e 2c 0d 0a 20 20 20 20 20 20 2f 2f 2f " />,.. ///
b5d0: 20 6f 72 20 3c 73 65 65 20 63 72 65 66 3d 22 54 or <see cref="T
b5e0: 79 70 65 41 66 66 69 6e 69 74 79 2e 44 61 74 65 ypeAffinity.Date
b5f0: 54 69 6d 65 22 20 2f 3e 20 74 79 70 65 73 2e 0d Time" /> types..
b600: 0a 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d . /// </sum
b610: 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 44 65 74 mary>.. Det
b620: 65 63 74 53 74 72 69 6e 67 54 79 70 65 20 3d 20 ectStringType =
b630: 30 78 34 30 30 30 30 30 30 2c 0d 0a 0d 0a 20 20 0x4000000,....
b640: 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 /// <summary
b650: 3e 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 53 6b 69 >.. /// Ski
b660: 70 20 71 75 65 72 79 69 6e 67 20 72 75 6e 74 69 p querying runti
b670: 6d 65 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e me configuration
b680: 20 73 65 74 74 69 6e 67 73 20 66 6f 72 20 75 73 settings for us
b690: 65 20 62 79 20 74 68 65 0d 0a 20 20 20 20 20 20 e by the..
b6a0: 2f 2f 2f 20 3c 73 65 65 20 63 72 65 66 3d 22 53 /// <see cref="S
b6b0: 51 4c 69 74 65 43 6f 6e 76 65 72 74 22 20 2f 3e QLiteConvert" />
b6c0: 20 63 6c 61 73 73 2c 20 69 6e 63 6c 75 64 69 6e class, includin
b6d0: 67 20 74 68 65 20 64 65 66 61 75 6c 74 0d 0a 20 g the default..
b6e0: 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 20 63 72 /// <see cr
b6f0: 65 66 3d 22 44 62 54 79 70 65 22 20 2f 3e 20 76 ef="DbType" /> v
b700: 61 6c 75 65 20 61 6e 64 20 64 65 66 61 75 6c 74 alue and default
b710: 20 64 61 74 61 62 61 73 65 20 74 79 70 65 20 6e database type n
b720: 61 6d 65 2e 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 ame... ///
b730: 3c 62 3e 4e 4f 54 45 3a 20 49 66 20 74 68 65 20 <b>NOTE: If the
b740: 3c 73 65 65 20 63 72 65 66 3d 22 53 51 4c 69 74 <see cref="SQLit
b750: 65 43 6f 6e 6e 65 63 74 69 6f 6e 2e 44 65 66 61 eConnection.Defa
b760: 75 6c 74 44 62 54 79 70 65 22 20 2f 3e 0d 0a 20 ultDbType" />..
b770: 20 20 20 20 20 2f 2f 2f 20 61 6e 64 2f 6f 72 20 /// and/or
b780: 3c 73 65 65 20 63 72 65 66 3d 22 53 51 4c 69 74 <see cref="SQLit
b790: 65 43 6f 6e 6e 65 63 74 69 6f 6e 2e 44 65 66 61 eConnection.Defa
b7a0: 75 6c 74 54 79 70 65 4e 61 6d 65 22 20 2f 3e 0d ultTypeName" />.
b7b0: 0a 20 20 20 20 20 20 2f 2f 2f 20 70 72 6f 70 65 . /// prope
b7c0: 72 74 69 65 73 20 61 72 65 20 6e 6f 74 20 73 65 rties are not se
b7d0: 74 20 65 78 70 6c 69 63 69 74 6c 79 20 6e 6f 72 t explicitly nor
b7e0: 20 73 65 74 20 76 69 61 20 74 68 65 69 72 20 63 set via their c
b7f0: 6f 6e 6e 65 63 74 69 6f 6e 0d 0a 20 20 20 20 20 onnection..
b800: 20 2f 2f 2f 20 73 74 72 69 6e 67 20 70 72 6f 70 /// string prop
b810: 65 72 74 69 65 73 20 61 6e 64 20 72 65 70 65 61 erties and repea
b820: 74 65 64 20 63 61 6c 6c 73 20 74 6f 20 64 65 74 ted calls to det
b830: 65 72 6d 69 6e 65 20 74 68 65 73 65 20 72 75 6e ermine these run
b840: 74 69 6d 65 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 time.. ///
b850: 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 73 65 configuration se
b860: 74 74 69 6e 67 73 20 61 72 65 20 73 65 65 6e 20 ttings are seen
b870: 74 6f 20 62 65 20 61 20 70 72 6f 62 6c 65 6d 2c to be a problem,
b880: 20 74 68 69 73 20 66 6c 61 67 0d 0a 20 20 20 20 this flag..
b890: 20 20 2f 2f 2f 20 73 68 6f 75 6c 64 20 62 65 20 /// should be
b8a0: 73 65 74 2e 3c 2f 62 3e 0d 0a 20 20 20 20 20 20 set.</b>..
b8b0: 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a /// </summary>..
b8c0: 20 20 20 20 20 20 4e 6f 43 6f 6e 76 65 72 74 53 NoConvertS
b8d0: 65 74 74 69 6e 67 73 20 3d 20 30 78 38 30 30 30 ettings = 0x8000
b8e0: 30 30 30 2c 0d 0a 0d 0a 20 20 20 20 20 20 2f 2f 000,.... //
b8f0: 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 / <summary>..
b900: 20 20 20 2f 2f 2f 20 57 68 65 6e 20 62 69 6e 64 /// When bind
b910: 69 6e 67 20 70 61 72 61 6d 65 74 65 72 20 76 61 ing parameter va
b920: 6c 75 65 73 20 77 69 74 68 20 74 68 65 20 3c 73 lues with the <s
b930: 65 65 20 63 72 65 66 3d 22 44 61 74 65 54 69 6d ee cref="DateTim
b940: 65 22 20 2f 3e 0d 0a 20 20 20 20 20 20 2f 2f 2f e" />.. ///
b950: 20 74 79 70 65 2c 20 74 61 6b 65 20 74 68 65 69 type, take thei
b960: 72 20 3c 73 65 65 20 63 72 65 66 3d 22 44 61 74 r <see cref="Dat
b970: 65 54 69 6d 65 4b 69 6e 64 22 20 2f 3e 20 69 6e eTimeKind" /> in
b980: 74 6f 20 61 63 63 6f 75 6e 74 20 61 73 0d 0a 20 to account as..
b990: 20 20 20 20 20 2f 2f 2f 20 77 65 6c 6c 20 61 73 /// well as
b9a0: 20 74 68 61 74 20 6f 66 20 74 68 65 20 61 73 73 that of the ass
b9b0: 6f 63 69 61 74 65 64 20 3c 73 65 65 20 63 72 65 ociated <see cre
b9c0: 66 3d 22 53 51 4c 69 74 65 43 6f 6e 6e 65 63 74 f="SQLiteConnect
b9d0: 69 6f 6e 22 20 2f 3e 2e 0d 0a 20 20 20 20 20 20 ion" />...
b9e0: 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a /// </summary>..
b9f0: 20 20 20 20 20 20 42 69 6e 64 44 61 74 65 54 69 BindDateTi
ba00: 6d 65 57 69 74 68 4b 69 6e 64 20 3d 20 30 78 31 meWithKind = 0x1
ba10: 30 30 30 30 30 30 30 2c 0d 0a 0d 0a 20 20 20 20 0000000,....
ba20: 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d /// <summary>.
ba30: 0a 20 20 20 20 20 20 2f 2f 2f 20 49 66 20 61 6e . /// If an
ba40: 20 65 78 63 65 70 74 69 6f 6e 20 69 73 20 63 61 exception is ca
ba50: 75 67 68 74 20 77 68 65 6e 20 72 61 69 73 69 6e ught when raisin
ba60: 67 20 74 68 65 0d 0a 20 20 20 20 20 20 2f 2f 2f g the.. ///
ba70: 20 3c 73 65 65 20 63 72 65 66 3d 22 53 51 4c 69 <see cref="SQLi
ba80: 74 65 43 6f 6e 6e 65 63 74 69 6f 6e 2e 43 6f 6d teConnection.Com
ba90: 6d 69 74 22 20 2f 3e 20 65 76 65 6e 74 2c 20 74 mit" /> event, t
baa0: 68 65 20 74 72 61 6e 73 61 63 74 69 6f 6e 0d 0a he transaction..
bab0: 20 20 20 20 20 20 2f 2f 2f 20 73 68 6f 75 6c 64 /// should
bac0: 20 62 65 20 72 6f 6c 6c 65 64 20 62 61 63 6b 2e be rolled back.
bad0: 20 20 49 66 20 74 68 69 73 20 69 73 20 6e 6f 74 If this is not
bae0: 20 73 70 65 63 69 66 69 65 64 2c 20 74 68 65 20 specified, the
baf0: 74 72 61 6e 73 61 63 74 69 6f 6e 0d 0a 20 20 20 transaction..
bb00: 20 20 20 2f 2f 2f 20 77 69 6c 6c 20 63 6f 6e 74 /// will cont
bb10: 69 6e 75 65 20 74 68 65 20 63 6f 6d 6d 69 74 20 inue the commit
bb20: 70 72 6f 63 65 73 73 20 69 6e 73 74 65 61 64 2e process instead.
bb30: 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 .. /// </su
bb40: 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 52 6f mmary>.. Ro
bb50: 6c 6c 62 61 63 6b 4f 6e 45 78 63 65 70 74 69 6f llbackOnExceptio
bb60: 6e 20 3d 20 30 78 32 30 30 30 30 30 30 30 2c 0d n = 0x20000000,.
bb70: 0a 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 ... /// <su
bb80: 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 2f 2f mmary>.. //
bb90: 2f 20 49 66 20 61 6e 20 65 78 63 65 70 74 69 6f / If an exceptio
bba0: 6e 20 69 73 20 63 61 75 67 68 74 20 77 68 65 6e n is caught when
bbb0: 20 72 61 69 73 69 6e 67 20 74 68 65 0d 0a 20 20 raising the..
bbc0: 20 20 20 20 2f 2f 2f 20 3c 73 65 65 20 63 72 65 /// <see cre
bbd0: 66 3d 22 53 51 4c 69 74 65 43 6f 6e 6e 65 63 74 f="SQLiteConnect
bbe0: 69 6f 6e 2e 41 75 74 68 6f 72 69 7a 65 22 20 2f ion.Authorize" /
bbf0: 3e 20 65 76 65 6e 74 2c 20 74 68 65 20 61 63 74 > event, the act
bc00: 69 6f 6e 20 73 68 6f 75 6c 64 0d 0a 20 20 20 20 ion should..
bc10: 20 20 2f 2f 2f 20 73 68 6f 75 6c 64 20 62 65 20 /// should be
bc20: 64 65 6e 69 65 64 2e 20 20 49 66 20 74 68 69 73 denied. If this
bc30: 20 69 73 20 6e 6f 74 20 73 70 65 63 69 66 69 65 is not specifie
bc40: 64 2c 20 74 68 65 20 61 63 74 69 6f 6e 20 77 69 d, the action wi
bc50: 6c 6c 20 62 65 0d 0a 20 20 20 20 20 20 2f 2f 2f ll be.. ///
bc60: 20 61 6c 6c 6f 77 65 64 20 69 6e 73 74 65 61 64 allowed instead
bc70: 2e 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 ... /// </s
bc80: 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 44 ummary>.. D
bc90: 65 6e 79 4f 6e 45 78 63 65 70 74 69 6f 6e 20 3d enyOnException =
bca0: 20 30 78 34 30 30 30 30 30 30 30 2c 0d 0a 0d 0a 0x40000000,....
bcb0: 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 /// <summa
bcc0: 72 79 3e 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 49 ry>.. /// I
bcd0: 66 20 61 6e 20 65 78 63 65 70 74 69 6f 6e 20 69 f an exception i
bce0: 73 20 63 61 75 67 68 74 20 77 68 65 6e 20 72 61 s caught when ra
bcf0: 69 73 69 6e 67 20 74 68 65 0d 0a 20 20 20 20 20 ising the..
bd00: 20 2f 2f 2f 20 3c 73 65 65 20 63 72 65 66 3d 22 /// <see cref="
bd10: 53 51 4c 69 74 65 43 6f 6e 6e 65 63 74 69 6f 6e SQLiteConnection
bd20: 2e 50 72 6f 67 72 65 73 73 22 20 2f 3e 20 65 76 .Progress" /> ev
bd30: 65 6e 74 2c 20 74 68 65 20 6f 70 65 72 61 74 69 ent, the operati
bd40: 6f 6e 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 73 68 on.. /// sh
bd50: 6f 75 6c 64 20 62 65 20 69 6e 74 65 72 72 75 70 ould be interrup
bd60: 74 65 64 2e 20 20 49 66 20 74 68 69 73 20 69 73 ted. If this is
bd70: 20 6e 6f 74 20 73 70 65 63 69 66 69 65 64 2c 20 not specified,
bd80: 74 68 65 20 6f 70 65 72 61 74 69 6f 6e 0d 0a 20 the operation..
bd90: 20 20 20 20 20 2f 2f 2f 20 77 69 6c 6c 20 73 69 /// will si
bda0: 6d 70 6c 79 20 63 6f 6e 74 69 6e 75 65 2e 0d 0a mply continue...
bdb0: 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d /// </summ
bdc0: 61 72 79 3e 0d 0a 20 20 20 20 20 20 49 6e 74 65 ary>.. Inte
bdd0: 72 72 75 70 74 4f 6e 45 78 63 65 70 74 69 6f 6e rruptOnException
bde0: 20 3d 20 30 78 38 30 30 30 30 30 30 30 2c 0d 0a = 0x80000000,..
bdf0: 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d .. /// <sum
be00: 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 2f 2f 2f mary>.. ///
be10: 20 41 74 74 65 6d 70 74 20 74 6f 20 75 6e 62 69 Attempt to unbi
be20: 6e 64 20 61 6c 6c 20 66 75 6e 63 74 69 6f 6e 73 nd all functions
be30: 20 70 72 6f 76 69 64 65 64 20 62 79 20 6f 74 68 provided by oth
be40: 65 72 20 6d 61 6e 61 67 65 64 20 61 73 73 65 6d er managed assem
be50: 62 6c 69 65 73 0d 0a 20 20 20 20 20 20 2f 2f 2f blies.. ///
be60: 20 77 68 65 6e 20 63 6c 6f 73 69 6e 67 20 74 68 when closing th
be70: 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 2e 0d 0a 20 e connection...
be80: 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 /// </summa
be90: 72 79 3e 0d 0a 20 20 20 20 20 20 55 6e 62 69 6e ry>.. Unbin
bea0: 64 46 75 6e 63 74 69 6f 6e 73 4f 6e 43 6c 6f 73 dFunctionsOnClos
beb0: 65 20 3d 20 30 78 31 30 30 30 30 30 30 30 30 2c e = 0x100000000,
bec0: 0d 0a 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c 73 .... /// <s
bed0: 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 2f ummary>.. /
bee0: 2f 2f 20 57 68 65 6e 20 72 65 74 75 72 6e 69 6e // When returnin
bef0: 67 20 63 6f 6c 75 6d 6e 20 76 61 6c 75 65 73 20 g column values
bf00: 61 73 20 61 20 3c 73 65 65 20 63 72 65 66 3d 22 as a <see cref="
bf10: 53 74 72 69 6e 67 22 20 2f 3e 2c 20 73 6b 69 70 String" />, skip
bf20: 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 76 65 72 69 .. /// veri
bf30: 66 79 69 6e 67 20 74 68 65 69 72 20 61 66 66 69 fying their affi
bf40: 6e 69 74 79 2e 0d 0a 20 20 20 20 20 20 2f 2f 2f nity... ///
bf50: 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 </summary>..
bf60: 20 20 20 4e 6f 56 65 72 69 66 79 54 65 78 74 41 NoVerifyTextA
bf70: 66 66 69 6e 69 74 79 20 3d 20 30 78 32 30 30 30 ffinity = 0x2000
bf80: 30 30 30 30 30 2c 0d 0a 0d 0a 20 20 20 20 20 20 00000,....
bf90: 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 /// <summary>..
bfa0: 20 20 20 20 20 2f 2f 2f 20 45 6e 61 62 6c 65 20 /// Enable
bfb0: 75 73 69 6e 67 20 70 65 72 2d 63 6f 6e 6e 65 63 using per-connec
bfc0: 74 69 6f 6e 20 6d 61 70 70 69 6e 67 73 20 62 65 tion mappings be
bfd0: 74 77 65 65 6e 20 74 79 70 65 20 6e 61 6d 65 73 tween type names
bfe0: 20 61 6e 64 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 and.. ///
bff0: 3c 73 65 65 20 63 72 65 66 3d 22 53 51 4c 69 74 <see cref="SQLit
c000: 65 42 69 6e 64 56 61 6c 75 65 43 61 6c 6c 62 61 eBindValueCallba
c010: 63 6b 22 20 2f 3e 20 76 61 6c 75 65 73 2e 20 20 ck" /> values.
c020: 41 6c 73 6f 20 73 65 65 20 74 68 65 0d 0a 20 20 Also see the..
c030: 20 20 20 20 2f 2f 2f 20 3c 73 65 65 20 63 72 65 /// <see cre
c040: 66 3d 22 53 51 4c 69 74 65 43 6f 6e 6e 65 63 74 f="SQLiteConnect
c050: 69 6f 6e 2e 43 6c 65 61 72 54 79 70 65 43 61 6c ion.ClearTypeCal
c060: 6c 62 61 63 6b 73 22 20 2f 3e 2c 0d 0a 20 20 20 lbacks" />,..
c070: 20 20 20 2f 2f 2f 20 3c 73 65 65 20 63 72 65 66 /// <see cref
c080: 3d 22 53 51 4c 69 74 65 43 6f 6e 6e 65 63 74 69 ="SQLiteConnecti
c090: 6f 6e 2e 54 72 79 47 65 74 54 79 70 65 43 61 6c on.TryGetTypeCal
c0a0: 6c 62 61 63 6b 73 22 20 2f 3e 2c 20 61 6e 64 0d lbacks" />, and.
c0b0: 0a 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 20 . /// <see
c0c0: 63 72 65 66 3d 22 53 51 4c 69 74 65 43 6f 6e 6e cref="SQLiteConn
c0d0: 65 63 74 69 6f 6e 2e 53 65 74 54 79 70 65 43 61 ection.SetTypeCa
c0e0: 6c 6c 62 61 63 6b 73 22 20 2f 3e 20 6d 65 74 68 llbacks" /> meth
c0f0: 6f 64 73 2e 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 ods... ///
c100: 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 </summary>..
c110: 20 20 55 73 65 43 6f 6e 6e 65 63 74 69 6f 6e 42 UseConnectionB
c120: 69 6e 64 56 61 6c 75 65 43 61 6c 6c 62 61 63 6b indValueCallback
c130: 73 20 3d 20 30 78 34 30 30 30 30 30 30 30 30 2c s = 0x400000000,
c140: 0d 0a 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c 73 .... /// <s
c150: 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 2f ummary>.. /
c160: 2f 2f 20 49 66 20 74 68 65 20 64 61 74 61 62 61 // If the databa
c170: 73 65 20 74 79 70 65 20 6e 61 6d 65 20 68 61 73 se type name has
c180: 20 6e 6f 74 20 62 65 65 6e 20 65 78 70 6c 69 63 not been explic
c190: 69 74 6c 79 20 73 65 74 20 66 6f 72 20 74 68 65 itly set for the
c1a0: 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 70 61 72 61 .. /// para
c1b0: 6d 65 74 65 72 20 73 70 65 63 69 66 69 65 64 2c meter specified,
c1c0: 20 66 61 6c 6c 62 61 63 6b 20 74 6f 20 75 73 69 fallback to usi
c1d0: 6e 67 20 74 68 65 20 64 61 74 61 62 61 73 65 20 ng the database
c1e0: 74 79 70 65 20 6e 61 6d 65 0d 0a 20 20 20 20 20 type name..
c1f0: 20 2f 2f 2f 20 61 73 73 6f 63 69 61 74 65 64 20 /// associated
c200: 77 69 74 68 20 74 68 65 20 3c 73 65 65 20 63 72 with the <see cr
c210: 65 66 3d 22 44 62 54 79 70 65 22 20 2f 3e 20 76 ef="DbType" /> v
c220: 61 6c 75 65 2e 0d 0a 20 20 20 20 20 20 2f 2f 2f alue... ///
c230: 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 </summary>..
c240: 20 20 20 55 73 65 50 61 72 61 6d 65 74 65 72 44 UseParameterD
c250: 62 54 79 70 65 46 6f 72 54 79 70 65 4e 61 6d 65 bTypeForTypeName
c260: 20 3d 20 30 78 38 30 30 30 30 30 30 30 30 2c 0d = 0x800000000,.
c270: 0a 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 ... /// <su
c280: 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 2f 2f mmary>.. //
c290: 2f 20 49 66 20 74 68 65 20 64 61 74 61 62 61 73 / If the databas
c2a0: 65 20 74 79 70 65 20 6e 61 6d 65 20 68 61 73 20 e type name has
c2b0: 6e 6f 74 20 62 65 65 6e 20 65 78 70 6c 69 63 69 not been explici
c2c0: 74 6c 79 20 73 65 74 20 66 6f 72 20 74 68 65 0d tly set for the.
c2d0: 0a 20 20 20 20 20 20 2f 2f 2f 20 70 61 72 61 6d . /// param
c2e0: 65 74 65 72 20 73 70 65 63 69 66 69 65 64 2c 20 eter specified,
c2f0: 66 61 6c 6c 62 61 63 6b 20 74 6f 20 75 73 69 6e fallback to usin
c300: 67 20 74 68 65 20 70 61 72 61 6d 65 74 65 72 20 g the parameter
c310: 6e 61 6d 65 2e 0d 0a 20 20 20 20 20 20 2f 2f 2f name... ///
c320: 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 </summary>..
c330: 20 20 20 55 73 65 50 61 72 61 6d 65 74 65 72 4e UseParameterN
c340: 61 6d 65 46 6f 72 54 79 70 65 4e 61 6d 65 20 3d ameForTypeName =
c350: 20 30 78 31 30 30 30 30 30 30 30 30 30 2c 0d 0a 0x1000000000,..
c360: 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d .. /// <sum
c370: 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 2f 2f 2f mary>.. ///
c380: 20 45 6e 61 62 6c 65 20 75 73 69 6e 67 20 70 65 Enable using pe
c390: 72 2d 63 6f 6e 6e 65 63 74 69 6f 6e 20 6d 61 70 r-connection map
c3a0: 70 69 6e 67 73 20 62 65 74 77 65 65 6e 20 74 79 pings between ty
c3b0: 70 65 20 6e 61 6d 65 73 20 61 6e 64 0d 0a 20 20 pe names and..
c3c0: 20 20 20 20 2f 2f 2f 20 3c 73 65 65 20 63 72 65 /// <see cre
c3d0: 66 3d 22 53 51 4c 69 74 65 52 65 61 64 56 61 6c f="SQLiteReadVal
c3e0: 75 65 43 61 6c 6c 62 61 63 6b 22 20 2f 3e 20 76 ueCallback" /> v
c3f0: 61 6c 75 65 73 2e 20 20 41 6c 73 6f 20 73 65 65 alues. Also see
c400: 20 74 68 65 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 the.. ///
c410: 3c 73 65 65 20 63 72 65 66 3d 22 53 51 4c 69 74 <see cref="SQLit
c420: 65 43 6f 6e 6e 65 63 74 69 6f 6e 2e 43 6c 65 61 eConnection.Clea
c430: 72 54 79 70 65 43 61 6c 6c 62 61 63 6b 73 22 20 rTypeCallbacks"
c440: 2f 3e 2c 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c />,.. /// <
c450: 73 65 65 20 63 72 65 66 3d 22 53 51 4c 69 74 65 see cref="SQLite
c460: 43 6f 6e 6e 65 63 74 69 6f 6e 2e 54 72 79 47 65 Connection.TryGe
c470: 74 54 79 70 65 43 61 6c 6c 62 61 63 6b 73 22 20 tTypeCallbacks"
c480: 2f 3e 2c 20 61 6e 64 0d 0a 20 20 20 20 20 20 2f />, and.. /
c490: 2f 2f 20 3c 73 65 65 20 63 72 65 66 3d 22 53 51 // <see cref="SQ
c4a0: 4c 69 74 65 43 6f 6e 6e 65 63 74 69 6f 6e 2e 53 LiteConnection.S
c4b0: 65 74 54 79 70 65 43 61 6c 6c 62 61 63 6b 73 22 etTypeCallbacks"
c4c0: 20 2f 3e 20 6d 65 74 68 6f 64 73 2e 0d 0a 20 20 /> methods...
c4d0: 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 /// </summar
c4e0: 79 3e 0d 0a 20 20 20 20 20 20 55 73 65 43 6f 6e y>.. UseCon
c4f0: 6e 65 63 74 69 6f 6e 52 65 61 64 56 61 6c 75 65 nectionReadValue
c500: 43 61 6c 6c 62 61 63 6b 73 20 3d 20 30 78 32 30 Callbacks = 0x20
c510: 30 30 30 30 30 30 30 30 2c 0d 0a 0d 0a 20 20 20 00000000,....
c520: 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e /// <summary>
c530: 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 57 68 65 6e .. /// When
c540: 20 62 69 6e 64 69 6e 67 20 70 61 72 61 6d 65 74 binding paramet
c550: 65 72 20 76 61 6c 75 65 73 20 6f 72 20 72 65 74 er values or ret
c560: 75 72 6e 69 6e 67 20 63 6f 6c 75 6d 6e 20 76 61 urning column va
c570: 6c 75 65 73 2c 20 61 6c 77 61 79 73 0d 0a 20 20 lues, always..
c580: 20 20 20 20 2f 2f 2f 20 74 72 65 61 74 20 74 68 /// treat th
c590: 65 6d 20 61 73 20 74 68 6f 75 67 68 20 74 68 65 em as though the
c5a0: 79 20 77 65 72 65 20 70 6c 61 69 6e 20 74 65 78 y were plain tex
c5b0: 74 20 28 69 2e 65 2e 20 6e 6f 20 6e 75 6d 65 72 t (i.e. no numer
c5c0: 69 63 2c 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 64 ic,.. /// d
c5d0: 61 74 65 2f 74 69 6d 65 2c 20 6f 72 20 6f 74 68 ate/time, or oth
c5e0: 65 72 20 63 6f 6e 76 65 72 73 69 6f 6e 73 20 73 er conversions s
c5f0: 68 6f 75 6c 64 20 62 65 20 61 74 74 65 6d 70 74 hould be attempt
c600: 65 64 29 2e 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 ed)... ///
c610: 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 </summary>..
c620: 20 20 42 69 6e 64 41 6e 64 47 65 74 41 6c 6c 41 BindAndGetAllA
c630: 73 54 65 78 74 20 3d 20 42 69 6e 64 41 6c 6c 41 sText = BindAllA
c640: 73 54 65 78 74 20 7c 20 47 65 74 41 6c 6c 41 73 sText | GetAllAs
c650: 54 65 78 74 2c 0d 0a 0d 0a 20 20 20 20 20 20 2f Text,.... /
c660: 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 // <summary>..
c670: 20 20 20 20 2f 2f 2f 20 57 68 65 6e 20 62 69 6e /// When bin
c680: 64 69 6e 67 20 70 61 72 61 6d 65 74 65 72 20 76 ding parameter v
c690: 61 6c 75 65 73 2c 20 61 6c 77 61 79 73 20 75 73 alues, always us
c6a0: 65 20 74 68 65 20 69 6e 76 61 72 69 61 6e 74 20 e the invariant
c6b0: 63 75 6c 74 75 72 65 20 77 68 65 6e 0d 0a 20 20 culture when..
c6c0: 20 20 20 20 2f 2f 2f 20 63 6f 6e 76 65 72 74 69 /// converti
c6d0: 6e 67 20 74 68 65 69 72 20 76 61 6c 75 65 73 20 ng their values
c6e0: 74 6f 20 73 74 72 69 6e 67 73 20 6f 72 20 66 72 to strings or fr
c6f0: 6f 6d 20 73 74 72 69 6e 67 73 2e 0d 0a 20 20 20 om strings...
c700: 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 /// </summary
c710: 3e 0d 0a 20 20 20 20 20 20 43 6f 6e 76 65 72 74 >.. Convert
c720: 41 6e 64 42 69 6e 64 49 6e 76 61 72 69 61 6e 74 AndBindInvariant
c730: 54 65 78 74 20 3d 20 43 6f 6e 76 65 72 74 49 6e Text = ConvertIn
c740: 76 61 72 69 61 6e 74 54 65 78 74 20 7c 20 42 69 variantText | Bi
c750: 6e 64 49 6e 76 61 72 69 61 6e 74 54 65 78 74 2c ndInvariantText,
c760: 0d 0a 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c 73 .... /// <s
c770: 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 2f ummary>.. /
c780: 2f 2f 20 57 68 65 6e 20 62 69 6e 64 69 6e 67 20 // When binding
c790: 70 61 72 61 6d 65 74 65 72 20 76 61 6c 75 65 73 parameter values
c7a0: 20 6f 72 20 72 65 74 75 72 6e 69 6e 67 20 63 6f or returning co
c7b0: 6c 75 6d 6e 20 76 61 6c 75 65 73 2c 20 61 6c 77 lumn values, alw
c7c0: 61 79 73 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 74 ays.. /// t
c7d0: 72 65 61 74 20 74 68 65 6d 20 61 73 20 74 68 6f reat them as tho
c7e0: 75 67 68 20 74 68 65 79 20 77 65 72 65 20 70 6c ugh they were pl
c7f0: 61 69 6e 20 74 65 78 74 20 28 69 2e 65 2e 20 6e ain text (i.e. n
c800: 6f 20 6e 75 6d 65 72 69 63 2c 0d 0a 20 20 20 20 o numeric,..
c810: 20 20 2f 2f 2f 20 64 61 74 65 2f 74 69 6d 65 2c /// date/time,
c820: 20 6f 72 20 6f 74 68 65 72 20 63 6f 6e 76 65 72 or other conver
c830: 73 69 6f 6e 73 20 73 68 6f 75 6c 64 20 62 65 20 sions should be
c840: 61 74 74 65 6d 70 74 65 64 29 20 61 6e 64 20 61 attempted) and a
c850: 6c 77 61 79 73 0d 0a 20 20 20 20 20 20 2f 2f 2f lways.. ///
c860: 20 75 73 65 20 74 68 65 20 69 6e 76 61 72 69 61 use the invaria
c870: 6e 74 20 63 75 6c 74 75 72 65 20 77 68 65 6e 20 nt culture when
c880: 63 6f 6e 76 65 72 74 69 6e 67 20 74 68 65 69 72 converting their
c890: 20 76 61 6c 75 65 73 20 74 6f 20 73 74 72 69 6e values to strin
c8a0: 67 73 2e 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c gs... /// <
c8b0: 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 /summary>..
c8c0: 20 42 69 6e 64 41 6e 64 47 65 74 41 6c 6c 41 73 BindAndGetAllAs
c8d0: 49 6e 76 61 72 69 61 6e 74 54 65 78 74 20 3d 20 InvariantText =
c8e0: 42 69 6e 64 41 6e 64 47 65 74 41 6c 6c 41 73 54 BindAndGetAllAsT
c8f0: 65 78 74 20 7c 20 42 69 6e 64 49 6e 76 61 72 69 ext | BindInvari
c900: 61 6e 74 54 65 78 74 2c 0d 0a 0d 0a 20 20 20 20 antText,....
c910: 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d /// <summary>.
c920: 0a 20 20 20 20 20 20 2f 2f 2f 20 57 68 65 6e 20 . /// When
c930: 62 69 6e 64 69 6e 67 20 70 61 72 61 6d 65 74 65 binding paramete
c940: 72 20 76 61 6c 75 65 73 20 6f 72 20 72 65 74 75 r values or retu
c950: 72 6e 69 6e 67 20 63 6f 6c 75 6d 6e 20 76 61 6c rning column val
c960: 75 65 73 2c 20 61 6c 77 61 79 73 0d 0a 20 20 20 ues, always..
c970: 20 20 20 2f 2f 2f 20 74 72 65 61 74 20 74 68 65 /// treat the
c980: 6d 20 61 73 20 74 68 6f 75 67 68 20 74 68 65 79 m as though they
c990: 20 77 65 72 65 20 70 6c 61 69 6e 20 74 65 78 74 were plain text
c9a0: 20 28 69 2e 65 2e 20 6e 6f 20 6e 75 6d 65 72 69 (i.e. no numeri
c9b0: 63 2c 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 64 61 c,.. /// da
c9c0: 74 65 2f 74 69 6d 65 2c 20 6f 72 20 6f 74 68 65 te/time, or othe
c9d0: 72 20 63 6f 6e 76 65 72 73 69 6f 6e 73 20 73 68 r conversions sh
c9e0: 6f 75 6c 64 20 62 65 20 61 74 74 65 6d 70 74 65 ould be attempte
c9f0: 64 29 20 61 6e 64 20 61 6c 77 61 79 73 0d 0a 20 d) and always..
ca00: 20 20 20 20 20 2f 2f 2f 20 75 73 65 20 74 68 65 /// use the
ca10: 20 69 6e 76 61 72 69 61 6e 74 20 63 75 6c 74 75 invariant cultu
ca20: 72 65 20 77 68 65 6e 20 63 6f 6e 76 65 72 74 69 re when converti
ca30: 6e 67 20 74 68 65 69 72 20 76 61 6c 75 65 73 20 ng their values
ca40: 74 6f 20 73 74 72 69 6e 67 73 0d 0a 20 20 20 20 to strings..
ca50: 20 20 2f 2f 2f 20 6f 72 20 66 72 6f 6d 20 73 74 /// or from st
ca60: 72 69 6e 67 73 2e 0d 0a 20 20 20 20 20 20 2f 2f rings... //
ca70: 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 / </summary>..
ca80: 20 20 20 20 43 6f 6e 76 65 72 74 41 6e 64 42 69 ConvertAndBi
ca90: 6e 64 41 6e 64 47 65 74 41 6c 6c 41 73 49 6e 76 ndAndGetAllAsInv
caa0: 61 72 69 61 6e 74 54 65 78 74 20 3d 20 42 69 6e ariantText = Bin
cab0: 64 41 6e 64 47 65 74 41 6c 6c 41 73 54 65 78 74 dAndGetAllAsText
cac0: 20 7c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 |..
cad0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
cae0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
caf0: 20 20 20 43 6f 6e 76 65 72 74 41 6e 64 42 69 6e ConvertAndBin
cb00: 64 49 6e 76 61 72 69 61 6e 74 54 65 78 74 2c 0d dInvariantText,.
cb10: 0a 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 ... /// <su
cb20: 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 2f 2f mmary>.. //
cb30: 2f 20 45 6e 61 62 6c 65 73 20 75 73 65 20 6f 66 / Enables use of
cb40: 20 61 6c 6c 20 70 65 72 2d 63 6f 6e 6e 65 63 74 all per-connect
cb50: 69 6f 6e 20 76 61 6c 75 65 20 68 61 6e 64 6c 69 ion value handli
cb60: 6e 67 20 63 61 6c 6c 62 61 63 6b 73 2e 0d 0a 20 ng callbacks...
cb70: 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 /// </summa
cb80: 72 79 3e 0d 0a 20 20 20 20 20 20 55 73 65 41 6c ry>.. UseAl
cb90: 6c 43 6f 6e 6e 65 63 74 69 6f 6e 56 61 6c 75 65 lConnectionValue
cba0: 43 61 6c 6c 62 61 63 6b 73 20 3d 20 55 73 65 43 Callbacks = UseC
cbb0: 6f 6e 6e 65 63 74 69 6f 6e 42 69 6e 64 56 61 6c onnectionBindVal
cbc0: 75 65 43 61 6c 6c 62 61 63 6b 73 20 7c 0d 0a 20 ueCallbacks |..
cbd0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
cbe0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
cbf0: 20 20 20 20 20 20 55 73 65 43 6f 6e 6e 65 63 74 UseConnect
cc00: 69 6f 6e 52 65 61 64 56 61 6c 75 65 43 61 6c 6c ionReadValueCall
cc10: 62 61 63 6b 73 2c 0d 0a 0d 0a 20 20 20 20 20 20 backs,....
cc20: 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 /// <summary>..
cc30: 20 20 20 20 20 2f 2f 2f 20 45 6e 61 62 6c 65 20 /// Enable
cc40: 61 6c 6c 20 6c 6f 67 67 69 6e 67 2e 0d 0a 20 20 all logging...
cc50: 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 /// </summar
cc60: 79 3e 0d 0a 23 69 66 20 49 4e 54 45 52 4f 50 5f y>..#if INTEROP_
cc70: 56 49 52 54 55 41 4c 5f 54 41 42 4c 45 0d 0a 20 VIRTUAL_TABLE..
cc80: 20 20 20 20 20 4c 6f 67 41 6c 6c 20 3d 20 4c 6f LogAll = Lo
cc90: 67 50 72 65 70 61 72 65 20 7c 20 4c 6f 67 50 72 gPrepare | LogPr
cca0: 65 42 69 6e 64 20 7c 20 4c 6f 67 42 69 6e 64 20 eBind | LogBind
ccb0: 7c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 |..
ccc0: 20 20 4c 6f 67 43 61 6c 6c 62 61 63 6b 45 78 63 LogCallbackExc
ccd0: 65 70 74 69 6f 6e 20 7c 20 4c 6f 67 42 61 63 6b eption | LogBack
cce0: 75 70 20 7c 20 4c 6f 67 4d 6f 64 75 6c 65 45 72 up | LogModuleEr
ccf0: 72 6f 72 20 7c 0d 0a 20 20 20 20 20 20 20 20 20 ror |..
cd00: 20 20 20 20 20 20 4c 6f 67 4d 6f 64 75 6c 65 45 LogModuleE
cd10: 78 63 65 70 74 69 6f 6e 2c 0d 0a 23 65 6c 73 65 xception,..#else
cd20: 0d 0a 20 20 20 20 20 20 4c 6f 67 41 6c 6c 20 3d .. LogAll =
cd30: 20 4c 6f 67 50 72 65 70 61 72 65 20 7c 20 4c 6f LogPrepare | Lo
cd40: 67 50 72 65 42 69 6e 64 20 7c 20 4c 6f 67 42 69 gPreBind | LogBi
cd50: 6e 64 20 7c 0d 0a 20 20 20 20 20 20 20 20 20 20 nd |..
cd60: 20 20 20 20 20 4c 6f 67 43 61 6c 6c 62 61 63 6b LogCallback
cd70: 45 78 63 65 70 74 69 6f 6e 20 7c 20 4c 6f 67 42 Exception | LogB
cd80: 61 63 6b 75 70 2c 0d 0a 23 65 6e 64 69 66 0d 0a ackup,..#endif..
cd90: 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d .. /// <sum
cda0: 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 2f 2f 2f mary>.. ///
cdb0: 20 54 68 65 20 64 65 66 61 75 6c 74 20 65 78 74 The default ext
cdc0: 72 61 20 66 6c 61 67 73 20 66 6f 72 20 6e 65 77 ra flags for new
cdd0: 20 63 6f 6e 6e 65 63 74 69 6f 6e 73 2e 0d 0a 20 connections...
cde0: 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 /// </summa
cdf0: 72 79 3e 0d 0a 23 69 66 20 49 4e 54 45 52 4f 50 ry>..#if INTEROP
ce00: 5f 56 49 52 54 55 41 4c 5f 54 41 42 4c 45 0d 0a _VIRTUAL_TABLE..
ce10: 20 20 20 20 20 20 44 65 66 61 75 6c 74 20 3d 20 Default =
ce20: 4c 6f 67 43 61 6c 6c 62 61 63 6b 45 78 63 65 70 LogCallbackExcep
ce30: 74 69 6f 6e 20 7c 20 4c 6f 67 4d 6f 64 75 6c 65 tion | LogModule
ce40: 45 78 63 65 70 74 69 6f 6e 2c 0d 0a 23 65 6c 73 Exception,..#els
ce50: 65 0d 0a 20 20 20 20 20 20 44 65 66 61 75 6c 74 e.. Default
ce60: 20 3d 20 4c 6f 67 43 61 6c 6c 62 61 63 6b 45 78 = LogCallbackEx
ce70: 63 65 70 74 69 6f 6e 2c 0d 0a 23 65 6e 64 69 66 ception,..#endif
ce80: 0d 0a 0d 0a 20 20 20 20 20 20 2f 2f 2f 20 3c 73 .... /// <s
ce90: 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 2f ummary>.. /
cea0: 2f 2f 20 54 68 65 20 64 65 66 61 75 6c 74 20 65 // The default e
ceb0: 78 74 72 61 20 66 6c 61 67 73 20 66 6f 72 20 6e xtra flags for n
cec0: 65 77 20 63 6f 6e 6e 65 63 74 69 6f 6e 73 20 77 ew connections w
ced0: 69 74 68 20 61 6c 6c 20 6c 6f 67 67 69 6e 67 20 ith all logging
cee0: 65 6e 61 62 6c 65 64 2e 0d 0a 20 20 20 20 20 20 enabled...
cef0: 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a /// </summary>..
cf00: 20 20 20 20 20 20 44 65 66 61 75 6c 74 41 6e 64 DefaultAnd
cf10: 4c 6f 67 41 6c 6c 20 3d 20 44 65 66 61 75 6c 74 LogAll = Default
cf20: 20 7c 20 4c 6f 67 41 6c 6c 0d 0a 20 20 7d 0d 0a | LogAll.. }..
cf30: 0d 0a 20 20 2f 2f 20 54 68 65 73 65 20 61 72 65 .. // These are
cf40: 20 74 68 65 20 6f 70 74 69 6f 6e 73 20 74 6f 20 the options to
cf50: 74 68 65 20 69 6e 74 65 72 6e 61 6c 20 73 71 6c the internal sql
cf60: 69 74 65 33 5f 64 62 5f 63 6f 6e 66 69 67 20 63 ite3_db_config c
cf70: 61 6c 6c 2e 0d 0a 20 20 69 6e 74 65 72 6e 61 6c all... internal
cf80: 20 65 6e 75 6d 20 53 51 4c 69 74 65 43 6f 6e 66 enum SQLiteConf
cf90: 69 67 44 62 4f 70 73 45 6e 75 6d 0d 0a 20 20 7b igDbOpsEnum.. {
cfa0: 0d 0a 20 20 20 20 53 51 4c 49 54 45 5f 44 42 43 .. SQLITE_DBC
cfb0: 4f 4e 46 49 47 5f 4e 4f 4e 45 20 3d 20 30 2c 20 ONFIG_NONE = 0,
cfc0: 2f 2f 20 6e 69 6c 0d 0a 20 20 20 20 53 51 4c 49 // nil.. SQLI
cfd0: 54 45 5f 44 42 43 4f 4e 46 49 47 5f 4c 4f 4f 4b TE_DBCONFIG_LOOK
cfe0: 41 53 49 44 45 20 3d 20 31 30 30 31 2c 20 2f 2f ASIDE = 1001, //
cff0: 20 76 6f 69 64 2a 20 69 6e 74 20 69 6e 74 0d 0a void* int int..
d000: 20 20 20 20 53 51 4c 49 54 45 5f 44 42 43 4f 4e SQLITE_DBCON
d010: 46 49 47 5f 45 4e 41 42 4c 45 5f 46 4b 45 59 20 FIG_ENABLE_FKEY
d020: 3d 20 31 30 30 32 2c 20 2f 2f 20 69 6e 74 20 69 = 1002, // int i
d030: 6e 74 2a 0d 0a 20 20 20 20 53 51 4c 49 54 45 5f nt*.. SQLITE_
d040: 44 42 43 4f 4e 46 49 47 5f 45 4e 41 42 4c 45 5f DBCONFIG_ENABLE_
d050: 54 52 49 47 47 45 52 20 3d 20 31 30 30 33 2c 20 TRIGGER = 1003,
d060: 2f 2f 20 69 6e 74 20 69 6e 74 2a 0d 0a 20 20 20 // int int*..
d070: 20 53 51 4c 49 54 45 5f 44 42 43 4f 4e 46 49 47 SQLITE_DBCONFIG
d080: 5f 45 4e 41 42 4c 45 5f 46 54 53 33 5f 54 4f 4b _ENABLE_FTS3_TOK
d090: 45 4e 49 5a 45 52 20 3d 20 31 30 30 34 2c 20 2f ENIZER = 1004, /
d0a0: 2f 20 69 6e 74 20 69 6e 74 2a 0d 0a 20 20 20 20 / int int*..
d0b0: 53 51 4c 49 54 45 5f 44 42 43 4f 4e 46 49 47 5f SQLITE_DBCONFIG_
d0c0: 45 4e 41 42 4c 45 5f 4c 4f 41 44 5f 45 58 54 45 ENABLE_LOAD_EXTE
d0d0: 4e 53 49 4f 4e 20 3d 20 31 30 30 35 20 2f 2f 20 NSION = 1005 //
d0e0: 69 6e 74 20 69 6e 74 2a 0d 0a 20 20 7d 0d 0a 0d int int*.. }...
d0f0: 0a 20 20 2f 2f 20 54 68 65 73 65 20 61 72 65 20 . // These are
d100: 74 68 65 20 6f 70 74 69 6f 6e 73 20 74 6f 20 74 the options to t
d110: 68 65 20 69 6e 74 65 72 6e 61 6c 20 73 71 6c 69 he internal sqli
d120: 74 65 33 5f 63 6f 6e 66 69 67 20 63 61 6c 6c 2e te3_config call.
d130: 0d 0a 20 20 69 6e 74 65 72 6e 61 6c 20 65 6e 75 .. internal enu
d140: 6d 20 53 51 4c 69 74 65 43 6f 6e 66 69 67 4f 70 m SQLiteConfigOp
d150: 73 45 6e 75 6d 0d 0a 20 20 7b 0d 0a 20 20 20 20 sEnum.. {..
d160: 53 51 4c 49 54 45 5f 43 4f 4e 46 49 47 5f 4e 4f SQLITE_CONFIG_NO
d170: 4e 45 20 3d 20 30 2c 20 2f 2f 20 6e 69 6c 0d 0a NE = 0, // nil..
d180: 20 20 20 20 53 51 4c 49 54 45 5f 43 4f 4e 46 49 SQLITE_CONFI
d190: 47 5f 53 49 4e 47 4c 45 54 48 52 45 41 44 20 3d G_SINGLETHREAD =
d1a0: 20 31 2c 20 2f 2f 20 6e 69 6c 0d 0a 20 20 20 20 1, // nil..
d1b0: 53 51 4c 49 54 45 5f 43 4f 4e 46 49 47 5f 4d 55 SQLITE_CONFIG_MU
d1c0: 4c 54 49 54 48 52 45 41 44 20 3d 20 32 2c 20 2f LTITHREAD = 2, /
d1d0: 2f 20 6e 69 6c 0d 0a 20 20 20 20 53 51 4c 49 54 / nil.. SQLIT
d1e0: 45 5f 43 4f 4e 46 49 47 5f 53 45 52 49 41 4c 49 E_CONFIG_SERIALI
d1f0: 5a 45 44 20 3d 20 33 2c 20 2f 2f 20 6e 69 6c 0d ZED = 3, // nil.
d200: 0a 20 20 20 20 53 51 4c 49 54 45 5f 43 4f 4e 46 . SQLITE_CONF
d210: 49 47 5f 4d 41 4c 4c 4f 43 20 3d 20 34 2c 20 2f IG_MALLOC = 4, /
d220: 2f 20 73 71 6c 69 74 65 33 5f 6d 65 6d 5f 6d 65 / sqlite3_mem_me
d230: 74 68 6f 64 73 2a 0d 0a 20 20 20 20 53 51 4c 49 thods*.. SQLI
d240: 54 45 5f 43 4f 4e 46 49 47 5f 47 45 54 4d 41 4c TE_CONFIG_GETMAL
d250: 4c 4f 43 20 3d 20 35 2c 20 2f 2f 20 73 71 6c 69 LOC = 5, // sqli
d260: 74 65 33 5f 6d 65 6d 5f 6d 65 74 68 6f 64 73 2a te3_mem_methods*
d270: 0d 0a 20 20 20 20 53 51 4c 49 54 45 5f 43 4f 4e .. SQLITE_CON
d280: 46 49 47 5f 53 43 52 41 54 43 48 20 3d 20 36 2c FIG_SCRATCH = 6,
d290: 20 2f 2f 20 76 6f 69 64 2a 2c 20 69 6e 74 20 73 // void*, int s
d2a0: 7a 2c 20 69 6e 74 20 4e 0d 0a 20 20 20 20 53 51 z, int N.. SQ
d2b0: 4c 49 54 45 5f 43 4f 4e 46 49 47 5f 50 41 47 45 LITE_CONFIG_PAGE
d2c0: 43 41 43 48 45 20 3d 20 37 2c 20 2f 2f 20 76 6f CACHE = 7, // vo
d2d0: 69 64 2a 2c 20 69 6e 74 20 73 7a 2c 20 69 6e 74 id*, int sz, int
d2e0: 20 4e 0d 0a 20 20 20 20 53 51 4c 49 54 45 5f 43 N.. SQLITE_C
d2f0: 4f 4e 46 49 47 5f 48 45 41 50 20 3d 20 38 2c 20 ONFIG_HEAP = 8,
d300: 2f 2f 20 76 6f 69 64 2a 2c 20 69 6e 74 20 6e 42 // void*, int nB
d310: 79 74 65 2c 20 69 6e 74 20 6d 69 6e 0d 0a 20 20 yte, int min..
d320: 20 20 53 51 4c 49 54 45 5f 43 4f 4e 46 49 47 5f SQLITE_CONFIG_
d330: 4d 45 4d 53 54 41 54 55 53 20 3d 20 39 2c 20 2f MEMSTATUS = 9, /
d340: 2f 20 62 6f 6f 6c 65 61 6e 0d 0a 20 20 20 20 53 / boolean.. S
d350: 51 4c 49 54 45 5f 43 4f 4e 46 49 47 5f 4d 55 54 QLITE_CONFIG_MUT
d360: 45 58 20 3d 20 31 30 2c 20 2f 2f 20 73 71 6c 69 EX = 10, // sqli
d370: 74 65 33 5f 6d 75 74 65 78 5f 6d 65 74 68 6f 64 te3_mutex_method
d380: 73 2a 0d 0a 20 20 20 20 53 51 4c 49 54 45 5f 43 s*.. SQLITE_C
d390: 4f 4e 46 49 47 5f 47 45 54 4d 55 54 45 58 20 3d ONFIG_GETMUTEX =
d3a0: 20 31 31 2c 20 2f 2f 20 73 71 6c 69 74 65 33 5f 11, // sqlite3_
d3b0: 6d 75 74 65 78 5f 6d 65 74 68 6f 64 73 2a 0d 0a mutex_methods*..
d3c0: 20 20 20 20 2f 2f 20 70 72 65 76 69 6f 75 73 6c // previousl
d3d0: 79 20 53 51 4c 49 54 45 5f 43 4f 4e 46 49 47 5f y SQLITE_CONFIG_
d3e0: 43 48 55 4e 4b 41 4c 4c 4f 43 20 31 32 20 77 68 CHUNKALLOC 12 wh
d3f0: 69 63 68 20 69 73 20 6e 6f 77 20 75 6e 75 73 65 ich is now unuse
d400: 64 0d 0a 20 20 20 20 53 51 4c 49 54 45 5f 43 4f d.. SQLITE_CO
d410: 4e 46 49 47 5f 4c 4f 4f 4b 41 53 49 44 45 20 3d NFIG_LOOKASIDE =
d420: 20 31 33 2c 20 2f 2f 20 69 6e 74 20 69 6e 74 0d 13, // int int.
d430: 0a 20 20 20 20 53 51 4c 49 54 45 5f 43 4f 4e 46 . SQLITE_CONF
d440: 49 47 5f 50 43 41 43 48 45 20 3d 20 31 34 2c 20 IG_PCACHE = 14,
d450: 2f 2f 20 73 71 6c 69 74 65 33 5f 70 63 61 63 68 // sqlite3_pcach
d460: 65 5f 6d 65 74 68 6f 64 73 2a 0d 0a 20 20 20 20 e_methods*..
d470: 53 51 4c 49 54 45 5f 43 4f 4e 46 49 47 5f 47 45 SQLITE_CONFIG_GE
d480: 54 50 43 41 43 48 45 20 3d 20 31 35 2c 20 2f 2f TPCACHE = 15, //
d490: 20 73 71 6c 69 74 65 33 5f 70 63 61 63 68 65 5f sqlite3_pcache_
d4a0: 6d 65 74 68 6f 64 73 2a 0d 0a 20 20 20 20 53 51 methods*.. SQ
d4b0: 4c 49 54 45 5f 43 4f 4e 46 49 47 5f 4c 4f 47 20 LITE_CONFIG_LOG
d4c0: 3d 20 31 36 2c 20 2f 2f 20 78 46 75 6e 63 2c 20 = 16, // xFunc,
d4d0: 76 6f 69 64 2a 0d 0a 20 20 20 20 53 51 4c 49 54 void*.. SQLIT
d4e0: 45 5f 43 4f 4e 46 49 47 5f 55 52 49 20 3d 20 31 E_CONFIG_URI = 1
d4f0: 37 2c 20 2f 2f 20 69 6e 74 0d 0a 20 20 20 20 53 7, // int.. S
d500: 51 4c 49 54 45 5f 43 4f 4e 46 49 47 5f 50 43 41 QLITE_CONFIG_PCA
d510: 43 48 45 32 20 3d 20 31 38 2c 20 2f 2f 20 73 71 CHE2 = 18, // sq
d520: 6c 69 74 65 33 5f 70 63 61 63 68 65 5f 6d 65 74 lite3_pcache_met
d530: 68 6f 64 73 32 2a 0d 0a 20 20 20 20 53 51 4c 49 hods2*.. SQLI
d540: 54 45 5f 43 4f 4e 46 49 47 5f 47 45 54 50 43 41 TE_CONFIG_GETPCA
d550: 43 48 45 32 20 3d 20 31 39 2c 20 2f 2f 20 73 71 CHE2 = 19, // sq
d560: 6c 69 74 65 33 5f 70 63 61 63 68 65 5f 6d 65 74 lite3_pcache_met
d570: 68 6f 64 73 32 2a 0d 0a 20 20 20 20 53 51 4c 49 hods2*.. SQLI
d580: 54 45 5f 43 4f 4e 46 49 47 5f 43 4f 56 45 52 49 TE_CONFIG_COVERI
d590: 4e 47 5f 49 4e 44 45 58 5f 53 43 41 4e 20 3d 20 NG_INDEX_SCAN =
d5a0: 32 30 2c 20 2f 2f 20 69 6e 74 0d 0a 20 20 20 20 20, // int..
d5b0: 53 51 4c 49 54 45 5f 43 4f 4e 46 49 47 5f 53 51 SQLITE_CONFIG_SQ
d5c0: 4c 4c 4f 47 20 3d 20 32 31 2c 20 2f 2f 20 78 53 LLOG = 21, // xS
d5d0: 71 6c 6c 6f 67 2c 20 76 6f 69 64 2a 0d 0a 20 20 qllog, void*..
d5e0: 20 20 53 51 4c 49 54 45 5f 43 4f 4e 46 49 47 5f SQLITE_CONFIG_
d5f0: 4d 4d 41 50 5f 53 49 5a 45 20 3d 20 32 32 2c 20 MMAP_SIZE = 22,
d600: 2f 2f 20 73 71 6c 69 74 65 33 5f 69 6e 74 36 34 // sqlite3_int64
d610: 2c 20 73 71 6c 69 74 65 33 5f 69 6e 74 36 34 0d , sqlite3_int64.
d620: 0a 20 20 20 20 53 51 4c 49 54 45 5f 43 4f 4e 46 . SQLITE_CONF
d630: 49 47 5f 57 49 4e 33 32 5f 48 45 41 50 53 49 5a IG_WIN32_HEAPSIZ
d640: 45 20 3d 20 32 33 2c 20 2f 2f 20 69 6e 74 20 6e E = 23, // int n
d650: 42 79 74 65 0d 0a 20 20 20 20 53 51 4c 49 54 45 Byte.. SQLITE
d660: 5f 43 4f 4e 46 49 47 5f 50 43 41 43 48 45 5f 48 _CONFIG_PCACHE_H
d670: 44 52 53 5a 20 3d 20 32 34 2c 20 2f 2f 20 69 6e DRSZ = 24, // in
d680: 74 20 2a 70 73 7a 0d 0a 20 20 20 20 53 51 4c 49 t *psz.. SQLI
d690: 54 45 5f 43 4f 4e 46 49 47 5f 50 4d 41 53 5a 20 TE_CONFIG_PMASZ
d6a0: 3d 20 32 35 20 2f 2f 20 75 6e 73 69 67 6e 65 64 = 25 // unsigned
d6b0: 20 69 6e 74 20 73 7a 50 6d 61 0d 0a 20 20 7d 0d int szPma.. }.
d6c0: 0a 7d 0d 0a .}..