slidge-whatsapp 0.2.5__cp311-cp311-manylinux_2_36_aarch64.whl → 0.3.0__cp311-cp311-manylinux_2_36_aarch64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of slidge-whatsapp might be problematic. Click here for more details.

Files changed (484) hide show
  1. slidge_whatsapp/config.py +3 -0
  2. slidge_whatsapp/contact.py +15 -3
  3. slidge_whatsapp/event.go +171 -70
  4. slidge_whatsapp/gateway.go +16 -68
  5. slidge_whatsapp/gateway.py +4 -5
  6. slidge_whatsapp/generated/_whatsapp.cpython-311-aarch64-linux-gnu.h +168 -151
  7. slidge_whatsapp/generated/_whatsapp.cpython-311-aarch64-linux-gnu.so +0 -0
  8. slidge_whatsapp/generated/build.py +142 -128
  9. slidge_whatsapp/generated/whatsapp.c +1689 -1417
  10. slidge_whatsapp/generated/whatsapp.go +1011 -900
  11. slidge_whatsapp/generated/whatsapp.py +1175 -1050
  12. slidge_whatsapp/generated/whatsapp_go.h +168 -151
  13. slidge_whatsapp/go.mod +21 -15
  14. slidge_whatsapp/go.sum +49 -31
  15. slidge_whatsapp/group.py +34 -30
  16. slidge_whatsapp/media/media.go +22 -12
  17. slidge_whatsapp/session.go +106 -82
  18. slidge_whatsapp/session.py +46 -14
  19. slidge_whatsapp/vendor/github.com/beeper/argo-go/LICENSE +9 -0
  20. slidge_whatsapp/vendor/github.com/beeper/argo-go/block/blockreader.go +329 -0
  21. slidge_whatsapp/vendor/github.com/beeper/argo-go/block/blockwriter.go +417 -0
  22. slidge_whatsapp/vendor/github.com/beeper/argo-go/codec/decoder.go +652 -0
  23. slidge_whatsapp/vendor/github.com/beeper/argo-go/codec/encoder.go +985 -0
  24. slidge_whatsapp/vendor/github.com/beeper/argo-go/header/header.go +135 -0
  25. slidge_whatsapp/vendor/github.com/beeper/argo-go/internal/util/util.go +133 -0
  26. slidge_whatsapp/vendor/github.com/beeper/argo-go/label/label.go +384 -0
  27. slidge_whatsapp/vendor/github.com/beeper/argo-go/label/wiremarkers.go +37 -0
  28. slidge_whatsapp/vendor/github.com/beeper/argo-go/pkg/bitset/bitset.go +197 -0
  29. slidge_whatsapp/vendor/github.com/beeper/argo-go/pkg/buf/buf.go +420 -0
  30. slidge_whatsapp/vendor/github.com/beeper/argo-go/pkg/varint/varint.go +246 -0
  31. slidge_whatsapp/vendor/github.com/beeper/argo-go/wire/wire.go +614 -0
  32. slidge_whatsapp/vendor/github.com/beeper/argo-go/wirecodec/decode.go +341 -0
  33. slidge_whatsapp/vendor/github.com/ebitengine/purego/dlfcn.go +4 -4
  34. slidge_whatsapp/vendor/github.com/ebitengine/purego/dlfcn_darwin.go +0 -5
  35. slidge_whatsapp/vendor/github.com/ebitengine/purego/internal/fakecgo/go_libinit.go +3 -0
  36. slidge_whatsapp/vendor/github.com/ebitengine/purego/internal/fakecgo/symbols.go +40 -20
  37. slidge_whatsapp/vendor/github.com/elliotchance/orderedmap/v3/LICENSE +21 -0
  38. slidge_whatsapp/vendor/github.com/elliotchance/orderedmap/v3/list.go +95 -0
  39. slidge_whatsapp/vendor/github.com/elliotchance/orderedmap/v3/orderedmap.go +187 -0
  40. slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/fitz.go +1 -0
  41. slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/fitz_cgo.go +3 -0
  42. slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/fitz_nocgo.go +4 -5
  43. slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/purego_darwin.go +11 -1
  44. slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/purego_linux.go +10 -0
  45. slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/purego_windows.go +12 -0
  46. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/.gitignore +0 -2
  47. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/CHANGELOG.md +44 -1
  48. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/COPYRIGHT.txt +6 -1
  49. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/README.md +14 -17
  50. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/abi.go +1 -1
  51. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/abi2.go +7 -0
  52. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/assets/libffi/LICENSE +21 -0
  53. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/assets/libffi/darwin_amd64/libffi.8.dylib +0 -0
  54. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/assets/libffi/darwin_arm64/libffi.8.dylib +0 -0
  55. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/assets/libffi/windows_amd64/libffi-8.dll +0 -0
  56. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/cif.go +15 -0
  57. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/cif_arm64.go +16 -0
  58. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/embed.go +49 -0
  59. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/embed_darwin_amd64.go +10 -0
  60. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/embed_darwin_arm64.go +10 -0
  61. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/embed_windows_amd64.go +10 -0
  62. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/ffi.go +53 -15
  63. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/fun.go +10 -2
  64. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/init.go +22 -9
  65. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/lib.go +1 -1
  66. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/lib_unix.go +1 -1
  67. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/lib_windows.go +1 -1
  68. slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/README.md +4 -7
  69. slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/callback.go +2 -1
  70. slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3-binding.c +11545 -6680
  71. slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3-binding.h +527 -273
  72. slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3.go +57 -23
  73. slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3_opt_unlock_notify.c +4 -0
  74. slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3_opt_unlock_notify.go +4 -0
  75. slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3_opt_userauth.go +13 -140
  76. slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3ext.h +4 -0
  77. slidge_whatsapp/vendor/github.com/petermattis/goid/.gitignore +4 -0
  78. slidge_whatsapp/vendor/github.com/petermattis/goid/LICENSE +202 -0
  79. slidge_whatsapp/vendor/github.com/petermattis/goid/README.md +4 -0
  80. slidge_whatsapp/vendor/github.com/petermattis/goid/goid.go +35 -0
  81. slidge_whatsapp/vendor/github.com/petermattis/goid/goid_gccgo.go +26 -0
  82. slidge_whatsapp/vendor/github.com/petermattis/goid/goid_go1.3.c +23 -0
  83. slidge_whatsapp/vendor/github.com/petermattis/goid/goid_go1.3.go +22 -0
  84. slidge_whatsapp/vendor/github.com/petermattis/goid/goid_go1.4.go +35 -0
  85. slidge_whatsapp/vendor/github.com/petermattis/goid/goid_go1.4.s +18 -0
  86. slidge_whatsapp/vendor/github.com/petermattis/goid/goid_go1.5.go +28 -0
  87. slidge_whatsapp/vendor/github.com/petermattis/goid/goid_go1.5.s +44 -0
  88. slidge_whatsapp/vendor/github.com/petermattis/goid/goid_slow.go +24 -0
  89. slidge_whatsapp/vendor/github.com/petermattis/goid/runtime_gccgo_go1.8.go +17 -0
  90. slidge_whatsapp/vendor/github.com/petermattis/goid/runtime_go1.23.go +38 -0
  91. slidge_whatsapp/vendor/github.com/petermattis/goid/runtime_go1.25.go +37 -0
  92. slidge_whatsapp/vendor/github.com/petermattis/goid/runtime_go1.5.go +57 -0
  93. slidge_whatsapp/vendor/github.com/petermattis/goid/runtime_go1.6.go +43 -0
  94. slidge_whatsapp/vendor/github.com/petermattis/goid/runtime_go1.9.go +37 -0
  95. slidge_whatsapp/vendor/github.com/rs/zerolog/CONTRIBUTING.md +43 -0
  96. slidge_whatsapp/vendor/github.com/rs/zerolog/README.md +31 -0
  97. slidge_whatsapp/vendor/github.com/rs/zerolog/console.go +20 -5
  98. slidge_whatsapp/vendor/github.com/rs/zerolog/log/log.go +131 -0
  99. slidge_whatsapp/vendor/github.com/rs/zerolog/log.go +1 -1
  100. slidge_whatsapp/vendor/github.com/rs/zerolog/sampler.go +4 -1
  101. slidge_whatsapp/vendor/github.com/rs/zerolog/writer.go +9 -0
  102. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/LICENSE +19 -0
  103. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/argmap.go +37 -0
  104. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/collections.go +148 -0
  105. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/comment.go +31 -0
  106. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/decode.go +216 -0
  107. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/definition.go +110 -0
  108. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/directive.go +43 -0
  109. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/document.go +89 -0
  110. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/dumper.go +159 -0
  111. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/fragment.go +41 -0
  112. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/operation.go +32 -0
  113. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/path.go +72 -0
  114. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/selection.go +41 -0
  115. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/source.go +19 -0
  116. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/type.go +68 -0
  117. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/value.go +122 -0
  118. slidge_whatsapp/vendor/go.mau.fi/libsignal/groups/GroupCipher.go +17 -6
  119. slidge_whatsapp/vendor/go.mau.fi/libsignal/groups/GroupSessionBuilder.go +17 -7
  120. slidge_whatsapp/vendor/go.mau.fi/libsignal/groups/state/store/SenderKeyStore.go +4 -2
  121. slidge_whatsapp/vendor/go.mau.fi/libsignal/keys/chain/ChainKey.go +1 -0
  122. slidge_whatsapp/vendor/go.mau.fi/libsignal/keys/identity/IdentityKey.go +1 -0
  123. slidge_whatsapp/vendor/go.mau.fi/libsignal/logger/DefaultLogger.go +2 -2
  124. slidge_whatsapp/vendor/go.mau.fi/libsignal/serialize/FingerprintProtocol.pb.go +3 -2
  125. slidge_whatsapp/vendor/go.mau.fi/libsignal/serialize/LocalStorageProtocol.pb.go +3 -2
  126. slidge_whatsapp/vendor/go.mau.fi/libsignal/serialize/WhisperTextProtocol.pb.go +3 -2
  127. slidge_whatsapp/vendor/go.mau.fi/libsignal/session/Session.go +41 -17
  128. slidge_whatsapp/vendor/go.mau.fi/libsignal/session/SessionCipher.go +64 -30
  129. slidge_whatsapp/vendor/go.mau.fi/libsignal/state/store/IdentityKeyStore.go +5 -3
  130. slidge_whatsapp/vendor/go.mau.fi/libsignal/state/store/MessageKeyStore.go +6 -4
  131. slidge_whatsapp/vendor/go.mau.fi/libsignal/state/store/PreKeyStore.go +6 -4
  132. slidge_whatsapp/vendor/go.mau.fi/libsignal/state/store/SessionStore.go +8 -6
  133. slidge_whatsapp/vendor/go.mau.fi/libsignal/state/store/SignedPreKeyStore.go +7 -5
  134. slidge_whatsapp/vendor/go.mau.fi/util/dbutil/connlog.go +257 -0
  135. slidge_whatsapp/vendor/go.mau.fi/util/dbutil/database.go +309 -0
  136. slidge_whatsapp/vendor/go.mau.fi/util/dbutil/iter.go +233 -0
  137. slidge_whatsapp/vendor/go.mau.fi/util/dbutil/json.go +47 -0
  138. slidge_whatsapp/vendor/go.mau.fi/util/dbutil/log.go +129 -0
  139. slidge_whatsapp/vendor/go.mau.fi/util/dbutil/massinsert.go +164 -0
  140. slidge_whatsapp/vendor/go.mau.fi/util/dbutil/queryhelper.go +137 -0
  141. slidge_whatsapp/vendor/go.mau.fi/util/dbutil/reflectscan.go +30 -0
  142. slidge_whatsapp/vendor/go.mau.fi/util/dbutil/transaction.go +180 -0
  143. slidge_whatsapp/vendor/go.mau.fi/util/dbutil/upgrades.go +250 -0
  144. slidge_whatsapp/vendor/go.mau.fi/util/dbutil/upgradetable.go +331 -0
  145. slidge_whatsapp/vendor/go.mau.fi/util/exerrors/dualerror.go +33 -0
  146. slidge_whatsapp/vendor/go.mau.fi/util/exerrors/must.go +23 -0
  147. slidge_whatsapp/vendor/go.mau.fi/util/exhttp/cors.go +32 -0
  148. slidge_whatsapp/vendor/go.mau.fi/util/exhttp/handleerrors.go +98 -0
  149. slidge_whatsapp/vendor/go.mau.fi/util/exhttp/json.go +36 -0
  150. slidge_whatsapp/vendor/go.mau.fi/util/exhttp/middleware.go +30 -0
  151. slidge_whatsapp/vendor/go.mau.fi/util/exhttp/networkerror.go +38 -0
  152. slidge_whatsapp/vendor/go.mau.fi/util/exstrings/stringutil.go +104 -0
  153. slidge_whatsapp/vendor/go.mau.fi/util/exsync/event.go +104 -0
  154. slidge_whatsapp/vendor/go.mau.fi/util/exsync/returnonce.go +25 -0
  155. slidge_whatsapp/vendor/go.mau.fi/util/exsync/ringbuffer.go +139 -0
  156. slidge_whatsapp/vendor/go.mau.fi/util/exsync/syncmap.go +94 -0
  157. slidge_whatsapp/vendor/go.mau.fi/util/exsync/syncset.go +136 -0
  158. slidge_whatsapp/vendor/go.mau.fi/util/exzerolog/callermarshal.go +28 -0
  159. slidge_whatsapp/vendor/go.mau.fi/util/exzerolog/defaults.go +32 -0
  160. slidge_whatsapp/vendor/go.mau.fi/util/exzerolog/generics.go +45 -0
  161. slidge_whatsapp/vendor/go.mau.fi/util/exzerolog/writer.go +81 -0
  162. slidge_whatsapp/vendor/go.mau.fi/util/ptr/ptr.go +43 -0
  163. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/.pre-commit-config.yaml +3 -3
  164. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate/decode.go +27 -26
  165. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate/encode.go +4 -3
  166. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate/hash.go +1 -1
  167. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate/keys.go +5 -4
  168. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate.go +32 -26
  169. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/argo/argo-wire-type-store.argo +63 -0
  170. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/argo/argo.go +62 -0
  171. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/argo/name-to-queryids.json +306 -0
  172. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/armadillomessage.go +42 -8
  173. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/binary/encoder.go +1 -1
  174. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/broadcast.go +5 -4
  175. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/call.go +2 -1
  176. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/client.go +134 -55
  177. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/connectionevents.go +34 -11
  178. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/download-to-file.go +63 -30
  179. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/download.go +78 -34
  180. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/errors.go +4 -0
  181. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/group.go +157 -55
  182. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/internals.go +202 -154
  183. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/keepalive.go +3 -2
  184. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/mediaconn.go +5 -3
  185. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/mediaretry.go +2 -1
  186. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/message.go +448 -138
  187. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/msgsecret.go +106 -31
  188. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/newsletter.go +83 -7
  189. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/notification.go +83 -43
  190. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/pair-code.go +9 -6
  191. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/pair.go +42 -18
  192. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/prekeys.go +9 -5
  193. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/presence.go +17 -7
  194. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/privacysettings.go +10 -11
  195. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/extra.go +7 -0
  196. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloAddMessage/InstamadilloAddMessage.pb.go +983 -0
  197. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloAddMessage/InstamadilloAddMessage.proto +85 -0
  198. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloAddMessage/extra.go +3 -0
  199. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeActionLog/InstamadilloCoreTypeActionLog.pb.go +197 -0
  200. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeActionLog/InstamadilloCoreTypeActionLog.proto +13 -0
  201. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeAdminMessage/InstamadilloCoreTypeAdminMessage.pb.go +279 -0
  202. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeAdminMessage/InstamadilloCoreTypeAdminMessage.proto +21 -0
  203. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeCollection/InstamadilloCoreTypeCollection.pb.go +137 -0
  204. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeCollection/InstamadilloCoreTypeCollection.proto +10 -0
  205. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeLink/InstamadilloCoreTypeLink.pb.go +313 -0
  206. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeLink/InstamadilloCoreTypeLink.proto +27 -0
  207. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeMedia/InstamadilloCoreTypeMedia.pb.go +1299 -0
  208. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeMedia/InstamadilloCoreTypeMedia.proto +112 -0
  209. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeText/InstamadilloCoreTypeText.pb.go +514 -0
  210. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeText/InstamadilloCoreTypeText.proto +47 -0
  211. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloDeleteMessage/InstamadilloDeleteMessage.pb.go +123 -0
  212. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloDeleteMessage/InstamadilloDeleteMessage.proto +7 -0
  213. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloDeleteMessage/extra.go +3 -0
  214. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloSupplementMessage/InstamadilloSupplementMessage.pb.go +720 -0
  215. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloSupplementMessage/InstamadilloSupplementMessage.proto +59 -0
  216. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloSupplementMessage/extra.go +3 -0
  217. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloTransportPayload/InstamadilloTransportPayload.pb.go +365 -0
  218. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloTransportPayload/InstamadilloTransportPayload.proto +33 -0
  219. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloXmaContentRef/InstamadilloXmaContentRef.pb.go +1238 -0
  220. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloXmaContentRef/InstamadilloXmaContentRef.proto +105 -0
  221. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waAdv/WAAdv.pb.go +39 -9
  222. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waArmadilloApplication/WAArmadilloApplication.pb.go +354 -175
  223. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waArmadilloApplication/WAArmadilloApplication.proto +5 -5
  224. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waArmadilloXMA/WAArmadilloXMA.pb.go +170 -15
  225. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waArmadilloXMA/WAArmadilloXMA.proto +4 -0
  226. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waBotMetadata/WABotMetadata.pb.go +5156 -0
  227. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waBotMetadata/WABotMetadata.proto +516 -0
  228. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCert/WACert.pb.go +29 -9
  229. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waChatLockSettings/WAProtobufsChatLockSettings.pb.go +13 -9
  230. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCommon/WACommon.pb.go +344 -31
  231. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCommon/WACommon.proto +26 -0
  232. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCompanionReg/{WAWebProtobufsCompanionReg.pb.go → WACompanionReg.pb.go} +211 -89
  233. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCompanionReg/{WAWebProtobufsCompanionReg.proto → WACompanionReg.proto} +5 -1
  234. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waConsumerApplication/WAConsumerApplication.pb.go +173 -9
  235. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waDeviceCapabilities/WAProtobufsDeviceCapabilities.pb.go +78 -16
  236. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waDeviceCapabilities/WAProtobufsDeviceCapabilities.proto +5 -0
  237. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waE2E/WAWebProtobufsE2E.pb.go +7463 -5180
  238. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waE2E/WAWebProtobufsE2E.proto +366 -343
  239. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waHistorySync/WAWebProtobufsHistorySync.pb.go +485 -135
  240. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waHistorySync/WAWebProtobufsHistorySync.proto +17 -0
  241. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waLidMigrationSyncPayload/WAWebProtobufLidMigrationSyncPayload.pb.go +198 -0
  242. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waLidMigrationSyncPayload/WAWebProtobufLidMigrationSyncPayload.proto +14 -0
  243. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMediaTransport/WAMediaTransport.pb.go +162 -9
  244. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMediaTransport/WAMediaTransport.proto +1 -0
  245. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMmsRetry/WAMmsRetry.pb.go +32 -9
  246. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMmsRetry/WAMmsRetry.proto +1 -0
  247. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMsgApplication/WAMsgApplication.pb.go +192 -52
  248. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMsgApplication/WAMsgApplication.proto +8 -0
  249. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMsgTransport/WAMsgTransport.pb.go +60 -9
  250. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMsgTransport/extra.go +7 -6
  251. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMultiDevice/WAMultiDevice.pb.go +39 -9
  252. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waServerSync/WAServerSync.pb.go +61 -9
  253. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waStatusAttributions/WAStatusAttributions.pb.go +952 -0
  254. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waStatusAttributions/WAStatusAttributions.proto +88 -0
  255. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waSyncAction/WASyncAction.pb.go +1802 -453
  256. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waSyncAction/WASyncAction.proto +92 -0
  257. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waUserPassword/WAProtobufsUserPassword.pb.go +27 -9
  258. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waVnameCert/WAWebProtobufsVnameCert.pb.go +59 -9
  259. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWa6/WAWebProtobufsWa6.pb.go +435 -109
  260. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWa6/WAWebProtobufsWa6.proto +11 -0
  261. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWeb/WAWebProtobufsWeb.pb.go +563 -9
  262. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWeb/WAWebProtobufsWeb.proto +4 -0
  263. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/receipt.go +32 -9
  264. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/reportingfields.json +1 -0
  265. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/reportingtoken.go +176 -0
  266. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/retry.go +39 -21
  267. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/send.go +267 -79
  268. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/sendfb.go +28 -16
  269. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/clientpayload.go +3 -1
  270. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/noop.go +87 -44
  271. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/signal.go +75 -88
  272. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/container.go +86 -65
  273. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/lidmap.go +186 -0
  274. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/store.go +314 -170
  275. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/00-latest-schema.sql +155 -0
  276. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/03-message-secrets.sql +11 -0
  277. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/04-privacy-tokens.sql +8 -0
  278. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/05-account-jid-format.sql +2 -0
  279. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/06-facebook-uuid.sql +2 -0
  280. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/07-account-lid.sql +2 -0
  281. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/08-lid-mapping.sql +5 -0
  282. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/09-decryption-buffer.sql +10 -0
  283. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/10-chat-db-lid-migration-ts.sql +2 -0
  284. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/upgrades.go +22 -0
  285. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/store.go +109 -56
  286. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/botmap.go +210 -0
  287. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/call.go +1 -0
  288. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/events/events.go +21 -2
  289. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/group.go +15 -6
  290. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/jid.go +9 -9
  291. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/message.go +18 -0
  292. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/user.go +2 -0
  293. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/update.go +3 -2
  294. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/upload.go +1 -1
  295. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/user.go +59 -37
  296. slidge_whatsapp/vendor/golang.org/x/crypto/curve25519/curve25519.go +1 -1
  297. slidge_whatsapp/vendor/golang.org/x/exp/LICENSE +27 -0
  298. slidge_whatsapp/vendor/golang.org/x/exp/PATENTS +22 -0
  299. slidge_whatsapp/vendor/golang.org/x/exp/constraints/constraints.go +54 -0
  300. slidge_whatsapp/vendor/golang.org/x/net/http/httpguts/guts.go +50 -0
  301. slidge_whatsapp/vendor/golang.org/x/net/http/httpguts/httplex.go +347 -0
  302. slidge_whatsapp/vendor/golang.org/x/net/http2/.gitignore +2 -0
  303. slidge_whatsapp/vendor/golang.org/x/net/http2/ascii.go +53 -0
  304. slidge_whatsapp/vendor/golang.org/x/net/http2/ciphers.go +641 -0
  305. slidge_whatsapp/vendor/golang.org/x/net/http2/client_conn_pool.go +311 -0
  306. slidge_whatsapp/vendor/golang.org/x/net/http2/config.go +164 -0
  307. slidge_whatsapp/vendor/golang.org/x/net/http2/databuffer.go +149 -0
  308. slidge_whatsapp/vendor/golang.org/x/net/http2/errors.go +145 -0
  309. slidge_whatsapp/vendor/golang.org/x/net/http2/flow.go +120 -0
  310. slidge_whatsapp/vendor/golang.org/x/net/http2/frame.go +1702 -0
  311. slidge_whatsapp/vendor/golang.org/x/net/http2/gotrack.go +181 -0
  312. slidge_whatsapp/vendor/golang.org/x/net/http2/hpack/encode.go +245 -0
  313. slidge_whatsapp/vendor/golang.org/x/net/http2/hpack/hpack.go +523 -0
  314. slidge_whatsapp/vendor/golang.org/x/net/http2/hpack/huffman.go +226 -0
  315. slidge_whatsapp/vendor/golang.org/x/net/http2/hpack/static_table.go +188 -0
  316. slidge_whatsapp/vendor/golang.org/x/net/http2/hpack/tables.go +403 -0
  317. slidge_whatsapp/vendor/golang.org/x/net/http2/http2.go +410 -0
  318. slidge_whatsapp/vendor/golang.org/x/net/http2/pipe.go +184 -0
  319. slidge_whatsapp/vendor/golang.org/x/net/http2/server.go +3332 -0
  320. slidge_whatsapp/vendor/golang.org/x/net/http2/transport.go +3233 -0
  321. slidge_whatsapp/vendor/golang.org/x/net/http2/unencrypted.go +32 -0
  322. slidge_whatsapp/vendor/golang.org/x/net/http2/write.go +381 -0
  323. slidge_whatsapp/vendor/golang.org/x/net/http2/writesched.go +251 -0
  324. slidge_whatsapp/vendor/golang.org/x/net/http2/writesched_priority.go +451 -0
  325. slidge_whatsapp/vendor/golang.org/x/net/http2/writesched_random.go +77 -0
  326. slidge_whatsapp/vendor/golang.org/x/net/http2/writesched_roundrobin.go +119 -0
  327. slidge_whatsapp/vendor/golang.org/x/net/idna/go118.go +13 -0
  328. slidge_whatsapp/vendor/golang.org/x/net/idna/idna10.0.0.go +769 -0
  329. slidge_whatsapp/vendor/golang.org/x/net/idna/idna9.0.0.go +717 -0
  330. slidge_whatsapp/vendor/golang.org/x/net/idna/pre_go118.go +11 -0
  331. slidge_whatsapp/vendor/golang.org/x/net/idna/punycode.go +217 -0
  332. slidge_whatsapp/vendor/golang.org/x/net/idna/tables10.0.0.go +4559 -0
  333. slidge_whatsapp/vendor/golang.org/x/net/idna/tables11.0.0.go +4653 -0
  334. slidge_whatsapp/vendor/golang.org/x/net/idna/tables12.0.0.go +4733 -0
  335. slidge_whatsapp/vendor/golang.org/x/net/idna/tables13.0.0.go +4959 -0
  336. slidge_whatsapp/vendor/golang.org/x/net/idna/tables15.0.0.go +5144 -0
  337. slidge_whatsapp/vendor/golang.org/x/net/idna/tables9.0.0.go +4486 -0
  338. slidge_whatsapp/vendor/golang.org/x/net/idna/trie.go +51 -0
  339. slidge_whatsapp/vendor/golang.org/x/net/idna/trie12.0.0.go +30 -0
  340. slidge_whatsapp/vendor/golang.org/x/net/idna/trie13.0.0.go +30 -0
  341. slidge_whatsapp/vendor/golang.org/x/net/idna/trieval.go +119 -0
  342. slidge_whatsapp/vendor/golang.org/x/net/internal/httpcommon/ascii.go +53 -0
  343. slidge_whatsapp/vendor/golang.org/x/net/internal/httpcommon/headermap.go +115 -0
  344. slidge_whatsapp/vendor/golang.org/x/net/internal/httpcommon/request.go +467 -0
  345. slidge_whatsapp/vendor/golang.org/x/sys/unix/affinity_linux.go +1 -3
  346. slidge_whatsapp/vendor/golang.org/x/sys/unix/mkerrors.sh +3 -0
  347. slidge_whatsapp/vendor/golang.org/x/sys/unix/syscall_darwin.go +93 -0
  348. slidge_whatsapp/vendor/golang.org/x/sys/unix/syscall_linux.go +16 -26
  349. slidge_whatsapp/vendor/golang.org/x/sys/unix/syscall_solaris.go +1 -1
  350. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux.go +47 -16
  351. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_386.go +3 -0
  352. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go +3 -0
  353. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go +3 -0
  354. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go +3 -0
  355. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go +3 -0
  356. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go +3 -0
  357. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go +3 -0
  358. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go +3 -0
  359. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go +3 -0
  360. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go +3 -0
  361. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go +3 -0
  362. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go +3 -0
  363. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go +3 -0
  364. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go +3 -0
  365. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go +3 -0
  366. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go +84 -0
  367. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s +20 -0
  368. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go +84 -0
  369. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s +20 -0
  370. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go +4 -4
  371. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go +1 -0
  372. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go +1 -0
  373. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go +1 -0
  374. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go +1 -0
  375. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go +1 -0
  376. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go +1 -0
  377. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go +1 -0
  378. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go +1 -0
  379. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go +1 -0
  380. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go +1 -0
  381. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go +1 -0
  382. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go +1 -0
  383. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go +1 -0
  384. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go +1 -0
  385. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go +1 -0
  386. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux.go +168 -12
  387. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_386.go +17 -1
  388. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go +16 -0
  389. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go +18 -2
  390. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go +16 -0
  391. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go +16 -0
  392. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go +17 -1
  393. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go +16 -0
  394. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go +16 -0
  395. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go +17 -1
  396. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go +18 -2
  397. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go +16 -0
  398. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go +16 -0
  399. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go +16 -0
  400. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go +16 -0
  401. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go +16 -0
  402. slidge_whatsapp/vendor/golang.org/x/sys/windows/security_windows.go +44 -5
  403. slidge_whatsapp/vendor/golang.org/x/sys/windows/syscall_windows.go +4 -2
  404. slidge_whatsapp/vendor/golang.org/x/sys/windows/types_windows.go +245 -0
  405. slidge_whatsapp/vendor/golang.org/x/sys/windows/zsyscall_windows.go +491 -482
  406. slidge_whatsapp/vendor/golang.org/x/text/LICENSE +27 -0
  407. slidge_whatsapp/vendor/golang.org/x/text/PATENTS +22 -0
  408. slidge_whatsapp/vendor/golang.org/x/text/secure/bidirule/bidirule.go +336 -0
  409. slidge_whatsapp/vendor/golang.org/x/text/secure/bidirule/bidirule10.0.0.go +11 -0
  410. slidge_whatsapp/vendor/golang.org/x/text/secure/bidirule/bidirule9.0.0.go +14 -0
  411. slidge_whatsapp/vendor/golang.org/x/text/transform/transform.go +709 -0
  412. slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/bidi.go +359 -0
  413. slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/bracket.go +335 -0
  414. slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/core.go +1071 -0
  415. slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/prop.go +206 -0
  416. slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/tables10.0.0.go +1815 -0
  417. slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/tables11.0.0.go +1887 -0
  418. slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/tables12.0.0.go +1923 -0
  419. slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/tables13.0.0.go +1955 -0
  420. slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/tables15.0.0.go +2042 -0
  421. slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/tables9.0.0.go +1781 -0
  422. slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/trieval.go +48 -0
  423. slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/composition.go +512 -0
  424. slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/forminfo.go +279 -0
  425. slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/input.go +109 -0
  426. slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/iter.go +458 -0
  427. slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/normalize.go +610 -0
  428. slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/readwriter.go +125 -0
  429. slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/tables10.0.0.go +7657 -0
  430. slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/tables11.0.0.go +7693 -0
  431. slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/tables12.0.0.go +7710 -0
  432. slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/tables13.0.0.go +7760 -0
  433. slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/tables15.0.0.go +7907 -0
  434. slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/tables9.0.0.go +7637 -0
  435. slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/transform.go +88 -0
  436. slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/trie.go +54 -0
  437. slidge_whatsapp/vendor/google.golang.org/protobuf/encoding/protowire/wire.go +25 -1
  438. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb +0 -0
  439. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/filedesc/editions.go +13 -5
  440. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/filedesc/presence.go +33 -0
  441. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/genid/api_gen.go +6 -0
  442. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go +81 -19
  443. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/impl/codec_message_opaque.go +2 -1
  444. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/impl/message_opaque.go +8 -37
  445. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/impl/presence.go +0 -3
  446. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/strs/{strings_unsafe_go121.go → strings_unsafe.go} +0 -2
  447. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/version/version.go +1 -1
  448. slidge_whatsapp/vendor/google.golang.org/protobuf/proto/merge.go +6 -0
  449. slidge_whatsapp/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go +10 -0
  450. slidge_whatsapp/vendor/google.golang.org/protobuf/reflect/protoreflect/{value_unsafe_go121.go → value_unsafe.go} +0 -2
  451. slidge_whatsapp/vendor/modules.txt +80 -21
  452. {slidge_whatsapp-0.2.5.dist-info → slidge_whatsapp-0.3.0.dist-info}/METADATA +5 -4
  453. {slidge_whatsapp-0.2.5.dist-info → slidge_whatsapp-0.3.0.dist-info}/RECORD +456 -263
  454. {slidge_whatsapp-0.2.5.dist-info → slidge_whatsapp-0.3.0.dist-info}/WHEEL +1 -1
  455. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/abi_amd64.go +0 -7
  456. slidge_whatsapp/vendor/github.com/rs/zerolog/CNAME +0 -1
  457. slidge_whatsapp/vendor/github.com/rs/zerolog/_config.yml +0 -1
  458. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waAdv/WAAdv.pb.raw +0 -0
  459. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waArmadilloApplication/WAArmadilloApplication.pb.raw +0 -0
  460. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waArmadilloXMA/WAArmadilloXMA.pb.raw +0 -0
  461. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCert/WACert.pb.raw +0 -23
  462. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waChatLockSettings/WAProtobufsChatLockSettings.pb.raw +0 -7
  463. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCommon/WACommon.pb.raw +0 -0
  464. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCompanionReg/WAWebProtobufsCompanionReg.pb.raw +0 -0
  465. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waConsumerApplication/WAConsumerApplication.pb.raw +0 -0
  466. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waDeviceCapabilities/WAProtobufsDeviceCapabilities.pb.raw +0 -0
  467. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waE2E/WAWebProtobufsE2E.pb.raw +0 -0
  468. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waHistorySync/WAWebProtobufsHistorySync.pb.raw +0 -0
  469. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMediaTransport/WAMediaTransport.pb.raw +0 -0
  470. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMmsRetry/WAMmsRetry.pb.raw +0 -0
  471. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMsgApplication/WAMsgApplication.pb.raw +0 -0
  472. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMsgTransport/WAMsgTransport.pb.raw +0 -0
  473. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMultiDevice/WAMultiDevice.pb.raw +0 -0
  474. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waServerSync/WAServerSync.pb.raw +0 -0
  475. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waSyncAction/WASyncAction.pb.raw +0 -0
  476. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waUserPassword/WAProtobufsUserPassword.pb.raw +0 -0
  477. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waVnameCert/WAWebProtobufsVnameCert.pb.raw +0 -0
  478. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWa6/WAWebProtobufsWa6.pb.raw +0 -0
  479. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWeb/WAWebProtobufsWeb.pb.raw +0 -0
  480. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrade.go +0 -296
  481. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe_go120.go +0 -94
  482. slidge_whatsapp/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go120.go +0 -98
  483. {slidge_whatsapp-0.2.5.dist-info → slidge_whatsapp-0.3.0.dist-info}/entry_points.txt +0 -0
  484. {slidge_whatsapp-0.2.5.dist-info → slidge_whatsapp-0.3.0.dist-info/licenses}/LICENSE +0 -0
@@ -134,7 +134,7 @@ extern "C" {
134
134
  **
135
135
  ** Since [version 3.6.18] ([dateof:3.6.18]),
136
136
  ** SQLite source code has been stored in the
137
- ** <a href="http://www.fossil-scm.org/">Fossil configuration management
137
+ ** <a href="http://fossil-scm.org/">Fossil configuration management
138
138
  ** system</a>. ^The SQLITE_SOURCE_ID macro evaluates to
139
139
  ** a string which identifies a particular check-in of SQLite
140
140
  ** within its configuration management system. ^The SQLITE_SOURCE_ID
@@ -147,9 +147,9 @@ extern "C" {
147
147
  ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
148
148
  ** [sqlite_version()] and [sqlite_source_id()].
149
149
  */
150
- #define SQLITE_VERSION "3.46.1"
151
- #define SQLITE_VERSION_NUMBER 3046001
152
- #define SQLITE_SOURCE_ID "2024-08-13 09:16:08 c9c2ab54ba1f5f46360f1b4f35d849cd3f080e6fc2b6c60e91b16c63f69a1e33"
150
+ #define SQLITE_VERSION "3.50.4"
151
+ #define SQLITE_VERSION_NUMBER 3050004
152
+ #define SQLITE_SOURCE_ID "2025-07-30 19:33:53 4d8adfb30e03f9cf27f800a2c1ba3c48fb4ca1b08b0f5ed59a4d5ecbf45e20a3"
153
153
 
154
154
  /*
155
155
  ** CAPI3REF: Run-Time Library Version Numbers
@@ -653,6 +653,13 @@ SQLITE_API int sqlite3_exec(
653
653
  ** filesystem supports doing multiple write operations atomically when those
654
654
  ** write operations are bracketed by [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE] and
655
655
  ** [SQLITE_FCNTL_COMMIT_ATOMIC_WRITE].
656
+ **
657
+ ** The SQLITE_IOCAP_SUBPAGE_READ property means that it is ok to read
658
+ ** from the database file in amounts that are not a multiple of the
659
+ ** page size and that do not begin at a page boundary. Without this
660
+ ** property, SQLite is careful to only do full-page reads and write
661
+ ** on aligned pages, with the one exception that it will do a sub-page
662
+ ** read of the first page to access the database header.
656
663
  */
657
664
  #define SQLITE_IOCAP_ATOMIC 0x00000001
658
665
  #define SQLITE_IOCAP_ATOMIC512 0x00000002
@@ -669,6 +676,7 @@ SQLITE_API int sqlite3_exec(
669
676
  #define SQLITE_IOCAP_POWERSAFE_OVERWRITE 0x00001000
670
677
  #define SQLITE_IOCAP_IMMUTABLE 0x00002000
671
678
  #define SQLITE_IOCAP_BATCH_ATOMIC 0x00004000
679
+ #define SQLITE_IOCAP_SUBPAGE_READ 0x00008000
672
680
 
673
681
  /*
674
682
  ** CAPI3REF: File Locking Levels
@@ -773,8 +781,8 @@ struct sqlite3_file {
773
781
  ** to xUnlock() is a no-op.
774
782
  ** The xCheckReservedLock() method checks whether any database connection,
775
783
  ** either in this process or in some other process, is holding a RESERVED,
776
- ** PENDING, or EXCLUSIVE lock on the file. It returns true
777
- ** if such a lock exists and false otherwise.
784
+ ** PENDING, or EXCLUSIVE lock on the file. It returns, via its output
785
+ ** pointer parameter, true if such a lock exists and false otherwise.
778
786
  **
779
787
  ** The xFileControl() method is a generic interface that allows custom
780
788
  ** VFS implementations to directly control an open file using the
@@ -815,6 +823,7 @@ struct sqlite3_file {
815
823
  ** <li> [SQLITE_IOCAP_POWERSAFE_OVERWRITE]
816
824
  ** <li> [SQLITE_IOCAP_IMMUTABLE]
817
825
  ** <li> [SQLITE_IOCAP_BATCH_ATOMIC]
826
+ ** <li> [SQLITE_IOCAP_SUBPAGE_READ]
818
827
  ** </ul>
819
828
  **
820
829
  ** The SQLITE_IOCAP_ATOMIC property means that all writes of
@@ -1092,6 +1101,11 @@ struct sqlite3_io_methods {
1092
1101
  ** pointed to by the pArg argument. This capability is used during testing
1093
1102
  ** and only needs to be supported when SQLITE_TEST is defined.
1094
1103
  **
1104
+ ** <li>[[SQLITE_FCNTL_NULL_IO]]
1105
+ ** The [SQLITE_FCNTL_NULL_IO] opcode sets the low-level file descriptor
1106
+ ** or file handle for the [sqlite3_file] object such that it will no longer
1107
+ ** read or write to the database file.
1108
+ **
1095
1109
  ** <li>[[SQLITE_FCNTL_WAL_BLOCK]]
1096
1110
  ** The [SQLITE_FCNTL_WAL_BLOCK] is a signal to the VFS layer that it might
1097
1111
  ** be advantageous to block on the next WAL lock if the lock is not immediately
@@ -1150,6 +1164,12 @@ struct sqlite3_io_methods {
1150
1164
  ** the value that M is to be set to. Before returning, the 32-bit signed
1151
1165
  ** integer is overwritten with the previous value of M.
1152
1166
  **
1167
+ ** <li>[[SQLITE_FCNTL_BLOCK_ON_CONNECT]]
1168
+ ** The [SQLITE_FCNTL_BLOCK_ON_CONNECT] opcode is used to configure the
1169
+ ** VFS to block when taking a SHARED lock to connect to a wal mode database.
1170
+ ** This is used to implement the functionality associated with
1171
+ ** SQLITE_SETLK_BLOCK_ON_CONNECT.
1172
+ **
1153
1173
  ** <li>[[SQLITE_FCNTL_DATA_VERSION]]
1154
1174
  ** The [SQLITE_FCNTL_DATA_VERSION] opcode is used to detect changes to
1155
1175
  ** a database file. The argument is a pointer to a 32-bit unsigned integer.
@@ -1245,6 +1265,8 @@ struct sqlite3_io_methods {
1245
1265
  #define SQLITE_FCNTL_EXTERNAL_READER 40
1246
1266
  #define SQLITE_FCNTL_CKSM_FILE 41
1247
1267
  #define SQLITE_FCNTL_RESET_CACHE 42
1268
+ #define SQLITE_FCNTL_NULL_IO 43
1269
+ #define SQLITE_FCNTL_BLOCK_ON_CONNECT 44
1248
1270
 
1249
1271
  /* deprecated names */
1250
1272
  #define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE
@@ -1975,13 +1997,16 @@ struct sqlite3_mem_methods {
1975
1997
  **
1976
1998
  ** [[SQLITE_CONFIG_LOOKASIDE]] <dt>SQLITE_CONFIG_LOOKASIDE</dt>
1977
1999
  ** <dd> ^(The SQLITE_CONFIG_LOOKASIDE option takes two arguments that determine
1978
- ** the default size of lookaside memory on each [database connection].
2000
+ ** the default size of [lookaside memory] on each [database connection].
1979
2001
  ** The first argument is the
1980
- ** size of each lookaside buffer slot and the second is the number of
1981
- ** slots allocated to each database connection.)^ ^(SQLITE_CONFIG_LOOKASIDE
1982
- ** sets the <i>default</i> lookaside size. The [SQLITE_DBCONFIG_LOOKASIDE]
1983
- ** option to [sqlite3_db_config()] can be used to change the lookaside
1984
- ** configuration on individual connections.)^ </dd>
2002
+ ** size of each lookaside buffer slot ("sz") and the second is the number of
2003
+ ** slots allocated to each database connection ("cnt").)^
2004
+ ** ^(SQLITE_CONFIG_LOOKASIDE sets the <i>default</i> lookaside size.
2005
+ ** The [SQLITE_DBCONFIG_LOOKASIDE] option to [sqlite3_db_config()] can
2006
+ ** be used to change the lookaside configuration on individual connections.)^
2007
+ ** The [-DSQLITE_DEFAULT_LOOKASIDE] option can be used to change the
2008
+ ** default lookaside configuration at compile-time.
2009
+ ** </dd>
1985
2010
  **
1986
2011
  ** [[SQLITE_CONFIG_PCACHE2]] <dt>SQLITE_CONFIG_PCACHE2</dt>
1987
2012
  ** <dd> ^(The SQLITE_CONFIG_PCACHE2 option takes a single argument which is
@@ -2197,7 +2222,15 @@ struct sqlite3_mem_methods {
2197
2222
  ** CAPI3REF: Database Connection Configuration Options
2198
2223
  **
2199
2224
  ** These constants are the available integer configuration options that
2200
- ** can be passed as the second argument to the [sqlite3_db_config()] interface.
2225
+ ** can be passed as the second parameter to the [sqlite3_db_config()] interface.
2226
+ **
2227
+ ** The [sqlite3_db_config()] interface is a var-args functions. It takes a
2228
+ ** variable number of parameters, though always at least two. The number of
2229
+ ** parameters passed into sqlite3_db_config() depends on which of these
2230
+ ** constants is given as the second parameter. This documentation page
2231
+ ** refers to parameters beyond the second as "arguments". Thus, when this
2232
+ ** page says "the N-th argument" it means "the N-th parameter past the
2233
+ ** configuration option" or "the (N+2)-th parameter to sqlite3_db_config()".
2201
2234
  **
2202
2235
  ** New configuration options may be added in future releases of SQLite.
2203
2236
  ** Existing configuration options might be discontinued. Applications
@@ -2209,31 +2242,57 @@ struct sqlite3_mem_methods {
2209
2242
  ** <dl>
2210
2243
  ** [[SQLITE_DBCONFIG_LOOKASIDE]]
2211
2244
  ** <dt>SQLITE_DBCONFIG_LOOKASIDE</dt>
2212
- ** <dd> ^This option takes three additional arguments that determine the
2213
- ** [lookaside memory allocator] configuration for the [database connection].
2214
- ** ^The first argument (the third parameter to [sqlite3_db_config()] is a
2245
+ ** <dd> The SQLITE_DBCONFIG_LOOKASIDE option is used to adjust the
2246
+ ** configuration of the [lookaside memory allocator] within a database
2247
+ ** connection.
2248
+ ** The arguments to the SQLITE_DBCONFIG_LOOKASIDE option are <i>not</i>
2249
+ ** in the [DBCONFIG arguments|usual format].
2250
+ ** The SQLITE_DBCONFIG_LOOKASIDE option takes three arguments, not two,
2251
+ ** so that a call to [sqlite3_db_config()] that uses SQLITE_DBCONFIG_LOOKASIDE
2252
+ ** should have a total of five parameters.
2253
+ ** <ol>
2254
+ ** <li><p>The first argument ("buf") is a
2215
2255
  ** pointer to a memory buffer to use for lookaside memory.
2216
- ** ^The first argument after the SQLITE_DBCONFIG_LOOKASIDE verb
2217
- ** may be NULL in which case SQLite will allocate the
2218
- ** lookaside buffer itself using [sqlite3_malloc()]. ^The second argument is the
2219
- ** size of each lookaside buffer slot. ^The third argument is the number of
2220
- ** slots. The size of the buffer in the first argument must be greater than
2221
- ** or equal to the product of the second and third arguments. The buffer
2222
- ** must be aligned to an 8-byte boundary. ^If the second argument to
2223
- ** SQLITE_DBCONFIG_LOOKASIDE is not a multiple of 8, it is internally
2224
- ** rounded down to the next smaller multiple of 8. ^(The lookaside memory
2256
+ ** The first argument may be NULL in which case SQLite will allocate the
2257
+ ** lookaside buffer itself using [sqlite3_malloc()].
2258
+ ** <li><P>The second argument ("sz") is the
2259
+ ** size of each lookaside buffer slot. Lookaside is disabled if "sz"
2260
+ ** is less than 8. The "sz" argument should be a multiple of 8 less than
2261
+ ** 65536. If "sz" does not meet this constraint, it is reduced in size until
2262
+ ** it does.
2263
+ ** <li><p>The third argument ("cnt") is the number of slots. Lookaside is disabled
2264
+ ** if "cnt"is less than 1. The "cnt" value will be reduced, if necessary, so
2265
+ ** that the product of "sz" and "cnt" does not exceed 2,147,418,112. The "cnt"
2266
+ ** parameter is usually chosen so that the product of "sz" and "cnt" is less
2267
+ ** than 1,000,000.
2268
+ ** </ol>
2269
+ ** <p>If the "buf" argument is not NULL, then it must
2270
+ ** point to a memory buffer with a size that is greater than
2271
+ ** or equal to the product of "sz" and "cnt".
2272
+ ** The buffer must be aligned to an 8-byte boundary.
2273
+ ** The lookaside memory
2225
2274
  ** configuration for a database connection can only be changed when that
2226
2275
  ** connection is not currently using lookaside memory, or in other words
2227
- ** when the "current value" returned by
2228
- ** [sqlite3_db_status](D,[SQLITE_DBSTATUS_LOOKASIDE_USED],...) is zero.
2276
+ ** when the value returned by [SQLITE_DBSTATUS_LOOKASIDE_USED] is zero.
2229
2277
  ** Any attempt to change the lookaside memory configuration when lookaside
2230
2278
  ** memory is in use leaves the configuration unchanged and returns
2231
- ** [SQLITE_BUSY].)^</dd>
2279
+ ** [SQLITE_BUSY].
2280
+ ** If the "buf" argument is NULL and an attempt
2281
+ ** to allocate memory based on "sz" and "cnt" fails, then
2282
+ ** lookaside is silently disabled.
2283
+ ** <p>
2284
+ ** The [SQLITE_CONFIG_LOOKASIDE] configuration option can be used to set the
2285
+ ** default lookaside configuration at initialization. The
2286
+ ** [-DSQLITE_DEFAULT_LOOKASIDE] option can be used to set the default lookaside
2287
+ ** configuration at compile-time. Typical values for lookaside are 1200 for
2288
+ ** "sz" and 40 to 100 for "cnt".
2289
+ ** </dd>
2232
2290
  **
2233
2291
  ** [[SQLITE_DBCONFIG_ENABLE_FKEY]]
2234
2292
  ** <dt>SQLITE_DBCONFIG_ENABLE_FKEY</dt>
2235
2293
  ** <dd> ^This option is used to enable or disable the enforcement of
2236
- ** [foreign key constraints]. There should be two additional arguments.
2294
+ ** [foreign key constraints]. This is the same setting that is
2295
+ ** enabled or disabled by the [PRAGMA foreign_keys] statement.
2237
2296
  ** The first argument is an integer which is 0 to disable FK enforcement,
2238
2297
  ** positive to enable FK enforcement or negative to leave FK enforcement
2239
2298
  ** unchanged. The second parameter is a pointer to an integer into which
@@ -2255,13 +2314,13 @@ struct sqlite3_mem_methods {
2255
2314
  ** <p>Originally this option disabled all triggers. ^(However, since
2256
2315
  ** SQLite version 3.35.0, TEMP triggers are still allowed even if
2257
2316
  ** this option is off. So, in other words, this option now only disables
2258
- ** triggers in the main database schema or in the schemas of ATTACH-ed
2317
+ ** triggers in the main database schema or in the schemas of [ATTACH]-ed
2259
2318
  ** databases.)^ </dd>
2260
2319
  **
2261
2320
  ** [[SQLITE_DBCONFIG_ENABLE_VIEW]]
2262
2321
  ** <dt>SQLITE_DBCONFIG_ENABLE_VIEW</dt>
2263
2322
  ** <dd> ^This option is used to enable or disable [CREATE VIEW | views].
2264
- ** There should be two additional arguments.
2323
+ ** There must be two additional arguments.
2265
2324
  ** The first argument is an integer which is 0 to disable views,
2266
2325
  ** positive to enable views or negative to leave the setting unchanged.
2267
2326
  ** The second parameter is a pointer to an integer into which
@@ -2280,7 +2339,7 @@ struct sqlite3_mem_methods {
2280
2339
  ** <dd> ^This option is used to enable or disable the
2281
2340
  ** [fts3_tokenizer()] function which is part of the
2282
2341
  ** [FTS3] full-text search engine extension.
2283
- ** There should be two additional arguments.
2342
+ ** There must be two additional arguments.
2284
2343
  ** The first argument is an integer which is 0 to disable fts3_tokenizer() or
2285
2344
  ** positive to enable fts3_tokenizer() or negative to leave the setting
2286
2345
  ** unchanged.
@@ -2295,7 +2354,7 @@ struct sqlite3_mem_methods {
2295
2354
  ** interface independently of the [load_extension()] SQL function.
2296
2355
  ** The [sqlite3_enable_load_extension()] API enables or disables both the
2297
2356
  ** C-API [sqlite3_load_extension()] and the SQL function [load_extension()].
2298
- ** There should be two additional arguments.
2357
+ ** There must be two additional arguments.
2299
2358
  ** When the first argument to this interface is 1, then only the C-API is
2300
2359
  ** enabled and the SQL function remains disabled. If the first argument to
2301
2360
  ** this interface is 0, then both the C-API and the SQL function are disabled.
@@ -2309,23 +2368,30 @@ struct sqlite3_mem_methods {
2309
2368
  **
2310
2369
  ** [[SQLITE_DBCONFIG_MAINDBNAME]] <dt>SQLITE_DBCONFIG_MAINDBNAME</dt>
2311
2370
  ** <dd> ^This option is used to change the name of the "main" database
2312
- ** schema. ^The sole argument is a pointer to a constant UTF8 string
2313
- ** which will become the new schema name in place of "main". ^SQLite
2314
- ** does not make a copy of the new main schema name string, so the application
2315
- ** must ensure that the argument passed into this DBCONFIG option is unchanged
2316
- ** until after the database connection closes.
2371
+ ** schema. This option does not follow the
2372
+ ** [DBCONFIG arguments|usual SQLITE_DBCONFIG argument format].
2373
+ ** This option takes exactly one additional argument so that the
2374
+ ** [sqlite3_db_config()] call has a total of three parameters. The
2375
+ ** extra argument must be a pointer to a constant UTF8 string which
2376
+ ** will become the new schema name in place of "main". ^SQLite does
2377
+ ** not make a copy of the new main schema name string, so the application
2378
+ ** must ensure that the argument passed into SQLITE_DBCONFIG MAINDBNAME
2379
+ ** is unchanged until after the database connection closes.
2317
2380
  ** </dd>
2318
2381
  **
2319
2382
  ** [[SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE]]
2320
2383
  ** <dt>SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE</dt>
2321
- ** <dd> Usually, when a database in wal mode is closed or detached from a
2322
- ** database handle, SQLite checks if this will mean that there are now no
2323
- ** connections at all to the database. If so, it performs a checkpoint
2324
- ** operation before closing the connection. This option may be used to
2325
- ** override this behavior. The first parameter passed to this operation
2326
- ** is an integer - positive to disable checkpoints-on-close, or zero (the
2327
- ** default) to enable them, and negative to leave the setting unchanged.
2328
- ** The second parameter is a pointer to an integer
2384
+ ** <dd> Usually, when a database in [WAL mode] is closed or detached from a
2385
+ ** database handle, SQLite checks if if there are other connections to the
2386
+ ** same database, and if there are no other database connection (if the
2387
+ ** connection being closed is the last open connection to the database),
2388
+ ** then SQLite performs a [checkpoint] before closing the connection and
2389
+ ** deletes the WAL file. The SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE option can
2390
+ ** be used to override that behavior. The first argument passed to this
2391
+ ** operation (the third parameter to [sqlite3_db_config()]) is an integer
2392
+ ** which is positive to disable checkpoints-on-close, or zero (the default)
2393
+ ** to enable them, and negative to leave the setting unchanged.
2394
+ ** The second argument (the fourth parameter) is a pointer to an integer
2329
2395
  ** into which is written 0 or 1 to indicate whether checkpoints-on-close
2330
2396
  ** have been disabled - 0 if they are not disabled, 1 if they are.
2331
2397
  ** </dd>
@@ -2486,7 +2552,7 @@ struct sqlite3_mem_methods {
2486
2552
  ** statistics. For statistics to be collected, the flag must be set on
2487
2553
  ** the database handle both when the SQL statement is prepared and when it
2488
2554
  ** is stepped. The flag is set (collection of statistics is enabled)
2489
- ** by default. This option takes two arguments: an integer and a pointer to
2555
+ ** by default. <p>This option takes two arguments: an integer and a pointer to
2490
2556
  ** an integer.. The first argument is 1, 0, or -1 to enable, disable, or
2491
2557
  ** leave unchanged the statement scanstatus option. If the second argument
2492
2558
  ** is not NULL, then the value of the statement scanstatus setting after
@@ -2500,7 +2566,7 @@ struct sqlite3_mem_methods {
2500
2566
  ** in which tables and indexes are scanned so that the scans start at the end
2501
2567
  ** and work toward the beginning rather than starting at the beginning and
2502
2568
  ** working toward the end. Setting SQLITE_DBCONFIG_REVERSE_SCANORDER is the
2503
- ** same as setting [PRAGMA reverse_unordered_selects]. This option takes
2569
+ ** same as setting [PRAGMA reverse_unordered_selects]. <p>This option takes
2504
2570
  ** two arguments which are an integer and a pointer to an integer. The first
2505
2571
  ** argument is 1, 0, or -1 to enable, disable, or leave unchanged the
2506
2572
  ** reverse scan order flag, respectively. If the second argument is not NULL,
@@ -2509,7 +2575,76 @@ struct sqlite3_mem_methods {
2509
2575
  ** first argument.
2510
2576
  ** </dd>
2511
2577
  **
2578
+ ** [[SQLITE_DBCONFIG_ENABLE_ATTACH_CREATE]]
2579
+ ** <dt>SQLITE_DBCONFIG_ENABLE_ATTACH_CREATE</dt>
2580
+ ** <dd>The SQLITE_DBCONFIG_ENABLE_ATTACH_CREATE option enables or disables
2581
+ ** the ability of the [ATTACH DATABASE] SQL command to create a new database
2582
+ ** file if the database filed named in the ATTACH command does not already
2583
+ ** exist. This ability of ATTACH to create a new database is enabled by
2584
+ ** default. Applications can disable or reenable the ability for ATTACH to
2585
+ ** create new database files using this DBCONFIG option.<p>
2586
+ ** This option takes two arguments which are an integer and a pointer
2587
+ ** to an integer. The first argument is 1, 0, or -1 to enable, disable, or
2588
+ ** leave unchanged the attach-create flag, respectively. If the second
2589
+ ** argument is not NULL, then 0 or 1 is written into the integer that the
2590
+ ** second argument points to depending on if the attach-create flag is set
2591
+ ** after processing the first argument.
2592
+ ** </dd>
2593
+ **
2594
+ ** [[SQLITE_DBCONFIG_ENABLE_ATTACH_WRITE]]
2595
+ ** <dt>SQLITE_DBCONFIG_ENABLE_ATTACH_WRITE</dt>
2596
+ ** <dd>The SQLITE_DBCONFIG_ENABLE_ATTACH_WRITE option enables or disables the
2597
+ ** ability of the [ATTACH DATABASE] SQL command to open a database for writing.
2598
+ ** This capability is enabled by default. Applications can disable or
2599
+ ** reenable this capability using the current DBCONFIG option. If the
2600
+ ** the this capability is disabled, the [ATTACH] command will still work,
2601
+ ** but the database will be opened read-only. If this option is disabled,
2602
+ ** then the ability to create a new database using [ATTACH] is also disabled,
2603
+ ** regardless of the value of the [SQLITE_DBCONFIG_ENABLE_ATTACH_CREATE]
2604
+ ** option.<p>
2605
+ ** This option takes two arguments which are an integer and a pointer
2606
+ ** to an integer. The first argument is 1, 0, or -1 to enable, disable, or
2607
+ ** leave unchanged the ability to ATTACH another database for writing,
2608
+ ** respectively. If the second argument is not NULL, then 0 or 1 is written
2609
+ ** into the integer to which the second argument points, depending on whether
2610
+ ** the ability to ATTACH a read/write database is enabled or disabled
2611
+ ** after processing the first argument.
2612
+ ** </dd>
2613
+ **
2614
+ ** [[SQLITE_DBCONFIG_ENABLE_COMMENTS]]
2615
+ ** <dt>SQLITE_DBCONFIG_ENABLE_COMMENTS</dt>
2616
+ ** <dd>The SQLITE_DBCONFIG_ENABLE_COMMENTS option enables or disables the
2617
+ ** ability to include comments in SQL text. Comments are enabled by default.
2618
+ ** An application can disable or reenable comments in SQL text using this
2619
+ ** DBCONFIG option.<p>
2620
+ ** This option takes two arguments which are an integer and a pointer
2621
+ ** to an integer. The first argument is 1, 0, or -1 to enable, disable, or
2622
+ ** leave unchanged the ability to use comments in SQL text,
2623
+ ** respectively. If the second argument is not NULL, then 0 or 1 is written
2624
+ ** into the integer that the second argument points to depending on if
2625
+ ** comments are allowed in SQL text after processing the first argument.
2626
+ ** </dd>
2627
+ **
2512
2628
  ** </dl>
2629
+ **
2630
+ ** [[DBCONFIG arguments]] <h3>Arguments To SQLITE_DBCONFIG Options</h3>
2631
+ **
2632
+ ** <p>Most of the SQLITE_DBCONFIG options take two arguments, so that the
2633
+ ** overall call to [sqlite3_db_config()] has a total of four parameters.
2634
+ ** The first argument (the third parameter to sqlite3_db_config()) is a integer.
2635
+ ** The second argument is a pointer to an integer. If the first argument is 1,
2636
+ ** then the option becomes enabled. If the first integer argument is 0, then the
2637
+ ** option is disabled. If the first argument is -1, then the option setting
2638
+ ** is unchanged. The second argument, the pointer to an integer, may be NULL.
2639
+ ** If the second argument is not NULL, then a value of 0 or 1 is written into
2640
+ ** the integer to which the second argument points, depending on whether the
2641
+ ** setting is disabled or enabled after applying any changes specified by
2642
+ ** the first argument.
2643
+ **
2644
+ ** <p>While most SQLITE_DBCONFIG options use the argument format
2645
+ ** described in the previous paragraph, the [SQLITE_DBCONFIG_MAINDBNAME]
2646
+ ** and [SQLITE_DBCONFIG_LOOKASIDE] options are different. See the
2647
+ ** documentation of those exceptional options for details.
2513
2648
  */
2514
2649
  #define SQLITE_DBCONFIG_MAINDBNAME 1000 /* const char* */
2515
2650
  #define SQLITE_DBCONFIG_LOOKASIDE 1001 /* void* int int */
@@ -2531,7 +2666,10 @@ struct sqlite3_mem_methods {
2531
2666
  #define SQLITE_DBCONFIG_TRUSTED_SCHEMA 1017 /* int int* */
2532
2667
  #define SQLITE_DBCONFIG_STMT_SCANSTATUS 1018 /* int int* */
2533
2668
  #define SQLITE_DBCONFIG_REVERSE_SCANORDER 1019 /* int int* */
2534
- #define SQLITE_DBCONFIG_MAX 1019 /* Largest DBCONFIG */
2669
+ #define SQLITE_DBCONFIG_ENABLE_ATTACH_CREATE 1020 /* int int* */
2670
+ #define SQLITE_DBCONFIG_ENABLE_ATTACH_WRITE 1021 /* int int* */
2671
+ #define SQLITE_DBCONFIG_ENABLE_COMMENTS 1022 /* int int* */
2672
+ #define SQLITE_DBCONFIG_MAX 1022 /* Largest DBCONFIG */
2535
2673
 
2536
2674
  /*
2537
2675
  ** CAPI3REF: Enable Or Disable Extended Result Codes
@@ -2623,10 +2761,14 @@ SQLITE_API void sqlite3_set_last_insert_rowid(sqlite3*,sqlite3_int64);
2623
2761
  ** deleted by the most recently completed INSERT, UPDATE or DELETE
2624
2762
  ** statement on the database connection specified by the only parameter.
2625
2763
  ** The two functions are identical except for the type of the return value
2626
- ** and that if the number of rows modified by the most recent INSERT, UPDATE
2764
+ ** and that if the number of rows modified by the most recent INSERT, UPDATE,
2627
2765
  ** or DELETE is greater than the maximum value supported by type "int", then
2628
2766
  ** the return value of sqlite3_changes() is undefined. ^Executing any other
2629
2767
  ** type of SQL statement does not modify the value returned by these functions.
2768
+ ** For the purposes of this interface, a CREATE TABLE AS SELECT statement
2769
+ ** does not count as an INSERT, UPDATE or DELETE statement and hence the rows
2770
+ ** added to the new table by the CREATE TABLE AS SELECT statement are not
2771
+ ** counted.
2630
2772
  **
2631
2773
  ** ^Only changes made directly by the INSERT, UPDATE or DELETE statement are
2632
2774
  ** considered - auxiliary changes caused by [CREATE TRIGGER | triggers],
@@ -2881,6 +3023,44 @@ SQLITE_API int sqlite3_busy_handler(sqlite3*,int(*)(void*,int),void*);
2881
3023
  */
2882
3024
  SQLITE_API int sqlite3_busy_timeout(sqlite3*, int ms);
2883
3025
 
3026
+ /*
3027
+ ** CAPI3REF: Set the Setlk Timeout
3028
+ ** METHOD: sqlite3
3029
+ **
3030
+ ** This routine is only useful in SQLITE_ENABLE_SETLK_TIMEOUT builds. If
3031
+ ** the VFS supports blocking locks, it sets the timeout in ms used by
3032
+ ** eligible locks taken on wal mode databases by the specified database
3033
+ ** handle. In non-SQLITE_ENABLE_SETLK_TIMEOUT builds, or if the VFS does
3034
+ ** not support blocking locks, this function is a no-op.
3035
+ **
3036
+ ** Passing 0 to this function disables blocking locks altogether. Passing
3037
+ ** -1 to this function requests that the VFS blocks for a long time -
3038
+ ** indefinitely if possible. The results of passing any other negative value
3039
+ ** are undefined.
3040
+ **
3041
+ ** Internally, each SQLite database handle store two timeout values - the
3042
+ ** busy-timeout (used for rollback mode databases, or if the VFS does not
3043
+ ** support blocking locks) and the setlk-timeout (used for blocking locks
3044
+ ** on wal-mode databases). The sqlite3_busy_timeout() method sets both
3045
+ ** values, this function sets only the setlk-timeout value. Therefore,
3046
+ ** to configure separate busy-timeout and setlk-timeout values for a single
3047
+ ** database handle, call sqlite3_busy_timeout() followed by this function.
3048
+ **
3049
+ ** Whenever the number of connections to a wal mode database falls from
3050
+ ** 1 to 0, the last connection takes an exclusive lock on the database,
3051
+ ** then checkpoints and deletes the wal file. While it is doing this, any
3052
+ ** new connection that tries to read from the database fails with an
3053
+ ** SQLITE_BUSY error. Or, if the SQLITE_SETLK_BLOCK_ON_CONNECT flag is
3054
+ ** passed to this API, the new connection blocks until the exclusive lock
3055
+ ** has been released.
3056
+ */
3057
+ SQLITE_API int sqlite3_setlk_timeout(sqlite3*, int ms, int flags);
3058
+
3059
+ /*
3060
+ ** CAPI3REF: Flags for sqlite3_setlk_timeout()
3061
+ */
3062
+ #define SQLITE_SETLK_BLOCK_ON_CONNECT 0x01
3063
+
2884
3064
  /*
2885
3065
  ** CAPI3REF: Convenience Routines For Running Queries
2886
3066
  ** METHOD: sqlite3
@@ -3571,8 +3751,8 @@ SQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);
3571
3751
  **
3572
3752
  ** [[OPEN_EXRESCODE]] ^(<dt>[SQLITE_OPEN_EXRESCODE]</dt>
3573
3753
  ** <dd>The database connection comes up in "extended result code mode".
3574
- ** In other words, the database behaves has if
3575
- ** [sqlite3_extended_result_codes(db,1)] where called on the database
3754
+ ** In other words, the database behaves as if
3755
+ ** [sqlite3_extended_result_codes(db,1)] were called on the database
3576
3756
  ** connection as soon as the connection is created. In addition to setting
3577
3757
  ** the extended result code mode, this flag also causes [sqlite3_open_v2()]
3578
3758
  ** to return an extended result code.</dd>
@@ -3900,7 +4080,7 @@ SQLITE_API sqlite3_file *sqlite3_database_file_object(const char*);
3900
4080
  **
3901
4081
  ** The sqlite3_create_filename(D,J,W,N,P) allocates memory to hold a version of
3902
4082
  ** database filename D with corresponding journal file J and WAL file W and
3903
- ** with N URI parameters key/values pairs in the array P. The result from
4083
+ ** an array P of N URI Key/Value pairs. The result from
3904
4084
  ** sqlite3_create_filename(D,J,W,N,P) is a pointer to a database filename that
3905
4085
  ** is safe to pass to routines like:
3906
4086
  ** <ul>
@@ -4186,11 +4366,22 @@ SQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal);
4186
4366
  ** <dd>The SQLITE_PREPARE_NO_VTAB flag causes the SQL compiler
4187
4367
  ** to return an error (error code SQLITE_ERROR) if the statement uses
4188
4368
  ** any virtual tables.
4369
+ **
4370
+ ** [[SQLITE_PREPARE_DONT_LOG]] <dt>SQLITE_PREPARE_DONT_LOG</dt>
4371
+ ** <dd>The SQLITE_PREPARE_DONT_LOG flag prevents SQL compiler
4372
+ ** errors from being sent to the error log defined by
4373
+ ** [SQLITE_CONFIG_LOG]. This can be used, for example, to do test
4374
+ ** compiles to see if some SQL syntax is well-formed, without generating
4375
+ ** messages on the global error log when it is not. If the test compile
4376
+ ** fails, the sqlite3_prepare_v3() call returns the same error indications
4377
+ ** with or without this flag; it just omits the call to [sqlite3_log()] that
4378
+ ** logs the error.
4189
4379
  ** </dl>
4190
4380
  */
4191
4381
  #define SQLITE_PREPARE_PERSISTENT 0x01
4192
4382
  #define SQLITE_PREPARE_NORMALIZE 0x02
4193
4383
  #define SQLITE_PREPARE_NO_VTAB 0x04
4384
+ #define SQLITE_PREPARE_DONT_LOG 0x10
4194
4385
 
4195
4386
  /*
4196
4387
  ** CAPI3REF: Compiling An SQL Statement
@@ -4223,13 +4414,17 @@ SQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal);
4223
4414
  ** and sqlite3_prepare16_v3() use UTF-16.
4224
4415
  **
4225
4416
  ** ^If the nByte argument is negative, then zSql is read up to the
4226
- ** first zero terminator. ^If nByte is positive, then it is the
4227
- ** number of bytes read from zSql. ^If nByte is zero, then no prepared
4417
+ ** first zero terminator. ^If nByte is positive, then it is the maximum
4418
+ ** number of bytes read from zSql. When nByte is positive, zSql is read
4419
+ ** up to the first zero terminator or until the nByte bytes have been read,
4420
+ ** whichever comes first. ^If nByte is zero, then no prepared
4228
4421
  ** statement is generated.
4229
4422
  ** If the caller knows that the supplied string is nul-terminated, then
4230
4423
  ** there is a small performance advantage to passing an nByte parameter that
4231
4424
  ** is the number of bytes in the input string <i>including</i>
4232
4425
  ** the nul-terminator.
4426
+ ** Note that nByte measure the length of the input in bytes, not
4427
+ ** characters, even for the UTF-16 interfaces.
4233
4428
  **
4234
4429
  ** ^If pzTail is not NULL then *pzTail is made to point to the first byte
4235
4430
  ** past the end of the first SQL statement in zSql. These routines only
@@ -4566,7 +4761,7 @@ typedef struct sqlite3_context sqlite3_context;
4566
4761
  ** METHOD: sqlite3_stmt
4567
4762
  **
4568
4763
  ** ^(In the SQL statement text input to [sqlite3_prepare_v2()] and its variants,
4569
- ** literals may be replaced by a [parameter] that matches one of following
4764
+ ** literals may be replaced by a [parameter] that matches one of the following
4570
4765
  ** templates:
4571
4766
  **
4572
4767
  ** <ul>
@@ -4611,7 +4806,7 @@ typedef struct sqlite3_context sqlite3_context;
4611
4806
  **
4612
4807
  ** [[byte-order determination rules]] ^The byte-order of
4613
4808
  ** UTF16 input text is determined by the byte-order mark (BOM, U+FEFF)
4614
- ** found in first character, which is removed, or in the absence of a BOM
4809
+ ** found in the first character, which is removed, or in the absence of a BOM
4615
4810
  ** the byte order is the native byte order of the host
4616
4811
  ** machine for sqlite3_bind_text16() or the byte order specified in
4617
4812
  ** the 6th parameter for sqlite3_bind_text64().)^
@@ -4631,7 +4826,7 @@ typedef struct sqlite3_context sqlite3_context;
4631
4826
  ** or sqlite3_bind_text16() or sqlite3_bind_text64() then
4632
4827
  ** that parameter must be the byte offset
4633
4828
  ** where the NUL terminator would occur assuming the string were NUL
4634
- ** terminated. If any NUL characters occurs at byte offsets less than
4829
+ ** terminated. If any NUL characters occur at byte offsets less than
4635
4830
  ** the value of the fourth parameter then the resulting string value will
4636
4831
  ** contain embedded NULs. The result of expressions involving strings
4637
4832
  ** with embedded NULs is undefined.
@@ -4843,7 +5038,7 @@ SQLITE_API const void *sqlite3_column_name16(sqlite3_stmt*, int N);
4843
5038
  ** METHOD: sqlite3_stmt
4844
5039
  **
4845
5040
  ** ^These routines provide a means to determine the database, table, and
4846
- ** table column that is the origin of a particular result column in
5041
+ ** table column that is the origin of a particular result column in a
4847
5042
  ** [SELECT] statement.
4848
5043
  ** ^The name of the database or table or column can be returned as
4849
5044
  ** either a UTF-8 or UTF-16 string. ^The _database_ routines return
@@ -4981,7 +5176,7 @@ SQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt*,int);
4981
5176
  ** other than [SQLITE_ROW] before any subsequent invocation of
4982
5177
  ** sqlite3_step(). Failure to reset the prepared statement using
4983
5178
  ** [sqlite3_reset()] would result in an [SQLITE_MISUSE] return from
4984
- ** sqlite3_step(). But after [version 3.6.23.1] ([dateof:3.6.23.1],
5179
+ ** sqlite3_step(). But after [version 3.6.23.1] ([dateof:3.6.23.1]),
4985
5180
  ** sqlite3_step() began
4986
5181
  ** calling [sqlite3_reset()] automatically in this circumstance rather
4987
5182
  ** than returning [SQLITE_MISUSE]. This is not considered a compatibility
@@ -5412,8 +5607,8 @@ SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt);
5412
5607
  **
5413
5608
  ** For best security, the [SQLITE_DIRECTONLY] flag is recommended for
5414
5609
  ** all application-defined SQL functions that do not need to be
5415
- ** used inside of triggers, view, CHECK constraints, or other elements of
5416
- ** the database schema. This flags is especially recommended for SQL
5610
+ ** used inside of triggers, views, CHECK constraints, or other elements of
5611
+ ** the database schema. This flag is especially recommended for SQL
5417
5612
  ** functions that have side effects or reveal internal application state.
5418
5613
  ** Without this flag, an attacker might be able to modify the schema of
5419
5614
  ** a database file to include invocations of the function with parameters
@@ -5444,7 +5639,7 @@ SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt);
5444
5639
  ** [user-defined window functions|available here].
5445
5640
  **
5446
5641
  ** ^(If the final parameter to sqlite3_create_function_v2() or
5447
- ** sqlite3_create_window_function() is not NULL, then it is destructor for
5642
+ ** sqlite3_create_window_function() is not NULL, then it is the destructor for
5448
5643
  ** the application data pointer. The destructor is invoked when the function
5449
5644
  ** is deleted, either by being overloaded or when the database connection
5450
5645
  ** closes.)^ ^The destructor is also invoked if the call to
@@ -5600,7 +5795,7 @@ SQLITE_API int sqlite3_create_window_function(
5600
5795
  ** This flag instructs SQLite to omit some corner-case optimizations that
5601
5796
  ** might disrupt the operation of the [sqlite3_value_subtype()] function,
5602
5797
  ** causing it to return zero rather than the correct subtype().
5603
- ** SQL functions that invokes [sqlite3_value_subtype()] should have this
5798
+ ** All SQL functions that invoke [sqlite3_value_subtype()] should have this
5604
5799
  ** property. If the SQLITE_SUBTYPE property is omitted, then the return
5605
5800
  ** value from [sqlite3_value_subtype()] might sometimes be zero even though
5606
5801
  ** a non-zero subtype was specified by the function argument expression.
@@ -5616,6 +5811,15 @@ SQLITE_API int sqlite3_create_window_function(
5616
5811
  ** [sqlite3_result_subtype()] should avoid setting this property, as the
5617
5812
  ** purpose of this property is to disable certain optimizations that are
5618
5813
  ** incompatible with subtypes.
5814
+ **
5815
+ ** [[SQLITE_SELFORDER1]] <dt>SQLITE_SELFORDER1</dt><dd>
5816
+ ** The SQLITE_SELFORDER1 flag indicates that the function is an aggregate
5817
+ ** that internally orders the values provided to the first argument. The
5818
+ ** ordered-set aggregate SQL notation with a single ORDER BY term can be
5819
+ ** used to invoke this function. If the ordered-set aggregate notation is
5820
+ ** used on a function that lacks this flag, then an error is raised. Note
5821
+ ** that the ordered-set aggregate syntax is only available if SQLite is
5822
+ ** built using the -DSQLITE_ENABLE_ORDERED_SET_AGGREGATES compile-time option.
5619
5823
  ** </dd>
5620
5824
  ** </dl>
5621
5825
  */
@@ -5624,6 +5828,7 @@ SQLITE_API int sqlite3_create_window_function(
5624
5828
  #define SQLITE_SUBTYPE 0x000100000
5625
5829
  #define SQLITE_INNOCUOUS 0x000200000
5626
5830
  #define SQLITE_RESULT_SUBTYPE 0x001000000
5831
+ #define SQLITE_SELFORDER1 0x002000000
5627
5832
 
5628
5833
  /*
5629
5834
  ** CAPI3REF: Deprecated Functions
@@ -5821,7 +6026,7 @@ SQLITE_API int sqlite3_value_encoding(sqlite3_value*);
5821
6026
  ** one SQL function to another. Use the [sqlite3_result_subtype()]
5822
6027
  ** routine to set the subtype for the return value of an SQL function.
5823
6028
  **
5824
- ** Every [application-defined SQL function] that invoke this interface
6029
+ ** Every [application-defined SQL function] that invokes this interface
5825
6030
  ** should include the [SQLITE_SUBTYPE] property in the text
5826
6031
  ** encoding argument when the function is [sqlite3_create_function|registered].
5827
6032
  ** If the [SQLITE_SUBTYPE] property is omitted, then sqlite3_value_subtype()
@@ -5834,7 +6039,7 @@ SQLITE_API unsigned int sqlite3_value_subtype(sqlite3_value*);
5834
6039
  ** METHOD: sqlite3_value
5835
6040
  **
5836
6041
  ** ^The sqlite3_value_dup(V) interface makes a copy of the [sqlite3_value]
5837
- ** object D and returns a pointer to that copy. ^The [sqlite3_value] returned
6042
+ ** object V and returns a pointer to that copy. ^The [sqlite3_value] returned
5838
6043
  ** is a [protected sqlite3_value] object even if the input is not.
5839
6044
  ** ^The sqlite3_value_dup(V) interface returns NULL if V is NULL or if a
5840
6045
  ** memory allocation fails. ^If V is a [pointer value], then the result
@@ -5872,7 +6077,7 @@ SQLITE_API void sqlite3_value_free(sqlite3_value*);
5872
6077
  ** allocation error occurs.
5873
6078
  **
5874
6079
  ** ^(The amount of space allocated by sqlite3_aggregate_context(C,N) is
5875
- ** determined by the N parameter on first successful call. Changing the
6080
+ ** determined by the N parameter on the first successful call. Changing the
5876
6081
  ** value of N in any subsequent call to sqlite3_aggregate_context() within
5877
6082
  ** the same aggregate function instance will not resize the memory
5878
6083
  ** allocation.)^ Within the xFinal callback, it is customary to set
@@ -6034,7 +6239,7 @@ SQLITE_API void sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(voi
6034
6239
  **
6035
6240
  ** Security Warning: These interfaces should not be exposed in scripting
6036
6241
  ** languages or in other circumstances where it might be possible for an
6037
- ** an attacker to invoke them. Any agent that can invoke these interfaces
6242
+ ** attacker to invoke them. Any agent that can invoke these interfaces
6038
6243
  ** can probably also take control of the process.
6039
6244
  **
6040
6245
  ** Database connection client data is only available for SQLite
@@ -6148,7 +6353,7 @@ typedef void (*sqlite3_destructor_type)(void*);
6148
6353
  ** pointed to by the 2nd parameter are taken as the application-defined
6149
6354
  ** function result. If the 3rd parameter is non-negative, then it
6150
6355
  ** must be the byte offset into the string where the NUL terminator would
6151
- ** appear if the string where NUL terminated. If any NUL characters occur
6356
+ ** appear if the string were NUL terminated. If any NUL characters occur
6152
6357
  ** in the string at a byte offset that is less than the value of the 3rd
6153
6358
  ** parameter, then the resulting string will contain embedded NULs and the
6154
6359
  ** result of expressions operating on strings with embedded NULs is undefined.
@@ -6206,7 +6411,7 @@ typedef void (*sqlite3_destructor_type)(void*);
6206
6411
  ** string and preferably a string literal. The sqlite3_result_pointer()
6207
6412
  ** routine is part of the [pointer passing interface] added for SQLite 3.20.0.
6208
6413
  **
6209
- ** If these routines are called from within the different thread
6414
+ ** If these routines are called from within a different thread
6210
6415
  ** than the one containing the application-defined function that received
6211
6416
  ** the [sqlite3_context] pointer, the results are undefined.
6212
6417
  */
@@ -6612,7 +6817,7 @@ SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*);
6612
6817
  ** METHOD: sqlite3
6613
6818
  **
6614
6819
  ** ^The sqlite3_db_name(D,N) interface returns a pointer to the schema name
6615
- ** for the N-th database on database connection D, or a NULL pointer of N is
6820
+ ** for the N-th database on database connection D, or a NULL pointer if N is
6616
6821
  ** out of range. An N value of 0 means the main database file. An N of 1 is
6617
6822
  ** the "temp" schema. Larger values of N correspond to various ATTACH-ed
6618
6823
  ** databases.
@@ -6707,7 +6912,7 @@ SQLITE_API int sqlite3_txn_state(sqlite3*,const char *zSchema);
6707
6912
  ** <dd>The SQLITE_TXN_READ state means that the database is currently
6708
6913
  ** in a read transaction. Content has been read from the database file
6709
6914
  ** but nothing in the database file has changed. The transaction state
6710
- ** will advanced to SQLITE_TXN_WRITE if any changes occur and there are
6915
+ ** will be advanced to SQLITE_TXN_WRITE if any changes occur and there are
6711
6916
  ** no other conflicting concurrent write transactions. The transaction
6712
6917
  ** state will revert to SQLITE_TXN_NONE following a [ROLLBACK] or
6713
6918
  ** [COMMIT].</dd>
@@ -6716,7 +6921,7 @@ SQLITE_API int sqlite3_txn_state(sqlite3*,const char *zSchema);
6716
6921
  ** <dd>The SQLITE_TXN_WRITE state means that the database is currently
6717
6922
  ** in a write transaction. Content has been written to the database file
6718
6923
  ** but has not yet committed. The transaction state will change to
6719
- ** to SQLITE_TXN_NONE at the next [ROLLBACK] or [COMMIT].</dd>
6924
+ ** SQLITE_TXN_NONE at the next [ROLLBACK] or [COMMIT].</dd>
6720
6925
  */
6721
6926
  #define SQLITE_TXN_NONE 0
6722
6927
  #define SQLITE_TXN_READ 1
@@ -6867,6 +7072,8 @@ SQLITE_API int sqlite3_autovacuum_pages(
6867
7072
  **
6868
7073
  ** ^The second argument is a pointer to the function to invoke when a
6869
7074
  ** row is updated, inserted or deleted in a rowid table.
7075
+ ** ^The update hook is disabled by invoking sqlite3_update_hook()
7076
+ ** with a NULL pointer as the second parameter.
6870
7077
  ** ^The first argument to the callback is a copy of the third argument
6871
7078
  ** to sqlite3_update_hook().
6872
7079
  ** ^The second callback argument is one of [SQLITE_INSERT], [SQLITE_DELETE],
@@ -6995,7 +7202,7 @@ SQLITE_API int sqlite3_db_release_memory(sqlite3*);
6995
7202
  ** CAPI3REF: Impose A Limit On Heap Size
6996
7203
  **
6997
7204
  ** These interfaces impose limits on the amount of heap memory that will be
6998
- ** by all database connections within a single process.
7205
+ ** used by all database connections within a single process.
6999
7206
  **
7000
7207
  ** ^The sqlite3_soft_heap_limit64() interface sets and/or queries the
7001
7208
  ** soft limit on the amount of heap memory that may be allocated by SQLite.
@@ -7053,7 +7260,7 @@ SQLITE_API int sqlite3_db_release_memory(sqlite3*);
7053
7260
  ** </ul>)^
7054
7261
  **
7055
7262
  ** The circumstances under which SQLite will enforce the heap limits may
7056
- ** changes in future releases of SQLite.
7263
+ ** change in future releases of SQLite.
7057
7264
  */
7058
7265
  SQLITE_API sqlite3_int64 sqlite3_soft_heap_limit64(sqlite3_int64 N);
7059
7266
  SQLITE_API sqlite3_int64 sqlite3_hard_heap_limit64(sqlite3_int64 N);
@@ -7168,8 +7375,8 @@ SQLITE_API int sqlite3_table_column_metadata(
7168
7375
  ** ^The entry point is zProc.
7169
7376
  ** ^(zProc may be 0, in which case SQLite will try to come up with an
7170
7377
  ** entry point name on its own. It first tries "sqlite3_extension_init".
7171
- ** If that does not work, it constructs a name "sqlite3_X_init" where the
7172
- ** X is consists of the lower-case equivalent of all ASCII alphabetic
7378
+ ** If that does not work, it constructs a name "sqlite3_X_init" where
7379
+ ** X consists of the lower-case equivalent of all ASCII alphabetic
7173
7380
  ** characters in the filename from the last "/" to the first following
7174
7381
  ** "." and omitting any initial "lib".)^
7175
7382
  ** ^The sqlite3_load_extension() interface returns
@@ -7240,7 +7447,7 @@ SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff);
7240
7447
  ** ^(Even though the function prototype shows that xEntryPoint() takes
7241
7448
  ** no arguments and returns void, SQLite invokes xEntryPoint() with three
7242
7449
  ** arguments and expects an integer result as if the signature of the
7243
- ** entry point where as follows:
7450
+ ** entry point were as follows:
7244
7451
  **
7245
7452
  ** <blockquote><pre>
7246
7453
  ** &nbsp; int xEntryPoint(
@@ -7404,7 +7611,7 @@ struct sqlite3_module {
7404
7611
  ** virtual table and might not be checked again by the byte code.)^ ^(The
7405
7612
  ** aConstraintUsage[].omit flag is an optimization hint. When the omit flag
7406
7613
  ** is left in its default setting of false, the constraint will always be
7407
- ** checked separately in byte code. If the omit flag is change to true, then
7614
+ ** checked separately in byte code. If the omit flag is changed to true, then
7408
7615
  ** the constraint may or may not be checked in byte code. In other words,
7409
7616
  ** when the omit flag is true there is no guarantee that the constraint will
7410
7617
  ** not be checked again using byte code.)^
@@ -7428,9 +7635,11 @@ struct sqlite3_module {
7428
7635
  ** will be returned by the strategy.
7429
7636
  **
7430
7637
  ** The xBestIndex method may optionally populate the idxFlags field with a
7431
- ** mask of SQLITE_INDEX_SCAN_* flags. Currently there is only one such flag -
7432
- ** SQLITE_INDEX_SCAN_UNIQUE. If the xBestIndex method sets this flag, SQLite
7433
- ** assumes that the strategy may visit at most one row.
7638
+ ** mask of SQLITE_INDEX_SCAN_* flags. One such flag is
7639
+ ** [SQLITE_INDEX_SCAN_HEX], which if set causes the [EXPLAIN QUERY PLAN]
7640
+ ** output to show the idxNum as hex instead of as decimal. Another flag is
7641
+ ** SQLITE_INDEX_SCAN_UNIQUE, which if set indicates that the query plan will
7642
+ ** return at most one row.
7434
7643
  **
7435
7644
  ** Additionally, if xBestIndex sets the SQLITE_INDEX_SCAN_UNIQUE flag, then
7436
7645
  ** SQLite also assumes that if a call to the xUpdate() method is made as
@@ -7494,7 +7703,9 @@ struct sqlite3_index_info {
7494
7703
  ** [sqlite3_index_info].idxFlags field to some combination of
7495
7704
  ** these bits.
7496
7705
  */
7497
- #define SQLITE_INDEX_SCAN_UNIQUE 1 /* Scan visits at most 1 row */
7706
+ #define SQLITE_INDEX_SCAN_UNIQUE 0x00000001 /* Scan visits at most 1 row */
7707
+ #define SQLITE_INDEX_SCAN_HEX 0x00000002 /* Display idxNum as hex */
7708
+ /* in EXPLAIN QUERY PLAN */
7498
7709
 
7499
7710
  /*
7500
7711
  ** CAPI3REF: Virtual Table Constraint Operator Codes
@@ -7567,7 +7778,7 @@ struct sqlite3_index_info {
7567
7778
  ** the implementation of the [virtual table module]. ^The fourth
7568
7779
  ** parameter is an arbitrary client data pointer that is passed through
7569
7780
  ** into the [xCreate] and [xConnect] methods of the virtual table module
7570
- ** when a new virtual table is be being created or reinitialized.
7781
+ ** when a new virtual table is being created or reinitialized.
7571
7782
  **
7572
7783
  ** ^The sqlite3_create_module_v2() interface has a fifth parameter which
7573
7784
  ** is a pointer to a destructor for the pClientData. ^SQLite will
@@ -7732,7 +7943,7 @@ typedef struct sqlite3_blob sqlite3_blob;
7732
7943
  ** in *ppBlob. Otherwise an [error code] is returned and, unless the error
7733
7944
  ** code is SQLITE_MISUSE, *ppBlob is set to NULL.)^ ^This means that, provided
7734
7945
  ** the API is not misused, it is always safe to call [sqlite3_blob_close()]
7735
- ** on *ppBlob after this function it returns.
7946
+ ** on *ppBlob after this function returns.
7736
7947
  **
7737
7948
  ** This function fails with SQLITE_ERROR if any of the following are true:
7738
7949
  ** <ul>
@@ -7852,7 +8063,7 @@ SQLITE_API int sqlite3_blob_close(sqlite3_blob *);
7852
8063
  **
7853
8064
  ** ^Returns the size in bytes of the BLOB accessible via the
7854
8065
  ** successfully opened [BLOB handle] in its only argument. ^The
7855
- ** incremental blob I/O routines can only read or overwriting existing
8066
+ ** incremental blob I/O routines can only read or overwrite existing
7856
8067
  ** blob content; they cannot change the size of a blob.
7857
8068
  **
7858
8069
  ** This routine only works on a [BLOB handle] which has been created
@@ -8002,7 +8213,7 @@ SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*);
8002
8213
  ** ^The sqlite3_mutex_alloc() routine allocates a new
8003
8214
  ** mutex and returns a pointer to it. ^The sqlite3_mutex_alloc()
8004
8215
  ** routine returns NULL if it is unable to allocate the requested
8005
- ** mutex. The argument to sqlite3_mutex_alloc() must one of these
8216
+ ** mutex. The argument to sqlite3_mutex_alloc() must be one of these
8006
8217
  ** integer constants:
8007
8218
  **
8008
8219
  ** <ul>
@@ -8235,7 +8446,7 @@ SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex*);
8235
8446
  ** CAPI3REF: Retrieve the mutex for a database connection
8236
8447
  ** METHOD: sqlite3
8237
8448
  **
8238
- ** ^This interface returns a pointer the [sqlite3_mutex] object that
8449
+ ** ^This interface returns a pointer to the [sqlite3_mutex] object that
8239
8450
  ** serializes access to the [database connection] given in the argument
8240
8451
  ** when the [threading mode] is Serialized.
8241
8452
  ** ^If the [threading mode] is Single-thread or Multi-thread then this
@@ -8331,6 +8542,7 @@ SQLITE_API int sqlite3_test_control(int op, ...);
8331
8542
  #define SQLITE_TESTCTRL_JSON_SELFCHECK 14
8332
8543
  #define SQLITE_TESTCTRL_OPTIMIZATIONS 15
8333
8544
  #define SQLITE_TESTCTRL_ISKEYWORD 16 /* NOT USED */
8545
+ #define SQLITE_TESTCTRL_GETOPT 16
8334
8546
  #define SQLITE_TESTCTRL_SCRATCHMALLOC 17 /* NOT USED */
8335
8547
  #define SQLITE_TESTCTRL_INTERNAL_FUNCTIONS 17
8336
8548
  #define SQLITE_TESTCTRL_LOCALTIME_FAULT 18
@@ -8350,14 +8562,14 @@ SQLITE_API int sqlite3_test_control(int op, ...);
8350
8562
  #define SQLITE_TESTCTRL_TRACEFLAGS 31
8351
8563
  #define SQLITE_TESTCTRL_TUNE 32
8352
8564
  #define SQLITE_TESTCTRL_LOGEST 33
8353
- #define SQLITE_TESTCTRL_USELONGDOUBLE 34
8565
+ #define SQLITE_TESTCTRL_USELONGDOUBLE 34 /* NOT USED */
8354
8566
  #define SQLITE_TESTCTRL_LAST 34 /* Largest TESTCTRL */
8355
8567
 
8356
8568
  /*
8357
8569
  ** CAPI3REF: SQL Keyword Checking
8358
8570
  **
8359
8571
  ** These routines provide access to the set of SQL language keywords
8360
- ** recognized by SQLite. Applications can uses these routines to determine
8572
+ ** recognized by SQLite. Applications can use these routines to determine
8361
8573
  ** whether or not a specific identifier needs to be escaped (for example,
8362
8574
  ** by enclosing in double-quotes) so as not to confuse the parser.
8363
8575
  **
@@ -8525,7 +8737,7 @@ SQLITE_API void sqlite3_str_reset(sqlite3_str*);
8525
8737
  ** content of the dynamic string under construction in X. The value
8526
8738
  ** returned by [sqlite3_str_value(X)] is managed by the sqlite3_str object X
8527
8739
  ** and might be freed or altered by any subsequent method on the same
8528
- ** [sqlite3_str] object. Applications must not used the pointer returned
8740
+ ** [sqlite3_str] object. Applications must not use the pointer returned by
8529
8741
  ** [sqlite3_str_value(X)] after any subsequent method call on the same
8530
8742
  ** object. ^Applications may change the content of the string returned
8531
8743
  ** by [sqlite3_str_value(X)] as long as they do not write into any bytes
@@ -8611,7 +8823,7 @@ SQLITE_API int sqlite3_status64(
8611
8823
  ** allocation which could not be satisfied by the [SQLITE_CONFIG_PAGECACHE]
8612
8824
  ** buffer and where forced to overflow to [sqlite3_malloc()]. The
8613
8825
  ** returned value includes allocations that overflowed because they
8614
- ** where too large (they were larger than the "sz" parameter to
8826
+ ** were too large (they were larger than the "sz" parameter to
8615
8827
  ** [SQLITE_CONFIG_PAGECACHE]) and allocations that overflowed because
8616
8828
  ** no space was left in the page cache.</dd>)^
8617
8829
  **
@@ -8695,28 +8907,29 @@ SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int r
8695
8907
  ** [[SQLITE_DBSTATUS_LOOKASIDE_HIT]] ^(<dt>SQLITE_DBSTATUS_LOOKASIDE_HIT</dt>
8696
8908
  ** <dd>This parameter returns the number of malloc attempts that were
8697
8909
  ** satisfied using lookaside memory. Only the high-water value is meaningful;
8698
- ** the current value is always zero.)^
8910
+ ** the current value is always zero.</dd>)^
8699
8911
  **
8700
8912
  ** [[SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE]]
8701
8913
  ** ^(<dt>SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE</dt>
8702
- ** <dd>This parameter returns the number malloc attempts that might have
8914
+ ** <dd>This parameter returns the number of malloc attempts that might have
8703
8915
  ** been satisfied using lookaside memory but failed due to the amount of
8704
8916
  ** memory requested being larger than the lookaside slot size.
8705
8917
  ** Only the high-water value is meaningful;
8706
- ** the current value is always zero.)^
8918
+ ** the current value is always zero.</dd>)^
8707
8919
  **
8708
8920
  ** [[SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL]]
8709
8921
  ** ^(<dt>SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL</dt>
8710
- ** <dd>This parameter returns the number malloc attempts that might have
8922
+ ** <dd>This parameter returns the number of malloc attempts that might have
8711
8923
  ** been satisfied using lookaside memory but failed due to all lookaside
8712
8924
  ** memory already being in use.
8713
8925
  ** Only the high-water value is meaningful;
8714
- ** the current value is always zero.)^
8926
+ ** the current value is always zero.</dd>)^
8715
8927
  **
8716
8928
  ** [[SQLITE_DBSTATUS_CACHE_USED]] ^(<dt>SQLITE_DBSTATUS_CACHE_USED</dt>
8717
8929
  ** <dd>This parameter returns the approximate number of bytes of heap
8718
8930
  ** memory used by all pager caches associated with the database connection.)^
8719
8931
  ** ^The highwater mark associated with SQLITE_DBSTATUS_CACHE_USED is always 0.
8932
+ ** </dd>
8720
8933
  **
8721
8934
  ** [[SQLITE_DBSTATUS_CACHE_USED_SHARED]]
8722
8935
  ** ^(<dt>SQLITE_DBSTATUS_CACHE_USED_SHARED</dt>
@@ -8725,10 +8938,10 @@ SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int r
8725
8938
  ** memory used by that pager cache is divided evenly between the attached
8726
8939
  ** connections.)^ In other words, if none of the pager caches associated
8727
8940
  ** with the database connection are shared, this request returns the same
8728
- ** value as DBSTATUS_CACHE_USED. Or, if one or more or the pager caches are
8941
+ ** value as DBSTATUS_CACHE_USED. Or, if one or more of the pager caches are
8729
8942
  ** shared, the value returned by this call will be smaller than that returned
8730
8943
  ** by DBSTATUS_CACHE_USED. ^The highwater mark associated with
8731
- ** SQLITE_DBSTATUS_CACHE_USED_SHARED is always 0.
8944
+ ** SQLITE_DBSTATUS_CACHE_USED_SHARED is always 0.</dd>
8732
8945
  **
8733
8946
  ** [[SQLITE_DBSTATUS_SCHEMA_USED]] ^(<dt>SQLITE_DBSTATUS_SCHEMA_USED</dt>
8734
8947
  ** <dd>This parameter returns the approximate number of bytes of heap
@@ -8738,6 +8951,7 @@ SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int r
8738
8951
  ** schema memory is shared with other database connections due to
8739
8952
  ** [shared cache mode] being enabled.
8740
8953
  ** ^The highwater mark associated with SQLITE_DBSTATUS_SCHEMA_USED is always 0.
8954
+ ** </dd>
8741
8955
  **
8742
8956
  ** [[SQLITE_DBSTATUS_STMT_USED]] ^(<dt>SQLITE_DBSTATUS_STMT_USED</dt>
8743
8957
  ** <dd>This parameter returns the approximate number of bytes of heap
@@ -8774,7 +8988,7 @@ SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int r
8774
8988
  ** been written to disk in the middle of a transaction due to the page
8775
8989
  ** cache overflowing. Transactions are more efficient if they are written
8776
8990
  ** to disk all at once. When pages spill mid-transaction, that introduces
8777
- ** additional overhead. This parameter can be used help identify
8991
+ ** additional overhead. This parameter can be used to help identify
8778
8992
  ** inefficiencies that can be resolved by increasing the cache size.
8779
8993
  ** </dd>
8780
8994
  **
@@ -8845,13 +9059,13 @@ SQLITE_API int sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg);
8845
9059
  ** [[SQLITE_STMTSTATUS_SORT]] <dt>SQLITE_STMTSTATUS_SORT</dt>
8846
9060
  ** <dd>^This is the number of sort operations that have occurred.
8847
9061
  ** A non-zero value in this counter may indicate an opportunity to
8848
- ** improvement performance through careful use of indices.</dd>
9062
+ ** improve performance through careful use of indices.</dd>
8849
9063
  **
8850
9064
  ** [[SQLITE_STMTSTATUS_AUTOINDEX]] <dt>SQLITE_STMTSTATUS_AUTOINDEX</dt>
8851
9065
  ** <dd>^This is the number of rows inserted into transient indices that
8852
9066
  ** were created automatically in order to help joins run faster.
8853
9067
  ** A non-zero value in this counter may indicate an opportunity to
8854
- ** improvement performance by adding permanent indices that do not
9068
+ ** improve performance by adding permanent indices that do not
8855
9069
  ** need to be reinitialized each time the statement is run.</dd>
8856
9070
  **
8857
9071
  ** [[SQLITE_STMTSTATUS_VM_STEP]] <dt>SQLITE_STMTSTATUS_VM_STEP</dt>
@@ -8860,19 +9074,19 @@ SQLITE_API int sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg);
8860
9074
  ** to 2147483647. The number of virtual machine operations can be
8861
9075
  ** used as a proxy for the total work done by the prepared statement.
8862
9076
  ** If the number of virtual machine operations exceeds 2147483647
8863
- ** then the value returned by this statement status code is undefined.
9077
+ ** then the value returned by this statement status code is undefined.</dd>
8864
9078
  **
8865
9079
  ** [[SQLITE_STMTSTATUS_REPREPARE]] <dt>SQLITE_STMTSTATUS_REPREPARE</dt>
8866
9080
  ** <dd>^This is the number of times that the prepare statement has been
8867
9081
  ** automatically regenerated due to schema changes or changes to
8868
- ** [bound parameters] that might affect the query plan.
9082
+ ** [bound parameters] that might affect the query plan.</dd>
8869
9083
  **
8870
9084
  ** [[SQLITE_STMTSTATUS_RUN]] <dt>SQLITE_STMTSTATUS_RUN</dt>
8871
9085
  ** <dd>^This is the number of times that the prepared statement has
8872
9086
  ** been run. A single "run" for the purposes of this counter is one
8873
9087
  ** or more calls to [sqlite3_step()] followed by a call to [sqlite3_reset()].
8874
9088
  ** The counter is incremented on the first [sqlite3_step()] call of each
8875
- ** cycle.
9089
+ ** cycle.</dd>
8876
9090
  **
8877
9091
  ** [[SQLITE_STMTSTATUS_FILTER_MISS]]
8878
9092
  ** [[SQLITE_STMTSTATUS_FILTER HIT]]
@@ -8882,7 +9096,7 @@ SQLITE_API int sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg);
8882
9096
  ** step was bypassed because a Bloom filter returned not-found. The
8883
9097
  ** corresponding SQLITE_STMTSTATUS_FILTER_MISS value is the number of
8884
9098
  ** times that the Bloom filter returned a find, and thus the join step
8885
- ** had to be processed as normal.
9099
+ ** had to be processed as normal.</dd>
8886
9100
  **
8887
9101
  ** [[SQLITE_STMTSTATUS_MEMUSED]] <dt>SQLITE_STMTSTATUS_MEMUSED</dt>
8888
9102
  ** <dd>^This is the approximate number of bytes of heap memory
@@ -8987,9 +9201,9 @@ struct sqlite3_pcache_page {
8987
9201
  ** SQLite will typically create one cache instance for each open database file,
8988
9202
  ** though this is not guaranteed. ^The
8989
9203
  ** first parameter, szPage, is the size in bytes of the pages that must
8990
- ** be allocated by the cache. ^szPage will always a power of two. ^The
9204
+ ** be allocated by the cache. ^szPage will always be a power of two. ^The
8991
9205
  ** second parameter szExtra is a number of bytes of extra storage
8992
- ** associated with each page cache entry. ^The szExtra parameter will
9206
+ ** associated with each page cache entry. ^The szExtra parameter will be
8993
9207
  ** a number less than 250. SQLite will use the
8994
9208
  ** extra szExtra bytes on each page to store metadata about the underlying
8995
9209
  ** database page on disk. The value passed into szExtra depends
@@ -8997,17 +9211,17 @@ struct sqlite3_pcache_page {
8997
9211
  ** ^The third argument to xCreate(), bPurgeable, is true if the cache being
8998
9212
  ** created will be used to cache database pages of a file stored on disk, or
8999
9213
  ** false if it is used for an in-memory database. The cache implementation
9000
- ** does not have to do anything special based with the value of bPurgeable;
9214
+ ** does not have to do anything special based upon the value of bPurgeable;
9001
9215
  ** it is purely advisory. ^On a cache where bPurgeable is false, SQLite will
9002
9216
  ** never invoke xUnpin() except to deliberately delete a page.
9003
9217
  ** ^In other words, calls to xUnpin() on a cache with bPurgeable set to
9004
9218
  ** false will always have the "discard" flag set to true.
9005
- ** ^Hence, a cache created with bPurgeable false will
9219
+ ** ^Hence, a cache created with bPurgeable set to false will
9006
9220
  ** never contain any unpinned pages.
9007
9221
  **
9008
9222
  ** [[the xCachesize() page cache method]]
9009
9223
  ** ^(The xCachesize() method may be called at any time by SQLite to set the
9010
- ** suggested maximum cache-size (number of pages stored by) the cache
9224
+ ** suggested maximum cache-size (number of pages stored) for the cache
9011
9225
  ** instance passed as the first argument. This is the value configured using
9012
9226
  ** the SQLite "[PRAGMA cache_size]" command.)^ As with the bPurgeable
9013
9227
  ** parameter, the implementation is not required to do anything with this
@@ -9034,12 +9248,12 @@ struct sqlite3_pcache_page {
9034
9248
  ** implementation must return a pointer to the page buffer with its content
9035
9249
  ** intact. If the requested page is not already in the cache, then the
9036
9250
  ** cache implementation should use the value of the createFlag
9037
- ** parameter to help it determined what action to take:
9251
+ ** parameter to help it determine what action to take:
9038
9252
  **
9039
9253
  ** <table border=1 width=85% align=center>
9040
9254
  ** <tr><th> createFlag <th> Behavior when page is not already in cache
9041
9255
  ** <tr><td> 0 <td> Do not allocate a new page. Return NULL.
9042
- ** <tr><td> 1 <td> Allocate a new page if it easy and convenient to do so.
9256
+ ** <tr><td> 1 <td> Allocate a new page if it is easy and convenient to do so.
9043
9257
  ** Otherwise return NULL.
9044
9258
  ** <tr><td> 2 <td> Make every effort to allocate a new page. Only return
9045
9259
  ** NULL if allocating a new page is effectively impossible.
@@ -9056,7 +9270,7 @@ struct sqlite3_pcache_page {
9056
9270
  ** as its second argument. If the third parameter, discard, is non-zero,
9057
9271
  ** then the page must be evicted from the cache.
9058
9272
  ** ^If the discard parameter is
9059
- ** zero, then the page may be discarded or retained at the discretion of
9273
+ ** zero, then the page may be discarded or retained at the discretion of the
9060
9274
  ** page cache implementation. ^The page cache implementation
9061
9275
  ** may choose to evict unpinned pages at any time.
9062
9276
  **
@@ -9074,7 +9288,7 @@ struct sqlite3_pcache_page {
9074
9288
  ** When SQLite calls the xTruncate() method, the cache must discard all
9075
9289
  ** existing cache entries with page numbers (keys) greater than or equal
9076
9290
  ** to the value of the iLimit parameter passed to xTruncate(). If any
9077
- ** of these pages are pinned, they are implicitly unpinned, meaning that
9291
+ ** of these pages are pinned, they become implicitly unpinned, meaning that
9078
9292
  ** they can be safely discarded.
9079
9293
  **
9080
9294
  ** [[the xDestroy() page cache method]]
@@ -9254,7 +9468,7 @@ typedef struct sqlite3_backup sqlite3_backup;
9254
9468
  ** external process or via a database connection other than the one being
9255
9469
  ** used by the backup operation, then the backup will be automatically
9256
9470
  ** restarted by the next call to sqlite3_backup_step(). ^If the source
9257
- ** database is modified by the using the same database connection as is used
9471
+ ** database is modified by using the same database connection as is used
9258
9472
  ** by the backup operation, then the backup database is automatically
9259
9473
  ** updated at the same time.
9260
9474
  **
@@ -9271,7 +9485,7 @@ typedef struct sqlite3_backup sqlite3_backup;
9271
9485
  ** and may not be used following a call to sqlite3_backup_finish().
9272
9486
  **
9273
9487
  ** ^The value returned by sqlite3_backup_finish is [SQLITE_OK] if no
9274
- ** sqlite3_backup_step() errors occurred, regardless or whether or not
9488
+ ** sqlite3_backup_step() errors occurred, regardless of whether or not
9275
9489
  ** sqlite3_backup_step() completed.
9276
9490
  ** ^If an out-of-memory condition or IO error occurred during any prior
9277
9491
  ** sqlite3_backup_step() call on the same [sqlite3_backup] object, then
@@ -9326,6 +9540,16 @@ typedef struct sqlite3_backup sqlite3_backup;
9326
9540
  ** APIs are not strictly speaking threadsafe. If they are invoked at the
9327
9541
  ** same time as another thread is invoking sqlite3_backup_step() it is
9328
9542
  ** possible that they return invalid values.
9543
+ **
9544
+ ** <b>Alternatives To Using The Backup API</b>
9545
+ **
9546
+ ** Other techniques for safely creating a consistent backup of an SQLite
9547
+ ** database include:
9548
+ **
9549
+ ** <ul>
9550
+ ** <li> The [VACUUM INTO] command.
9551
+ ** <li> The [sqlite3_rsync] utility program.
9552
+ ** </ul>
9329
9553
  */
9330
9554
  SQLITE_API sqlite3_backup *sqlite3_backup_init(
9331
9555
  sqlite3 *pDest, /* Destination database handle */
@@ -9363,7 +9587,7 @@ SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p);
9363
9587
  ** application receives an SQLITE_LOCKED error, it may call the
9364
9588
  ** sqlite3_unlock_notify() method with the blocked connection handle as
9365
9589
  ** the first argument to register for a callback that will be invoked
9366
- ** when the blocking connections current transaction is concluded. ^The
9590
+ ** when the blocking connection's current transaction is concluded. ^The
9367
9591
  ** callback is invoked from within the [sqlite3_step] or [sqlite3_close]
9368
9592
  ** call that concludes the blocking connection's transaction.
9369
9593
  **
@@ -9383,7 +9607,7 @@ SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p);
9383
9607
  ** blocked connection already has a registered unlock-notify callback,
9384
9608
  ** then the new callback replaces the old.)^ ^If sqlite3_unlock_notify() is
9385
9609
  ** called with a NULL pointer as its second argument, then any existing
9386
- ** unlock-notify callback is canceled. ^The blocked connections
9610
+ ** unlock-notify callback is canceled. ^The blocked connection's
9387
9611
  ** unlock-notify callback may also be canceled by closing the blocked
9388
9612
  ** connection using [sqlite3_close()].
9389
9613
  **
@@ -9781,7 +10005,7 @@ SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, ...);
9781
10005
  ** support constraints. In this configuration (which is the default) if
9782
10006
  ** a call to the [xUpdate] method returns [SQLITE_CONSTRAINT], then the entire
9783
10007
  ** statement is rolled back as if [ON CONFLICT | OR ABORT] had been
9784
- ** specified as part of the users SQL statement, regardless of the actual
10008
+ ** specified as part of the user's SQL statement, regardless of the actual
9785
10009
  ** ON CONFLICT mode specified.
9786
10010
  **
9787
10011
  ** If X is non-zero, then the virtual table implementation guarantees
@@ -9815,7 +10039,7 @@ SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, ...);
9815
10039
  ** [[SQLITE_VTAB_INNOCUOUS]]<dt>SQLITE_VTAB_INNOCUOUS</dt>
9816
10040
  ** <dd>Calls of the form
9817
10041
  ** [sqlite3_vtab_config](db,SQLITE_VTAB_INNOCUOUS) from within the
9818
- ** the [xConnect] or [xCreate] methods of a [virtual table] implementation
10042
+ ** [xConnect] or [xCreate] methods of a [virtual table] implementation
9819
10043
  ** identify that virtual table as being safe to use from within triggers
9820
10044
  ** and views. Conceptually, the SQLITE_VTAB_INNOCUOUS tag means that the
9821
10045
  ** virtual table can do no serious harm even if it is controlled by a
@@ -9983,7 +10207,7 @@ SQLITE_API const char *sqlite3_vtab_collation(sqlite3_index_info*,int);
9983
10207
  ** </table>
9984
10208
  **
9985
10209
  ** ^For the purposes of comparing virtual table output values to see if the
9986
- ** values are same value for sorting purposes, two NULL values are considered
10210
+ ** values are the same value for sorting purposes, two NULL values are considered
9987
10211
  ** to be the same. In other words, the comparison operator is "IS"
9988
10212
  ** (or "IS NOT DISTINCT FROM") and not "==".
9989
10213
  **
@@ -9993,7 +10217,7 @@ SQLITE_API const char *sqlite3_vtab_collation(sqlite3_index_info*,int);
9993
10217
  **
9994
10218
  ** ^A virtual table implementation is always free to return rows in any order
9995
10219
  ** it wants, as long as the "orderByConsumed" flag is not set. ^When the
9996
- ** the "orderByConsumed" flag is unset, the query planner will add extra
10220
+ ** "orderByConsumed" flag is unset, the query planner will add extra
9997
10221
  ** [bytecode] to ensure that the final results returned by the SQL query are
9998
10222
  ** ordered correctly. The use of the "orderByConsumed" flag and the
9999
10223
  ** sqlite3_vtab_distinct() interface is merely an optimization. ^Careful
@@ -10090,7 +10314,7 @@ SQLITE_API int sqlite3_vtab_in(sqlite3_index_info*, int iCons, int bHandle);
10090
10314
  ** sqlite3_vtab_in_next(X,P) should be one of the parameters to the
10091
10315
  ** xFilter method which invokes these routines, and specifically
10092
10316
  ** a parameter that was previously selected for all-at-once IN constraint
10093
- ** processing use the [sqlite3_vtab_in()] interface in the
10317
+ ** processing using the [sqlite3_vtab_in()] interface in the
10094
10318
  ** [xBestIndex|xBestIndex method]. ^(If the X parameter is not
10095
10319
  ** an xFilter argument that was selected for all-at-once IN constraint
10096
10320
  ** processing, then these routines return [SQLITE_ERROR].)^
@@ -10145,7 +10369,7 @@ SQLITE_API int sqlite3_vtab_in_next(sqlite3_value *pVal, sqlite3_value **ppOut);
10145
10369
  ** and only if *V is set to a value. ^The sqlite3_vtab_rhs_value(P,J,V)
10146
10370
  ** inteface returns SQLITE_NOTFOUND if the right-hand side of the J-th
10147
10371
  ** constraint is not available. ^The sqlite3_vtab_rhs_value() interface
10148
- ** can return an result code other than SQLITE_OK or SQLITE_NOTFOUND if
10372
+ ** can return a result code other than SQLITE_OK or SQLITE_NOTFOUND if
10149
10373
  ** something goes wrong.
10150
10374
  **
10151
10375
  ** The sqlite3_vtab_rhs_value() interface is usually only successful if
@@ -10173,8 +10397,8 @@ SQLITE_API int sqlite3_vtab_rhs_value(sqlite3_index_info*, int, sqlite3_value **
10173
10397
  ** KEYWORDS: {conflict resolution mode}
10174
10398
  **
10175
10399
  ** These constants are returned by [sqlite3_vtab_on_conflict()] to
10176
- ** inform a [virtual table] implementation what the [ON CONFLICT] mode
10177
- ** is for the SQL statement being evaluated.
10400
+ ** inform a [virtual table] implementation of the [ON CONFLICT] mode
10401
+ ** for the SQL statement being evaluated.
10178
10402
  **
10179
10403
  ** Note that the [SQLITE_IGNORE] constant is also used as a potential
10180
10404
  ** return value from the [sqlite3_set_authorizer()] callback and that
@@ -10214,39 +10438,39 @@ SQLITE_API int sqlite3_vtab_rhs_value(sqlite3_index_info*, int, sqlite3_value **
10214
10438
  ** [[SQLITE_SCANSTAT_EST]] <dt>SQLITE_SCANSTAT_EST</dt>
10215
10439
  ** <dd>^The "double" variable pointed to by the V parameter will be set to the
10216
10440
  ** query planner's estimate for the average number of rows output from each
10217
- ** iteration of the X-th loop. If the query planner's estimates was accurate,
10441
+ ** iteration of the X-th loop. If the query planner's estimate was accurate,
10218
10442
  ** then this value will approximate the quotient NVISIT/NLOOP and the
10219
10443
  ** product of this value for all prior loops with the same SELECTID will
10220
- ** be the NLOOP value for the current loop.
10444
+ ** be the NLOOP value for the current loop.</dd>
10221
10445
  **
10222
10446
  ** [[SQLITE_SCANSTAT_NAME]] <dt>SQLITE_SCANSTAT_NAME</dt>
10223
10447
  ** <dd>^The "const char *" variable pointed to by the V parameter will be set
10224
10448
  ** to a zero-terminated UTF-8 string containing the name of the index or table
10225
- ** used for the X-th loop.
10449
+ ** used for the X-th loop.</dd>
10226
10450
  **
10227
10451
  ** [[SQLITE_SCANSTAT_EXPLAIN]] <dt>SQLITE_SCANSTAT_EXPLAIN</dt>
10228
10452
  ** <dd>^The "const char *" variable pointed to by the V parameter will be set
10229
10453
  ** to a zero-terminated UTF-8 string containing the [EXPLAIN QUERY PLAN]
10230
- ** description for the X-th loop.
10454
+ ** description for the X-th loop.</dd>
10231
10455
  **
10232
10456
  ** [[SQLITE_SCANSTAT_SELECTID]] <dt>SQLITE_SCANSTAT_SELECTID</dt>
10233
10457
  ** <dd>^The "int" variable pointed to by the V parameter will be set to the
10234
10458
  ** id for the X-th query plan element. The id value is unique within the
10235
10459
  ** statement. The select-id is the same value as is output in the first
10236
- ** column of an [EXPLAIN QUERY PLAN] query.
10460
+ ** column of an [EXPLAIN QUERY PLAN] query.</dd>
10237
10461
  **
10238
10462
  ** [[SQLITE_SCANSTAT_PARENTID]] <dt>SQLITE_SCANSTAT_PARENTID</dt>
10239
10463
  ** <dd>The "int" variable pointed to by the V parameter will be set to the
10240
- ** the id of the parent of the current query element, if applicable, or
10464
+ ** id of the parent of the current query element, if applicable, or
10241
10465
  ** to zero if the query element has no parent. This is the same value as
10242
- ** returned in the second column of an [EXPLAIN QUERY PLAN] query.
10466
+ ** returned in the second column of an [EXPLAIN QUERY PLAN] query.</dd>
10243
10467
  **
10244
10468
  ** [[SQLITE_SCANSTAT_NCYCLE]] <dt>SQLITE_SCANSTAT_NCYCLE</dt>
10245
10469
  ** <dd>The sqlite3_int64 output value is set to the number of cycles,
10246
10470
  ** according to the processor time-stamp counter, that elapsed while the
10247
10471
  ** query element was being processed. This value is not available for
10248
10472
  ** all query elements - if it is unavailable the output variable is
10249
- ** set to -1.
10473
+ ** set to -1.</dd>
10250
10474
  ** </dl>
10251
10475
  */
10252
10476
  #define SQLITE_SCANSTAT_NLOOP 0
@@ -10287,8 +10511,8 @@ SQLITE_API int sqlite3_vtab_rhs_value(sqlite3_index_info*, int, sqlite3_value **
10287
10511
  ** sqlite3_stmt_scanstatus_v2() with a zeroed flags parameter.
10288
10512
  **
10289
10513
  ** Parameter "idx" identifies the specific query element to retrieve statistics
10290
- ** for. Query elements are numbered starting from zero. A value of -1 may be
10291
- ** to query for statistics regarding the entire query. ^If idx is out of range
10514
+ ** for. Query elements are numbered starting from zero. A value of -1 may
10515
+ ** retrieve statistics for the entire query. ^If idx is out of range
10292
10516
  ** - less than -1 or greater than or equal to the total number of query
10293
10517
  ** elements used to implement the statement - a non-zero value is returned and
10294
10518
  ** the variable that pOut points to is unchanged.
@@ -10331,7 +10555,7 @@ SQLITE_API void sqlite3_stmt_scanstatus_reset(sqlite3_stmt*);
10331
10555
  ** METHOD: sqlite3
10332
10556
  **
10333
10557
  ** ^If a write-transaction is open on [database connection] D when the
10334
- ** [sqlite3_db_cacheflush(D)] interface invoked, any dirty
10558
+ ** [sqlite3_db_cacheflush(D)] interface is invoked, any dirty
10335
10559
  ** pages in the pager-cache that are not currently in use are written out
10336
10560
  ** to disk. A dirty page may be in use if a database cursor created by an
10337
10561
  ** active SQL statement is reading from it, or if it is page 1 of a database
@@ -10445,8 +10669,8 @@ SQLITE_API int sqlite3_db_cacheflush(sqlite3*);
10445
10669
  ** triggers; and so forth.
10446
10670
  **
10447
10671
  ** When the [sqlite3_blob_write()] API is used to update a blob column,
10448
- ** the pre-update hook is invoked with SQLITE_DELETE. This is because the
10449
- ** in this case the new values are not available. In this case, when a
10672
+ ** the pre-update hook is invoked with SQLITE_DELETE, because
10673
+ ** the new values are not yet available. In this case, when a
10450
10674
  ** callback made with op==SQLITE_DELETE is actually a write using the
10451
10675
  ** sqlite3_blob_write() API, the [sqlite3_preupdate_blobwrite()] returns
10452
10676
  ** the index of the column being written. In other cases, where the
@@ -10525,6 +10749,14 @@ typedef struct sqlite3_snapshot {
10525
10749
  ** If there is not already a read-transaction open on schema S when
10526
10750
  ** this function is called, one is opened automatically.
10527
10751
  **
10752
+ ** If a read-transaction is opened by this function, then it is guaranteed
10753
+ ** that the returned snapshot object may not be invalidated by a database
10754
+ ** writer or checkpointer until after the read-transaction is closed. This
10755
+ ** is not guaranteed if a read-transaction is already open when this
10756
+ ** function is called. In that case, any subsequent write or checkpoint
10757
+ ** operation on the database may invalidate the returned snapshot handle,
10758
+ ** even while the read-transaction remains open.
10759
+ **
10528
10760
  ** The following must be true for this function to succeed. If any of
10529
10761
  ** the following statements are false when sqlite3_snapshot_get() is
10530
10762
  ** called, SQLITE_ERROR is returned. The final value of *P is undefined
@@ -10682,15 +10914,16 @@ SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_recover(sqlite3 *db, const c
10682
10914
  /*
10683
10915
  ** CAPI3REF: Serialize a database
10684
10916
  **
10685
- ** The sqlite3_serialize(D,S,P,F) interface returns a pointer to memory
10686
- ** that is a serialization of the S database on [database connection] D.
10917
+ ** The sqlite3_serialize(D,S,P,F) interface returns a pointer to
10918
+ ** memory that is a serialization of the S database on
10919
+ ** [database connection] D. If S is a NULL pointer, the main database is used.
10687
10920
  ** If P is not a NULL pointer, then the size of the database in bytes
10688
10921
  ** is written into *P.
10689
10922
  **
10690
10923
  ** For an ordinary on-disk database file, the serialization is just a
10691
10924
  ** copy of the disk file. For an in-memory database or a "TEMP" database,
10692
10925
  ** the serialization is the same sequence of bytes which would be written
10693
- ** to disk if that database where backed up to disk.
10926
+ ** to disk if that database were backed up to disk.
10694
10927
  **
10695
10928
  ** The usual case is that sqlite3_serialize() copies the serialization of
10696
10929
  ** the database into memory obtained from [sqlite3_malloc64()] and returns
@@ -10699,7 +10932,7 @@ SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_recover(sqlite3 *db, const c
10699
10932
  ** contains the SQLITE_SERIALIZE_NOCOPY bit, then no memory allocations
10700
10933
  ** are made, and the sqlite3_serialize() function will return a pointer
10701
10934
  ** to the contiguous memory representation of the database that SQLite
10702
- ** is currently using for that database, or NULL if the no such contiguous
10935
+ ** is currently using for that database, or NULL if no such contiguous
10703
10936
  ** memory representation of the database exists. A contiguous memory
10704
10937
  ** representation of the database will usually only exist if there has
10705
10938
  ** been a prior call to [sqlite3_deserialize(D,S,...)] with the same
@@ -10770,7 +11003,7 @@ SQLITE_API unsigned char *sqlite3_serialize(
10770
11003
  ** database is currently in a read transaction or is involved in a backup
10771
11004
  ** operation.
10772
11005
  **
10773
- ** It is not possible to deserialized into the TEMP database. If the
11006
+ ** It is not possible to deserialize into the TEMP database. If the
10774
11007
  ** S argument to sqlite3_deserialize(D,S,P,N,M,F) is "temp" then the
10775
11008
  ** function returns SQLITE_ERROR.
10776
11009
  **
@@ -10792,7 +11025,7 @@ SQLITE_API int sqlite3_deserialize(
10792
11025
  sqlite3 *db, /* The database connection */
10793
11026
  const char *zSchema, /* Which DB to reopen with the deserialization */
10794
11027
  unsigned char *pData, /* The serialized database content */
10795
- sqlite3_int64 szDb, /* Number bytes in the deserialization */
11028
+ sqlite3_int64 szDb, /* Number of bytes in the deserialization */
10796
11029
  sqlite3_int64 szBuf, /* Total size of buffer pData[] */
10797
11030
  unsigned mFlags /* Zero or more SQLITE_DESERIALIZE_* flags */
10798
11031
  );
@@ -10800,7 +11033,7 @@ SQLITE_API int sqlite3_deserialize(
10800
11033
  /*
10801
11034
  ** CAPI3REF: Flags for sqlite3_deserialize()
10802
11035
  **
10803
- ** The following are allowed values for 6th argument (the F argument) to
11036
+ ** The following are allowed values for the 6th argument (the F argument) to
10804
11037
  ** the [sqlite3_deserialize(D,S,P,N,M,F)] interface.
10805
11038
  **
10806
11039
  ** The SQLITE_DESERIALIZE_FREEONCLOSE means that the database serialization
@@ -10833,8 +11066,6 @@ SQLITE_API int sqlite3_deserialize(
10833
11066
  #if defined(__wasi__)
10834
11067
  # undef SQLITE_WASI
10835
11068
  # define SQLITE_WASI 1
10836
- # undef SQLITE_OMIT_WAL
10837
- # define SQLITE_OMIT_WAL 1/* because it requires shared memory APIs */
10838
11069
  # ifndef SQLITE_OMIT_LOAD_EXTENSION
10839
11070
  # define SQLITE_OMIT_LOAD_EXTENSION
10840
11071
  # endif
@@ -10846,7 +11077,7 @@ SQLITE_API int sqlite3_deserialize(
10846
11077
  #ifdef __cplusplus
10847
11078
  } /* End of the 'extern "C"' block */
10848
11079
  #endif
10849
- #endif /* SQLITE3_H */
11080
+ /* #endif for SQLITE3_H will be added by mksqlite3.tcl */
10850
11081
 
10851
11082
  /******** Begin file sqlite3rtree.h *********/
10852
11083
  /*
@@ -11327,9 +11558,10 @@ SQLITE_API void sqlite3session_table_filter(
11327
11558
  ** is inserted while a session object is enabled, then later deleted while
11328
11559
  ** the same session object is disabled, no INSERT record will appear in the
11329
11560
  ** changeset, even though the delete took place while the session was disabled.
11330
- ** Or, if one field of a row is updated while a session is disabled, and
11331
- ** another field of the same row is updated while the session is enabled, the
11332
- ** resulting changeset will contain an UPDATE change that updates both fields.
11561
+ ** Or, if one field of a row is updated while a session is enabled, and
11562
+ ** then another field of the same row is updated while the session is disabled,
11563
+ ** the resulting changeset will contain an UPDATE change that updates both
11564
+ ** fields.
11333
11565
  */
11334
11566
  SQLITE_API int sqlite3session_changeset(
11335
11567
  sqlite3_session *pSession, /* Session object */
@@ -11401,8 +11633,9 @@ SQLITE_API sqlite3_int64 sqlite3session_changeset_size(sqlite3_session *pSession
11401
11633
  ** database zFrom the contents of the two compatible tables would be
11402
11634
  ** identical.
11403
11635
  **
11404
- ** It an error if database zFrom does not exist or does not contain the
11405
- ** required compatible table.
11636
+ ** Unless the call to this function is a no-op as described above, it is an
11637
+ ** error if database zFrom does not exist or does not contain the required
11638
+ ** compatible table.
11406
11639
  **
11407
11640
  ** If the operation is successful, SQLITE_OK is returned. Otherwise, an SQLite
11408
11641
  ** error code. In this case, if argument pzErrMsg is not NULL, *pzErrMsg
@@ -11537,7 +11770,7 @@ SQLITE_API int sqlite3changeset_start_v2(
11537
11770
  ** The following flags may passed via the 4th parameter to
11538
11771
  ** [sqlite3changeset_start_v2] and [sqlite3changeset_start_v2_strm]:
11539
11772
  **
11540
- ** <dt>SQLITE_CHANGESETAPPLY_INVERT <dd>
11773
+ ** <dt>SQLITE_CHANGESETSTART_INVERT <dd>
11541
11774
  ** Invert the changeset while iterating through it. This is equivalent to
11542
11775
  ** inverting a changeset using sqlite3changeset_invert() before applying it.
11543
11776
  ** It is an error to specify this flag with a patchset.
@@ -11852,19 +12085,6 @@ SQLITE_API int sqlite3changeset_concat(
11852
12085
  void **ppOut /* OUT: Buffer containing output changeset */
11853
12086
  );
11854
12087
 
11855
-
11856
- /*
11857
- ** CAPI3REF: Upgrade the Schema of a Changeset/Patchset
11858
- */
11859
- SQLITE_API int sqlite3changeset_upgrade(
11860
- sqlite3 *db,
11861
- const char *zDb,
11862
- int nIn, const void *pIn, /* Input changeset */
11863
- int *pnOut, void **ppOut /* OUT: Inverse of input */
11864
- );
11865
-
11866
-
11867
-
11868
12088
  /*
11869
12089
  ** CAPI3REF: Changegroup Handle
11870
12090
  **
@@ -13037,6 +13257,10 @@ struct Fts5PhraseIter {
13037
13257
  ** (i.e. if it is a contentless table), then this API always iterates
13038
13258
  ** through an empty set (all calls to xPhraseFirst() set iCol to -1).
13039
13259
  **
13260
+ ** In all cases, matches are visited in (column ASC, offset ASC) order.
13261
+ ** i.e. all those in column 0, sorted by offset, followed by those in
13262
+ ** column 1, etc.
13263
+ **
13040
13264
  ** xPhraseNext()
13041
13265
  ** See xPhraseFirst above.
13042
13266
  **
@@ -13093,19 +13317,57 @@ struct Fts5PhraseIter {
13093
13317
  ** value returned by xInstCount(), SQLITE_RANGE is returned. Otherwise,
13094
13318
  ** output variable (*ppToken) is set to point to a buffer containing the
13095
13319
  ** matching document token, and (*pnToken) to the size of that buffer in
13096
- ** bytes. This API is not available if the specified token matches a
13097
- ** prefix query term. In that case both output variables are always set
13098
- ** to 0.
13320
+ ** bytes.
13099
13321
  **
13100
13322
  ** The output text is not a copy of the document text that was tokenized.
13101
13323
  ** It is the output of the tokenizer module. For tokendata=1 tables, this
13102
13324
  ** includes any embedded 0x00 and trailing data.
13103
13325
  **
13326
+ ** This API may be slow in some cases if the token identified by parameters
13327
+ ** iIdx and iToken matched a prefix token in the query. In most cases, the
13328
+ ** first call to this API for each prefix token in the query is forced
13329
+ ** to scan the portion of the full-text index that matches the prefix
13330
+ ** token to collect the extra data required by this API. If the prefix
13331
+ ** token matches a large number of token instances in the document set,
13332
+ ** this may be a performance problem.
13333
+ **
13334
+ ** If the user knows in advance that a query may use this API for a
13335
+ ** prefix token, FTS5 may be configured to collect all required data as part
13336
+ ** of the initial querying of the full-text index, avoiding the second scan
13337
+ ** entirely. This also causes prefix queries that do not use this API to
13338
+ ** run more slowly and use more memory. FTS5 may be configured in this way
13339
+ ** either on a per-table basis using the [FTS5 insttoken | 'insttoken']
13340
+ ** option, or on a per-query basis using the
13341
+ ** [fts5_insttoken | fts5_insttoken()] user function.
13342
+ **
13104
13343
  ** This API can be quite slow if used with an FTS5 table created with the
13105
13344
  ** "detail=none" or "detail=column" option.
13345
+ **
13346
+ ** xColumnLocale(pFts5, iIdx, pzLocale, pnLocale)
13347
+ ** If parameter iCol is less than zero, or greater than or equal to the
13348
+ ** number of columns in the table, SQLITE_RANGE is returned.
13349
+ **
13350
+ ** Otherwise, this function attempts to retrieve the locale associated
13351
+ ** with column iCol of the current row. Usually, there is no associated
13352
+ ** locale, and output parameters (*pzLocale) and (*pnLocale) are set
13353
+ ** to NULL and 0, respectively. However, if the fts5_locale() function
13354
+ ** was used to associate a locale with the value when it was inserted
13355
+ ** into the fts5 table, then (*pzLocale) is set to point to a nul-terminated
13356
+ ** buffer containing the name of the locale in utf-8 encoding. (*pnLocale)
13357
+ ** is set to the size in bytes of the buffer, not including the
13358
+ ** nul-terminator.
13359
+ **
13360
+ ** If successful, SQLITE_OK is returned. Or, if an error occurs, an
13361
+ ** SQLite error code is returned. The final value of the output parameters
13362
+ ** is undefined in this case.
13363
+ **
13364
+ ** xTokenize_v2:
13365
+ ** Tokenize text using the tokenizer belonging to the FTS5 table. This
13366
+ ** API is the same as the xTokenize() API, except that it allows a tokenizer
13367
+ ** locale to be specified.
13106
13368
  */
13107
13369
  struct Fts5ExtensionApi {
13108
- int iVersion; /* Currently always set to 3 */
13370
+ int iVersion; /* Currently always set to 4 */
13109
13371
 
13110
13372
  void *(*xUserData)(Fts5Context*);
13111
13373
 
@@ -13147,6 +13409,15 @@ struct Fts5ExtensionApi {
13147
13409
  const char **ppToken, int *pnToken
13148
13410
  );
13149
13411
  int (*xInstToken)(Fts5Context*, int iIdx, int iToken, const char**, int*);
13412
+
13413
+ /* Below this point are iVersion>=4 only */
13414
+ int (*xColumnLocale)(Fts5Context*, int iCol, const char **pz, int *pn);
13415
+ int (*xTokenize_v2)(Fts5Context*,
13416
+ const char *pText, int nText, /* Text to tokenize */
13417
+ const char *pLocale, int nLocale, /* Locale to pass to tokenizer */
13418
+ void *pCtx, /* Context passed to xToken() */
13419
+ int (*xToken)(void*, int, const char*, int, int, int) /* Callback */
13420
+ );
13150
13421
  };
13151
13422
 
13152
13423
  /*
@@ -13167,7 +13438,7 @@ struct Fts5ExtensionApi {
13167
13438
  ** A tokenizer instance is required to actually tokenize text.
13168
13439
  **
13169
13440
  ** The first argument passed to this function is a copy of the (void*)
13170
- ** pointer provided by the application when the fts5_tokenizer object
13441
+ ** pointer provided by the application when the fts5_tokenizer_v2 object
13171
13442
  ** was registered with FTS5 (the third argument to xCreateTokenizer()).
13172
13443
  ** The second and third arguments are an array of nul-terminated strings
13173
13444
  ** containing the tokenizer arguments, if any, specified following the
@@ -13191,7 +13462,7 @@ struct Fts5ExtensionApi {
13191
13462
  ** argument passed to this function is a pointer to an Fts5Tokenizer object
13192
13463
  ** returned by an earlier call to xCreate().
13193
13464
  **
13194
- ** The second argument indicates the reason that FTS5 is requesting
13465
+ ** The third argument indicates the reason that FTS5 is requesting
13195
13466
  ** tokenization of the supplied text. This is always one of the following
13196
13467
  ** four values:
13197
13468
  **
@@ -13215,6 +13486,13 @@ struct Fts5ExtensionApi {
13215
13486
  ** on a columnsize=0 database.
13216
13487
  ** </ul>
13217
13488
  **
13489
+ ** The sixth and seventh arguments passed to xTokenize() - pLocale and
13490
+ ** nLocale - are a pointer to a buffer containing the locale to use for
13491
+ ** tokenization (e.g. "en_US") and its size in bytes, respectively. The
13492
+ ** pLocale buffer is not nul-terminated. pLocale may be passed NULL (in
13493
+ ** which case nLocale is always 0) to indicate that the tokenizer should
13494
+ ** use its default locale.
13495
+ **
13218
13496
  ** For each token in the input string, the supplied callback xToken() must
13219
13497
  ** be invoked. The first argument to it should be a copy of the pointer
13220
13498
  ** passed as the second argument to xTokenize(). The third and fourth
@@ -13238,6 +13516,30 @@ struct Fts5ExtensionApi {
13238
13516
  ** may abandon the tokenization and return any error code other than
13239
13517
  ** SQLITE_OK or SQLITE_DONE.
13240
13518
  **
13519
+ ** If the tokenizer is registered using an fts5_tokenizer_v2 object,
13520
+ ** then the xTokenize() method has two additional arguments - pLocale
13521
+ ** and nLocale. These specify the locale that the tokenizer should use
13522
+ ** for the current request. If pLocale and nLocale are both 0, then the
13523
+ ** tokenizer should use its default locale. Otherwise, pLocale points to
13524
+ ** an nLocale byte buffer containing the name of the locale to use as utf-8
13525
+ ** text. pLocale is not nul-terminated.
13526
+ **
13527
+ ** FTS5_TOKENIZER
13528
+ **
13529
+ ** There is also an fts5_tokenizer object. This is an older, deprecated,
13530
+ ** version of fts5_tokenizer_v2. It is similar except that:
13531
+ **
13532
+ ** <ul>
13533
+ ** <li> There is no "iVersion" field, and
13534
+ ** <li> The xTokenize() method does not take a locale argument.
13535
+ ** </ul>
13536
+ **
13537
+ ** Legacy fts5_tokenizer tokenizers must be registered using the
13538
+ ** legacy xCreateTokenizer() function, instead of xCreateTokenizer_v2().
13539
+ **
13540
+ ** Tokenizer implementations registered using either API may be retrieved
13541
+ ** using both xFindTokenizer() and xFindTokenizer_v2().
13542
+ **
13241
13543
  ** SYNONYM SUPPORT
13242
13544
  **
13243
13545
  ** Custom tokenizers may also support synonyms. Consider a case in which a
@@ -13346,6 +13648,33 @@ struct Fts5ExtensionApi {
13346
13648
  ** inefficient.
13347
13649
  */
13348
13650
  typedef struct Fts5Tokenizer Fts5Tokenizer;
13651
+ typedef struct fts5_tokenizer_v2 fts5_tokenizer_v2;
13652
+ struct fts5_tokenizer_v2 {
13653
+ int iVersion; /* Currently always 2 */
13654
+
13655
+ int (*xCreate)(void*, const char **azArg, int nArg, Fts5Tokenizer **ppOut);
13656
+ void (*xDelete)(Fts5Tokenizer*);
13657
+ int (*xTokenize)(Fts5Tokenizer*,
13658
+ void *pCtx,
13659
+ int flags, /* Mask of FTS5_TOKENIZE_* flags */
13660
+ const char *pText, int nText,
13661
+ const char *pLocale, int nLocale,
13662
+ int (*xToken)(
13663
+ void *pCtx, /* Copy of 2nd argument to xTokenize() */
13664
+ int tflags, /* Mask of FTS5_TOKEN_* flags */
13665
+ const char *pToken, /* Pointer to buffer containing token */
13666
+ int nToken, /* Size of token in bytes */
13667
+ int iStart, /* Byte offset of token within input text */
13668
+ int iEnd /* Byte offset of end of token within input text */
13669
+ )
13670
+ );
13671
+ };
13672
+
13673
+ /*
13674
+ ** New code should use the fts5_tokenizer_v2 type to define tokenizer
13675
+ ** implementations. The following type is included for legacy applications
13676
+ ** that still use it.
13677
+ */
13349
13678
  typedef struct fts5_tokenizer fts5_tokenizer;
13350
13679
  struct fts5_tokenizer {
13351
13680
  int (*xCreate)(void*, const char **azArg, int nArg, Fts5Tokenizer **ppOut);
@@ -13365,6 +13694,7 @@ struct fts5_tokenizer {
13365
13694
  );
13366
13695
  };
13367
13696
 
13697
+
13368
13698
  /* Flags that may be passed as the third argument to xTokenize() */
13369
13699
  #define FTS5_TOKENIZE_QUERY 0x0001
13370
13700
  #define FTS5_TOKENIZE_PREFIX 0x0002
@@ -13384,7 +13714,7 @@ struct fts5_tokenizer {
13384
13714
  */
13385
13715
  typedef struct fts5_api fts5_api;
13386
13716
  struct fts5_api {
13387
- int iVersion; /* Currently always set to 2 */
13717
+ int iVersion; /* Currently always set to 3 */
13388
13718
 
13389
13719
  /* Create a new tokenizer */
13390
13720
  int (*xCreateTokenizer)(
@@ -13411,6 +13741,25 @@ struct fts5_api {
13411
13741
  fts5_extension_function xFunction,
13412
13742
  void (*xDestroy)(void*)
13413
13743
  );
13744
+
13745
+ /* APIs below this point are only available if iVersion>=3 */
13746
+
13747
+ /* Create a new tokenizer */
13748
+ int (*xCreateTokenizer_v2)(
13749
+ fts5_api *pApi,
13750
+ const char *zName,
13751
+ void *pUserData,
13752
+ fts5_tokenizer_v2 *pTokenizer,
13753
+ void (*xDestroy)(void*)
13754
+ );
13755
+
13756
+ /* Find an existing tokenizer */
13757
+ int (*xFindTokenizer_v2)(
13758
+ fts5_api *pApi,
13759
+ const char *zName,
13760
+ void **ppUserData,
13761
+ fts5_tokenizer_v2 **ppTokenizer
13762
+ );
13414
13763
  };
13415
13764
 
13416
13765
  /*
@@ -13424,103 +13773,8 @@ struct fts5_api {
13424
13773
  #endif /* _FTS5_H */
13425
13774
 
13426
13775
  /******** End of fts5.h *********/
13776
+ #endif /* SQLITE3_H */
13427
13777
  #else // USE_LIBSQLITE3
13428
13778
  // If users really want to link against the system sqlite3 we
13429
13779
  // need to make this file a noop.
13430
- #endif
13431
- /*
13432
- ** 2014-09-08
13433
- **
13434
- ** The author disclaims copyright to this source code. In place of
13435
- ** a legal notice, here is a blessing:
13436
- **
13437
- ** May you do good and not evil.
13438
- ** May you find forgiveness for yourself and forgive others.
13439
- ** May you share freely, never taking more than you give.
13440
- **
13441
- *************************************************************************
13442
- **
13443
- ** This file contains the application interface definitions for the
13444
- ** user-authentication extension feature.
13445
- **
13446
- ** To compile with the user-authentication feature, append this file to
13447
- ** end of an SQLite amalgamation header file ("sqlite3.h"), then add
13448
- ** the SQLITE_USER_AUTHENTICATION compile-time option. See the
13449
- ** user-auth.txt file in the same source directory as this file for
13450
- ** additional information.
13451
- */
13452
- #ifdef SQLITE_USER_AUTHENTICATION
13453
-
13454
- #ifdef __cplusplus
13455
- extern "C" {
13456
- #endif
13457
-
13458
- /*
13459
- ** If a database contains the SQLITE_USER table, then the
13460
- ** sqlite3_user_authenticate() interface must be invoked with an
13461
- ** appropriate username and password prior to enable read and write
13462
- ** access to the database.
13463
- **
13464
- ** Return SQLITE_OK on success or SQLITE_ERROR if the username/password
13465
- ** combination is incorrect or unknown.
13466
- **
13467
- ** If the SQLITE_USER table is not present in the database file, then
13468
- ** this interface is a harmless no-op returnning SQLITE_OK.
13469
- */
13470
- int sqlite3_user_authenticate(
13471
- sqlite3 *db, /* The database connection */
13472
- const char *zUsername, /* Username */
13473
- const char *aPW, /* Password or credentials */
13474
- int nPW /* Number of bytes in aPW[] */
13475
- );
13476
-
13477
- /*
13478
- ** The sqlite3_user_add() interface can be used (by an admin user only)
13479
- ** to create a new user. When called on a no-authentication-required
13480
- ** database, this routine converts the database into an authentication-
13481
- ** required database, automatically makes the added user an
13482
- ** administrator, and logs in the current connection as that user.
13483
- ** The sqlite3_user_add() interface only works for the "main" database, not
13484
- ** for any ATTACH-ed databases. Any call to sqlite3_user_add() by a
13485
- ** non-admin user results in an error.
13486
- */
13487
- int sqlite3_user_add(
13488
- sqlite3 *db, /* Database connection */
13489
- const char *zUsername, /* Username to be added */
13490
- const char *aPW, /* Password or credentials */
13491
- int nPW, /* Number of bytes in aPW[] */
13492
- int isAdmin /* True to give new user admin privilege */
13493
- );
13494
-
13495
- /*
13496
- ** The sqlite3_user_change() interface can be used to change a users
13497
- ** login credentials or admin privilege. Any user can change their own
13498
- ** login credentials. Only an admin user can change another users login
13499
- ** credentials or admin privilege setting. No user may change their own
13500
- ** admin privilege setting.
13501
- */
13502
- int sqlite3_user_change(
13503
- sqlite3 *db, /* Database connection */
13504
- const char *zUsername, /* Username to change */
13505
- const char *aPW, /* New password or credentials */
13506
- int nPW, /* Number of bytes in aPW[] */
13507
- int isAdmin /* Modified admin privilege for the user */
13508
- );
13509
-
13510
- /*
13511
- ** The sqlite3_user_delete() interface can be used (by an admin user only)
13512
- ** to delete a user. The currently logged-in user cannot be deleted,
13513
- ** which guarantees that there is always an admin user and hence that
13514
- ** the database cannot be converted into a no-authentication-required
13515
- ** database.
13516
- */
13517
- int sqlite3_user_delete(
13518
- sqlite3 *db, /* Database connection */
13519
- const char *zUsername /* Username to remove */
13520
- );
13521
-
13522
- #ifdef __cplusplus
13523
- } /* end of the 'extern "C"' block */
13524
- #endif
13525
-
13526
- #endif /* SQLITE_USER_AUTHENTICATION */
13780
+ #endif