slidge-whatsapp 0.2.5__cp313-cp313-manylinux_2_36_aarch64.whl → 0.2.7__cp313-cp313-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 (357) hide show
  1. slidge_whatsapp/config.py +3 -0
  2. slidge_whatsapp/event.go +31 -26
  3. slidge_whatsapp/gateway.go +13 -9
  4. slidge_whatsapp/gateway.py +2 -2
  5. slidge_whatsapp/generated/_whatsapp.cpython-313-aarch64-linux-gnu.h +135 -135
  6. slidge_whatsapp/generated/_whatsapp.cpython-313-aarch64-linux-gnu.so +0 -0
  7. slidge_whatsapp/generated/build.py +108 -108
  8. slidge_whatsapp/generated/whatsapp.c +954 -954
  9. slidge_whatsapp/generated/whatsapp.go +602 -602
  10. slidge_whatsapp/generated/whatsapp.py +783 -783
  11. slidge_whatsapp/generated/whatsapp_go.h +135 -135
  12. slidge_whatsapp/go.mod +15 -12
  13. slidge_whatsapp/go.sum +35 -29
  14. slidge_whatsapp/media/media.go +21 -11
  15. slidge_whatsapp/session.go +73 -66
  16. slidge_whatsapp/vendor/github.com/ebitengine/purego/dlfcn.go +4 -4
  17. slidge_whatsapp/vendor/github.com/ebitengine/purego/dlfcn_darwin.go +0 -5
  18. slidge_whatsapp/vendor/github.com/ebitengine/purego/internal/fakecgo/go_libinit.go +3 -0
  19. slidge_whatsapp/vendor/github.com/ebitengine/purego/internal/fakecgo/symbols.go +40 -20
  20. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/CHANGELOG.md +14 -1
  21. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/ffi.go +2 -2
  22. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/fun.go +10 -2
  23. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/lib.go +1 -1
  24. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/lib_unix.go +1 -1
  25. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/lib_windows.go +1 -1
  26. slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/README.md +2 -7
  27. slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/callback.go +2 -1
  28. slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3-binding.c +8510 -5090
  29. slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3-binding.h +344 -150
  30. slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3.go +57 -23
  31. slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3_opt_unlock_notify.c +4 -0
  32. slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3_opt_unlock_notify.go +4 -0
  33. slidge_whatsapp/vendor/github.com/petermattis/goid/.gitignore +4 -0
  34. slidge_whatsapp/vendor/github.com/petermattis/goid/LICENSE +202 -0
  35. slidge_whatsapp/vendor/github.com/petermattis/goid/README.md +4 -0
  36. slidge_whatsapp/vendor/github.com/petermattis/goid/goid.go +35 -0
  37. slidge_whatsapp/vendor/github.com/petermattis/goid/goid_gccgo.go +26 -0
  38. slidge_whatsapp/vendor/github.com/petermattis/goid/goid_go1.3.c +23 -0
  39. slidge_whatsapp/vendor/github.com/petermattis/goid/goid_go1.3.go +22 -0
  40. slidge_whatsapp/vendor/github.com/petermattis/goid/goid_go1.4.go +35 -0
  41. slidge_whatsapp/vendor/github.com/petermattis/goid/goid_go1.4.s +18 -0
  42. slidge_whatsapp/vendor/github.com/petermattis/goid/goid_go1.5.go +28 -0
  43. slidge_whatsapp/vendor/github.com/petermattis/goid/goid_go1.5.s +44 -0
  44. slidge_whatsapp/vendor/github.com/petermattis/goid/goid_slow.go +24 -0
  45. slidge_whatsapp/vendor/github.com/petermattis/goid/runtime_gccgo_go1.8.go +17 -0
  46. slidge_whatsapp/vendor/github.com/petermattis/goid/runtime_go1.23.go +38 -0
  47. slidge_whatsapp/vendor/github.com/petermattis/goid/runtime_go1.5.go +57 -0
  48. slidge_whatsapp/vendor/github.com/petermattis/goid/runtime_go1.6.go +43 -0
  49. slidge_whatsapp/vendor/github.com/petermattis/goid/runtime_go1.9.go +37 -0
  50. slidge_whatsapp/vendor/github.com/rs/zerolog/CONTRIBUTING.md +43 -0
  51. slidge_whatsapp/vendor/github.com/rs/zerolog/README.md +31 -0
  52. slidge_whatsapp/vendor/github.com/rs/zerolog/console.go +20 -5
  53. slidge_whatsapp/vendor/github.com/rs/zerolog/log/log.go +131 -0
  54. slidge_whatsapp/vendor/github.com/rs/zerolog/log.go +1 -1
  55. slidge_whatsapp/vendor/github.com/rs/zerolog/sampler.go +4 -1
  56. slidge_whatsapp/vendor/github.com/rs/zerolog/writer.go +9 -0
  57. slidge_whatsapp/vendor/go.mau.fi/libsignal/groups/GroupCipher.go +17 -6
  58. slidge_whatsapp/vendor/go.mau.fi/libsignal/groups/GroupSessionBuilder.go +17 -7
  59. slidge_whatsapp/vendor/go.mau.fi/libsignal/groups/state/store/SenderKeyStore.go +4 -2
  60. slidge_whatsapp/vendor/go.mau.fi/libsignal/keys/chain/ChainKey.go +1 -0
  61. slidge_whatsapp/vendor/go.mau.fi/libsignal/keys/identity/IdentityKey.go +1 -0
  62. slidge_whatsapp/vendor/go.mau.fi/libsignal/logger/DefaultLogger.go +2 -2
  63. slidge_whatsapp/vendor/go.mau.fi/libsignal/serialize/FingerprintProtocol.pb.go +3 -2
  64. slidge_whatsapp/vendor/go.mau.fi/libsignal/serialize/LocalStorageProtocol.pb.go +3 -2
  65. slidge_whatsapp/vendor/go.mau.fi/libsignal/serialize/WhisperTextProtocol.pb.go +3 -2
  66. slidge_whatsapp/vendor/go.mau.fi/libsignal/session/Session.go +41 -17
  67. slidge_whatsapp/vendor/go.mau.fi/libsignal/session/SessionCipher.go +64 -30
  68. slidge_whatsapp/vendor/go.mau.fi/libsignal/state/store/IdentityKeyStore.go +5 -3
  69. slidge_whatsapp/vendor/go.mau.fi/libsignal/state/store/MessageKeyStore.go +6 -4
  70. slidge_whatsapp/vendor/go.mau.fi/libsignal/state/store/PreKeyStore.go +6 -4
  71. slidge_whatsapp/vendor/go.mau.fi/libsignal/state/store/SessionStore.go +8 -6
  72. slidge_whatsapp/vendor/go.mau.fi/libsignal/state/store/SignedPreKeyStore.go +7 -5
  73. slidge_whatsapp/vendor/go.mau.fi/util/dbutil/connlog.go +257 -0
  74. slidge_whatsapp/vendor/go.mau.fi/util/dbutil/database.go +309 -0
  75. slidge_whatsapp/vendor/go.mau.fi/util/dbutil/iter.go +233 -0
  76. slidge_whatsapp/vendor/go.mau.fi/util/dbutil/json.go +47 -0
  77. slidge_whatsapp/vendor/go.mau.fi/util/dbutil/log.go +129 -0
  78. slidge_whatsapp/vendor/go.mau.fi/util/dbutil/massinsert.go +164 -0
  79. slidge_whatsapp/vendor/go.mau.fi/util/dbutil/queryhelper.go +137 -0
  80. slidge_whatsapp/vendor/go.mau.fi/util/dbutil/reflectscan.go +30 -0
  81. slidge_whatsapp/vendor/go.mau.fi/util/dbutil/transaction.go +180 -0
  82. slidge_whatsapp/vendor/go.mau.fi/util/dbutil/upgrades.go +250 -0
  83. slidge_whatsapp/vendor/go.mau.fi/util/dbutil/upgradetable.go +331 -0
  84. slidge_whatsapp/vendor/go.mau.fi/util/exerrors/dualerror.go +33 -0
  85. slidge_whatsapp/vendor/go.mau.fi/util/exerrors/must.go +23 -0
  86. slidge_whatsapp/vendor/go.mau.fi/util/exhttp/cors.go +32 -0
  87. slidge_whatsapp/vendor/go.mau.fi/util/exhttp/handleerrors.go +64 -0
  88. slidge_whatsapp/vendor/go.mau.fi/util/exhttp/json.go +36 -0
  89. slidge_whatsapp/vendor/go.mau.fi/util/exhttp/middleware.go +30 -0
  90. slidge_whatsapp/vendor/go.mau.fi/util/exhttp/networkerror.go +37 -0
  91. slidge_whatsapp/vendor/go.mau.fi/util/exstrings/stringutil.go +76 -0
  92. slidge_whatsapp/vendor/go.mau.fi/util/exsync/event.go +88 -0
  93. slidge_whatsapp/vendor/go.mau.fi/util/exsync/returnonce.go +25 -0
  94. slidge_whatsapp/vendor/go.mau.fi/util/exsync/ringbuffer.go +139 -0
  95. slidge_whatsapp/vendor/go.mau.fi/util/exsync/syncmap.go +94 -0
  96. slidge_whatsapp/vendor/go.mau.fi/util/exsync/syncset.go +136 -0
  97. slidge_whatsapp/vendor/go.mau.fi/util/exzerolog/callermarshal.go +28 -0
  98. slidge_whatsapp/vendor/go.mau.fi/util/exzerolog/defaults.go +32 -0
  99. slidge_whatsapp/vendor/go.mau.fi/util/exzerolog/generics.go +45 -0
  100. slidge_whatsapp/vendor/go.mau.fi/util/exzerolog/writer.go +81 -0
  101. slidge_whatsapp/vendor/go.mau.fi/util/ptr/ptr.go +43 -0
  102. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate/decode.go +27 -26
  103. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate/encode.go +4 -3
  104. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate/keys.go +5 -4
  105. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate.go +27 -25
  106. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/armadillomessage.go +40 -7
  107. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/binary/encoder.go +1 -1
  108. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/broadcast.go +5 -4
  109. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/call.go +1 -1
  110. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/client.go +119 -37
  111. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/connectionevents.go +29 -11
  112. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/download-to-file.go +63 -30
  113. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/download.go +74 -34
  114. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/errors.go +1 -0
  115. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/group.go +61 -31
  116. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/internals.go +188 -152
  117. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/keepalive.go +3 -2
  118. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/mediaconn.go +5 -3
  119. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/mediaretry.go +2 -1
  120. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/message.go +444 -135
  121. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/msgsecret.go +118 -31
  122. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/notification.go +78 -42
  123. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/pair-code.go +7 -4
  124. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/pair.go +42 -18
  125. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/prekeys.go +9 -5
  126. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/presence.go +2 -1
  127. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/privacysettings.go +10 -11
  128. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/extra.go +7 -0
  129. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloAddMessage/InstamadilloAddMessage.pb.go +983 -0
  130. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloAddMessage/InstamadilloAddMessage.proto +85 -0
  131. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloAddMessage/extra.go +3 -0
  132. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeActionLog/InstamadilloCoreTypeActionLog.pb.go +197 -0
  133. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeActionLog/InstamadilloCoreTypeActionLog.proto +13 -0
  134. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeAdminMessage/InstamadilloCoreTypeAdminMessage.pb.go +279 -0
  135. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeAdminMessage/InstamadilloCoreTypeAdminMessage.proto +21 -0
  136. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeCollection/InstamadilloCoreTypeCollection.pb.go +137 -0
  137. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeCollection/InstamadilloCoreTypeCollection.proto +10 -0
  138. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeLink/InstamadilloCoreTypeLink.pb.go +313 -0
  139. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeLink/InstamadilloCoreTypeLink.proto +27 -0
  140. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeMedia/InstamadilloCoreTypeMedia.pb.go +1299 -0
  141. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeMedia/InstamadilloCoreTypeMedia.proto +112 -0
  142. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeText/InstamadilloCoreTypeText.pb.go +514 -0
  143. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeText/InstamadilloCoreTypeText.proto +47 -0
  144. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloDeleteMessage/InstamadilloDeleteMessage.pb.go +123 -0
  145. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloDeleteMessage/InstamadilloDeleteMessage.proto +7 -0
  146. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloDeleteMessage/extra.go +3 -0
  147. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloSupplementMessage/InstamadilloSupplementMessage.pb.go +720 -0
  148. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloSupplementMessage/InstamadilloSupplementMessage.proto +59 -0
  149. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloSupplementMessage/extra.go +3 -0
  150. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloTransportPayload/InstamadilloTransportPayload.pb.go +365 -0
  151. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloTransportPayload/InstamadilloTransportPayload.proto +33 -0
  152. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloXmaContentRef/InstamadilloXmaContentRef.pb.go +1238 -0
  153. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloXmaContentRef/InstamadilloXmaContentRef.proto +105 -0
  154. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waAdv/WAAdv.pb.go +39 -9
  155. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waArmadilloApplication/WAArmadilloApplication.pb.go +354 -175
  156. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waArmadilloApplication/WAArmadilloApplication.proto +5 -5
  157. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waArmadilloXMA/WAArmadilloXMA.pb.go +170 -15
  158. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waArmadilloXMA/WAArmadilloXMA.proto +4 -0
  159. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCert/WACert.pb.go +29 -9
  160. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waChatLockSettings/WAProtobufsChatLockSettings.pb.go +13 -9
  161. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCommon/WACommon.pb.go +344 -31
  162. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCommon/WACommon.proto +26 -0
  163. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCompanionReg/{WAWebProtobufsCompanionReg.pb.go → WACompanionReg.pb.go} +184 -89
  164. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCompanionReg/{WAWebProtobufsCompanionReg.proto → WACompanionReg.proto} +2 -1
  165. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waConsumerApplication/WAConsumerApplication.pb.go +173 -9
  166. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waDeviceCapabilities/WAProtobufsDeviceCapabilities.pb.go +78 -16
  167. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waDeviceCapabilities/WAProtobufsDeviceCapabilities.proto +5 -0
  168. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waE2E/WAWebProtobufsE2E.pb.go +7428 -2151
  169. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waE2E/WAWebProtobufsE2E.proto +373 -44
  170. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waHistorySync/WAWebProtobufsHistorySync.pb.go +456 -135
  171. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waHistorySync/WAWebProtobufsHistorySync.proto +14 -0
  172. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waLidMigrationSyncPayload/WAWebProtobufLidMigrationSyncPayload.pb.go +198 -0
  173. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waLidMigrationSyncPayload/WAWebProtobufLidMigrationSyncPayload.proto +14 -0
  174. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMediaTransport/WAMediaTransport.pb.go +162 -9
  175. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMediaTransport/WAMediaTransport.proto +1 -0
  176. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMmsRetry/WAMmsRetry.pb.go +32 -9
  177. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMmsRetry/WAMmsRetry.proto +1 -0
  178. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMsgApplication/WAMsgApplication.pb.go +192 -52
  179. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMsgApplication/WAMsgApplication.proto +8 -0
  180. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMsgTransport/WAMsgTransport.pb.go +60 -9
  181. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMsgTransport/extra.go +7 -6
  182. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMultiDevice/WAMultiDevice.pb.go +39 -9
  183. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waServerSync/WAServerSync.pb.go +61 -9
  184. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waStatusAttributions/WAStatusAttributions.pb.go +800 -0
  185. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waStatusAttributions/WAStatusAttributions.proto +72 -0
  186. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waSyncAction/WASyncAction.pb.go +1344 -438
  187. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waSyncAction/WASyncAction.proto +52 -0
  188. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waUserPassword/WAProtobufsUserPassword.pb.go +27 -9
  189. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waVnameCert/WAWebProtobufsVnameCert.pb.go +59 -9
  190. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWa6/WAWebProtobufsWa6.pb.go +382 -78
  191. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWa6/WAWebProtobufsWa6.proto +8 -0
  192. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWeb/WAWebProtobufsWeb.pb.go +563 -9
  193. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWeb/WAWebProtobufsWeb.proto +4 -0
  194. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/receipt.go +25 -9
  195. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/reportingfields.json +1 -0
  196. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/reportingtoken.go +176 -0
  197. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/retry.go +39 -21
  198. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/send.go +261 -75
  199. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/sendfb.go +28 -16
  200. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/clientpayload.go +3 -1
  201. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/noop.go +85 -43
  202. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/signal.go +75 -88
  203. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/container.go +86 -65
  204. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/lidmap.go +186 -0
  205. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/store.go +291 -167
  206. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/00-latest-schema.sql +155 -0
  207. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/03-message-secrets.sql +11 -0
  208. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/04-privacy-tokens.sql +8 -0
  209. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/05-account-jid-format.sql +2 -0
  210. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/06-facebook-uuid.sql +2 -0
  211. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/07-account-lid.sql +2 -0
  212. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/08-lid-mapping.sql +5 -0
  213. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/09-decryption-buffer.sql +10 -0
  214. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/10-chat-db-lid-migration-ts.sql +2 -0
  215. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/upgrades.go +22 -0
  216. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/store.go +107 -56
  217. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/botmap.go +210 -0
  218. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/events/events.go +13 -2
  219. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/group.go +15 -6
  220. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/jid.go +7 -8
  221. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/message.go +18 -0
  222. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/update.go +3 -2
  223. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/upload.go +1 -1
  224. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/user.go +47 -29
  225. slidge_whatsapp/vendor/golang.org/x/exp/LICENSE +27 -0
  226. slidge_whatsapp/vendor/golang.org/x/exp/PATENTS +22 -0
  227. slidge_whatsapp/vendor/golang.org/x/exp/constraints/constraints.go +54 -0
  228. slidge_whatsapp/vendor/golang.org/x/net/http/httpguts/guts.go +50 -0
  229. slidge_whatsapp/vendor/golang.org/x/net/http/httpguts/httplex.go +347 -0
  230. slidge_whatsapp/vendor/golang.org/x/net/http2/.gitignore +2 -0
  231. slidge_whatsapp/vendor/golang.org/x/net/http2/ascii.go +53 -0
  232. slidge_whatsapp/vendor/golang.org/x/net/http2/ciphers.go +641 -0
  233. slidge_whatsapp/vendor/golang.org/x/net/http2/client_conn_pool.go +311 -0
  234. slidge_whatsapp/vendor/golang.org/x/net/http2/config.go +122 -0
  235. slidge_whatsapp/vendor/golang.org/x/net/http2/config_go124.go +61 -0
  236. slidge_whatsapp/vendor/golang.org/x/net/http2/config_pre_go124.go +16 -0
  237. slidge_whatsapp/vendor/golang.org/x/net/http2/databuffer.go +149 -0
  238. slidge_whatsapp/vendor/golang.org/x/net/http2/errors.go +145 -0
  239. slidge_whatsapp/vendor/golang.org/x/net/http2/flow.go +120 -0
  240. slidge_whatsapp/vendor/golang.org/x/net/http2/frame.go +1702 -0
  241. slidge_whatsapp/vendor/golang.org/x/net/http2/gotrack.go +170 -0
  242. slidge_whatsapp/vendor/golang.org/x/net/http2/hpack/encode.go +245 -0
  243. slidge_whatsapp/vendor/golang.org/x/net/http2/hpack/hpack.go +523 -0
  244. slidge_whatsapp/vendor/golang.org/x/net/http2/hpack/huffman.go +226 -0
  245. slidge_whatsapp/vendor/golang.org/x/net/http2/hpack/static_table.go +188 -0
  246. slidge_whatsapp/vendor/golang.org/x/net/http2/hpack/tables.go +403 -0
  247. slidge_whatsapp/vendor/golang.org/x/net/http2/http2.go +432 -0
  248. slidge_whatsapp/vendor/golang.org/x/net/http2/pipe.go +184 -0
  249. slidge_whatsapp/vendor/golang.org/x/net/http2/server.go +3350 -0
  250. slidge_whatsapp/vendor/golang.org/x/net/http2/timer.go +20 -0
  251. slidge_whatsapp/vendor/golang.org/x/net/http2/transport.go +3287 -0
  252. slidge_whatsapp/vendor/golang.org/x/net/http2/unencrypted.go +32 -0
  253. slidge_whatsapp/vendor/golang.org/x/net/http2/write.go +381 -0
  254. slidge_whatsapp/vendor/golang.org/x/net/http2/writesched.go +251 -0
  255. slidge_whatsapp/vendor/golang.org/x/net/http2/writesched_priority.go +451 -0
  256. slidge_whatsapp/vendor/golang.org/x/net/http2/writesched_random.go +77 -0
  257. slidge_whatsapp/vendor/golang.org/x/net/http2/writesched_roundrobin.go +119 -0
  258. slidge_whatsapp/vendor/golang.org/x/net/idna/go118.go +13 -0
  259. slidge_whatsapp/vendor/golang.org/x/net/idna/idna10.0.0.go +769 -0
  260. slidge_whatsapp/vendor/golang.org/x/net/idna/idna9.0.0.go +717 -0
  261. slidge_whatsapp/vendor/golang.org/x/net/idna/pre_go118.go +11 -0
  262. slidge_whatsapp/vendor/golang.org/x/net/idna/punycode.go +217 -0
  263. slidge_whatsapp/vendor/golang.org/x/net/idna/tables10.0.0.go +4559 -0
  264. slidge_whatsapp/vendor/golang.org/x/net/idna/tables11.0.0.go +4653 -0
  265. slidge_whatsapp/vendor/golang.org/x/net/idna/tables12.0.0.go +4733 -0
  266. slidge_whatsapp/vendor/golang.org/x/net/idna/tables13.0.0.go +4959 -0
  267. slidge_whatsapp/vendor/golang.org/x/net/idna/tables15.0.0.go +5144 -0
  268. slidge_whatsapp/vendor/golang.org/x/net/idna/tables9.0.0.go +4486 -0
  269. slidge_whatsapp/vendor/golang.org/x/net/idna/trie.go +51 -0
  270. slidge_whatsapp/vendor/golang.org/x/net/idna/trie12.0.0.go +30 -0
  271. slidge_whatsapp/vendor/golang.org/x/net/idna/trie13.0.0.go +30 -0
  272. slidge_whatsapp/vendor/golang.org/x/net/idna/trieval.go +119 -0
  273. slidge_whatsapp/vendor/golang.org/x/net/internal/httpcommon/ascii.go +53 -0
  274. slidge_whatsapp/vendor/golang.org/x/net/internal/httpcommon/headermap.go +115 -0
  275. slidge_whatsapp/vendor/golang.org/x/net/internal/httpcommon/request.go +467 -0
  276. slidge_whatsapp/vendor/golang.org/x/sys/unix/syscall_darwin.go +148 -1
  277. slidge_whatsapp/vendor/golang.org/x/sys/unix/syscall_linux.go +16 -26
  278. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go +84 -0
  279. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s +20 -0
  280. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go +84 -0
  281. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s +20 -0
  282. slidge_whatsapp/vendor/golang.org/x/sys/windows/security_windows.go +44 -5
  283. slidge_whatsapp/vendor/golang.org/x/sys/windows/syscall_windows.go +4 -2
  284. slidge_whatsapp/vendor/golang.org/x/sys/windows/types_windows.go +239 -0
  285. slidge_whatsapp/vendor/golang.org/x/sys/windows/zsyscall_windows.go +9 -0
  286. slidge_whatsapp/vendor/golang.org/x/text/LICENSE +27 -0
  287. slidge_whatsapp/vendor/golang.org/x/text/PATENTS +22 -0
  288. slidge_whatsapp/vendor/golang.org/x/text/secure/bidirule/bidirule.go +336 -0
  289. slidge_whatsapp/vendor/golang.org/x/text/secure/bidirule/bidirule10.0.0.go +11 -0
  290. slidge_whatsapp/vendor/golang.org/x/text/secure/bidirule/bidirule9.0.0.go +14 -0
  291. slidge_whatsapp/vendor/golang.org/x/text/transform/transform.go +709 -0
  292. slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/bidi.go +359 -0
  293. slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/bracket.go +335 -0
  294. slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/core.go +1071 -0
  295. slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/prop.go +206 -0
  296. slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/tables10.0.0.go +1815 -0
  297. slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/tables11.0.0.go +1887 -0
  298. slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/tables12.0.0.go +1923 -0
  299. slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/tables13.0.0.go +1955 -0
  300. slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/tables15.0.0.go +2042 -0
  301. slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/tables9.0.0.go +1781 -0
  302. slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/trieval.go +48 -0
  303. slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/composition.go +512 -0
  304. slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/forminfo.go +279 -0
  305. slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/input.go +109 -0
  306. slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/iter.go +458 -0
  307. slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/normalize.go +610 -0
  308. slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/readwriter.go +125 -0
  309. slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/tables10.0.0.go +7657 -0
  310. slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/tables11.0.0.go +7693 -0
  311. slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/tables12.0.0.go +7710 -0
  312. slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/tables13.0.0.go +7760 -0
  313. slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/tables15.0.0.go +7907 -0
  314. slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/tables9.0.0.go +7637 -0
  315. slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/transform.go +88 -0
  316. slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/trie.go +54 -0
  317. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb +0 -0
  318. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/filedesc/editions.go +3 -0
  319. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go +16 -0
  320. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/strs/{strings_unsafe_go121.go → strings_unsafe.go} +0 -2
  321. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/version/version.go +1 -1
  322. slidge_whatsapp/vendor/google.golang.org/protobuf/proto/merge.go +6 -0
  323. slidge_whatsapp/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go +2 -0
  324. slidge_whatsapp/vendor/google.golang.org/protobuf/reflect/protoreflect/{value_unsafe_go121.go → value_unsafe.go} +0 -2
  325. slidge_whatsapp/vendor/modules.txt +52 -13
  326. {slidge_whatsapp-0.2.5.dist-info → slidge_whatsapp-0.2.7.dist-info}/METADATA +1 -1
  327. {slidge_whatsapp-0.2.5.dist-info → slidge_whatsapp-0.2.7.dist-info}/RECORD +330 -184
  328. {slidge_whatsapp-0.2.5.dist-info → slidge_whatsapp-0.2.7.dist-info}/WHEEL +1 -1
  329. slidge_whatsapp/vendor/github.com/rs/zerolog/CNAME +0 -1
  330. slidge_whatsapp/vendor/github.com/rs/zerolog/_config.yml +0 -1
  331. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waAdv/WAAdv.pb.raw +0 -0
  332. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waArmadilloApplication/WAArmadilloApplication.pb.raw +0 -0
  333. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waArmadilloXMA/WAArmadilloXMA.pb.raw +0 -0
  334. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCert/WACert.pb.raw +0 -23
  335. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waChatLockSettings/WAProtobufsChatLockSettings.pb.raw +0 -7
  336. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCommon/WACommon.pb.raw +0 -0
  337. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCompanionReg/WAWebProtobufsCompanionReg.pb.raw +0 -0
  338. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waConsumerApplication/WAConsumerApplication.pb.raw +0 -0
  339. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waDeviceCapabilities/WAProtobufsDeviceCapabilities.pb.raw +0 -0
  340. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waE2E/WAWebProtobufsE2E.pb.raw +0 -0
  341. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waHistorySync/WAWebProtobufsHistorySync.pb.raw +0 -0
  342. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMediaTransport/WAMediaTransport.pb.raw +0 -0
  343. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMmsRetry/WAMmsRetry.pb.raw +0 -0
  344. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMsgApplication/WAMsgApplication.pb.raw +0 -0
  345. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMsgTransport/WAMsgTransport.pb.raw +0 -0
  346. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMultiDevice/WAMultiDevice.pb.raw +0 -0
  347. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waServerSync/WAServerSync.pb.raw +0 -0
  348. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waSyncAction/WASyncAction.pb.raw +0 -0
  349. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waUserPassword/WAProtobufsUserPassword.pb.raw +0 -0
  350. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waVnameCert/WAWebProtobufsVnameCert.pb.raw +0 -0
  351. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWa6/WAWebProtobufsWa6.pb.raw +0 -0
  352. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWeb/WAWebProtobufsWeb.pb.raw +0 -0
  353. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrade.go +0 -296
  354. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe_go120.go +0 -94
  355. slidge_whatsapp/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go120.go +0 -98
  356. {slidge_whatsapp-0.2.5.dist-info → slidge_whatsapp-0.2.7.dist-info}/LICENSE +0 -0
  357. {slidge_whatsapp-0.2.5.dist-info → slidge_whatsapp-0.2.7.dist-info}/entry_points.txt +0 -0
@@ -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.49.1"
151
+ #define SQLITE_VERSION_NUMBER 3049001
152
+ #define SQLITE_SOURCE_ID "2025-02-18 13:38:58 873d4e274b4988d260ba8354a9718324a1c26187a4ab4c1cc0227c03d0f10e70"
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
@@ -1245,6 +1259,7 @@ struct sqlite3_io_methods {
1245
1259
  #define SQLITE_FCNTL_EXTERNAL_READER 40
1246
1260
  #define SQLITE_FCNTL_CKSM_FILE 41
1247
1261
  #define SQLITE_FCNTL_RESET_CACHE 42
1262
+ #define SQLITE_FCNTL_NULL_IO 43
1248
1263
 
1249
1264
  /* deprecated names */
1250
1265
  #define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE
@@ -2197,7 +2212,15 @@ struct sqlite3_mem_methods {
2197
2212
  ** CAPI3REF: Database Connection Configuration Options
2198
2213
  **
2199
2214
  ** These constants are the available integer configuration options that
2200
- ** can be passed as the second argument to the [sqlite3_db_config()] interface.
2215
+ ** can be passed as the second parameter to the [sqlite3_db_config()] interface.
2216
+ **
2217
+ ** The [sqlite3_db_config()] interface is a var-args functions. It takes a
2218
+ ** variable number of parameters, though always at least two. The number of
2219
+ ** parameters passed into sqlite3_db_config() depends on which of these
2220
+ ** constants is given as the second parameter. This documentation page
2221
+ ** refers to parameters beyond the second as "arguments". Thus, when this
2222
+ ** page says "the N-th argument" it means "the N-th parameter past the
2223
+ ** configuration option" or "the (N+2)-th parameter to sqlite3_db_config()".
2201
2224
  **
2202
2225
  ** New configuration options may be added in future releases of SQLite.
2203
2226
  ** Existing configuration options might be discontinued. Applications
@@ -2209,8 +2232,14 @@ struct sqlite3_mem_methods {
2209
2232
  ** <dl>
2210
2233
  ** [[SQLITE_DBCONFIG_LOOKASIDE]]
2211
2234
  ** <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].
2235
+ ** <dd> The SQLITE_DBCONFIG_LOOKASIDE option is used to adjust the
2236
+ ** configuration of the lookaside memory allocator within a database
2237
+ ** connection.
2238
+ ** The arguments to the SQLITE_DBCONFIG_LOOKASIDE option are <i>not</i>
2239
+ ** in the [DBCONFIG arguments|usual format].
2240
+ ** The SQLITE_DBCONFIG_LOOKASIDE option takes three arguments, not two,
2241
+ ** so that a call to [sqlite3_db_config()] that uses SQLITE_DBCONFIG_LOOKASIDE
2242
+ ** should have a total of five parameters.
2214
2243
  ** ^The first argument (the third parameter to [sqlite3_db_config()] is a
2215
2244
  ** pointer to a memory buffer to use for lookaside memory.
2216
2245
  ** ^The first argument after the SQLITE_DBCONFIG_LOOKASIDE verb
@@ -2233,7 +2262,8 @@ struct sqlite3_mem_methods {
2233
2262
  ** [[SQLITE_DBCONFIG_ENABLE_FKEY]]
2234
2263
  ** <dt>SQLITE_DBCONFIG_ENABLE_FKEY</dt>
2235
2264
  ** <dd> ^This option is used to enable or disable the enforcement of
2236
- ** [foreign key constraints]. There should be two additional arguments.
2265
+ ** [foreign key constraints]. This is the same setting that is
2266
+ ** enabled or disabled by the [PRAGMA foreign_keys] statement.
2237
2267
  ** The first argument is an integer which is 0 to disable FK enforcement,
2238
2268
  ** positive to enable FK enforcement or negative to leave FK enforcement
2239
2269
  ** unchanged. The second parameter is a pointer to an integer into which
@@ -2255,13 +2285,13 @@ struct sqlite3_mem_methods {
2255
2285
  ** <p>Originally this option disabled all triggers. ^(However, since
2256
2286
  ** SQLite version 3.35.0, TEMP triggers are still allowed even if
2257
2287
  ** 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
2288
+ ** triggers in the main database schema or in the schemas of [ATTACH]-ed
2259
2289
  ** databases.)^ </dd>
2260
2290
  **
2261
2291
  ** [[SQLITE_DBCONFIG_ENABLE_VIEW]]
2262
2292
  ** <dt>SQLITE_DBCONFIG_ENABLE_VIEW</dt>
2263
2293
  ** <dd> ^This option is used to enable or disable [CREATE VIEW | views].
2264
- ** There should be two additional arguments.
2294
+ ** There must be two additional arguments.
2265
2295
  ** The first argument is an integer which is 0 to disable views,
2266
2296
  ** positive to enable views or negative to leave the setting unchanged.
2267
2297
  ** The second parameter is a pointer to an integer into which
@@ -2280,7 +2310,7 @@ struct sqlite3_mem_methods {
2280
2310
  ** <dd> ^This option is used to enable or disable the
2281
2311
  ** [fts3_tokenizer()] function which is part of the
2282
2312
  ** [FTS3] full-text search engine extension.
2283
- ** There should be two additional arguments.
2313
+ ** There must be two additional arguments.
2284
2314
  ** The first argument is an integer which is 0 to disable fts3_tokenizer() or
2285
2315
  ** positive to enable fts3_tokenizer() or negative to leave the setting
2286
2316
  ** unchanged.
@@ -2295,7 +2325,7 @@ struct sqlite3_mem_methods {
2295
2325
  ** interface independently of the [load_extension()] SQL function.
2296
2326
  ** The [sqlite3_enable_load_extension()] API enables or disables both the
2297
2327
  ** C-API [sqlite3_load_extension()] and the SQL function [load_extension()].
2298
- ** There should be two additional arguments.
2328
+ ** There must be two additional arguments.
2299
2329
  ** When the first argument to this interface is 1, then only the C-API is
2300
2330
  ** enabled and the SQL function remains disabled. If the first argument to
2301
2331
  ** this interface is 0, then both the C-API and the SQL function are disabled.
@@ -2309,23 +2339,30 @@ struct sqlite3_mem_methods {
2309
2339
  **
2310
2340
  ** [[SQLITE_DBCONFIG_MAINDBNAME]] <dt>SQLITE_DBCONFIG_MAINDBNAME</dt>
2311
2341
  ** <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.
2342
+ ** schema. This option does not follow the
2343
+ ** [DBCONFIG arguments|usual SQLITE_DBCONFIG argument format].
2344
+ ** This option takes exactly one additional argument so that the
2345
+ ** [sqlite3_db_config()] call has a total of three parameters. The
2346
+ ** extra argument must be a pointer to a constant UTF8 string which
2347
+ ** will become the new schema name in place of "main". ^SQLite does
2348
+ ** not make a copy of the new main schema name string, so the application
2349
+ ** must ensure that the argument passed into SQLITE_DBCONFIG MAINDBNAME
2350
+ ** is unchanged until after the database connection closes.
2317
2351
  ** </dd>
2318
2352
  **
2319
2353
  ** [[SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE]]
2320
2354
  ** <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
2355
+ ** <dd> Usually, when a database in [WAL mode] is closed or detached from a
2356
+ ** database handle, SQLite checks if if there are other connections to the
2357
+ ** same database, and if there are no other database connection (if the
2358
+ ** connection being closed is the last open connection to the database),
2359
+ ** then SQLite performs a [checkpoint] before closing the connection and
2360
+ ** deletes the WAL file. The SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE option can
2361
+ ** be used to override that behavior. The first argument passed to this
2362
+ ** operation (the third parameter to [sqlite3_db_config()]) is an integer
2363
+ ** which is positive to disable checkpoints-on-close, or zero (the default)
2364
+ ** to enable them, and negative to leave the setting unchanged.
2365
+ ** The second argument (the fourth parameter) is a pointer to an integer
2329
2366
  ** into which is written 0 or 1 to indicate whether checkpoints-on-close
2330
2367
  ** have been disabled - 0 if they are not disabled, 1 if they are.
2331
2368
  ** </dd>
@@ -2486,7 +2523,7 @@ struct sqlite3_mem_methods {
2486
2523
  ** statistics. For statistics to be collected, the flag must be set on
2487
2524
  ** the database handle both when the SQL statement is prepared and when it
2488
2525
  ** 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
2526
+ ** by default. <p>This option takes two arguments: an integer and a pointer to
2490
2527
  ** an integer.. The first argument is 1, 0, or -1 to enable, disable, or
2491
2528
  ** leave unchanged the statement scanstatus option. If the second argument
2492
2529
  ** is not NULL, then the value of the statement scanstatus setting after
@@ -2500,7 +2537,7 @@ struct sqlite3_mem_methods {
2500
2537
  ** in which tables and indexes are scanned so that the scans start at the end
2501
2538
  ** and work toward the beginning rather than starting at the beginning and
2502
2539
  ** working toward the end. Setting SQLITE_DBCONFIG_REVERSE_SCANORDER is the
2503
- ** same as setting [PRAGMA reverse_unordered_selects]. This option takes
2540
+ ** same as setting [PRAGMA reverse_unordered_selects]. <p>This option takes
2504
2541
  ** two arguments which are an integer and a pointer to an integer. The first
2505
2542
  ** argument is 1, 0, or -1 to enable, disable, or leave unchanged the
2506
2543
  ** reverse scan order flag, respectively. If the second argument is not NULL,
@@ -2509,7 +2546,76 @@ struct sqlite3_mem_methods {
2509
2546
  ** first argument.
2510
2547
  ** </dd>
2511
2548
  **
2549
+ ** [[SQLITE_DBCONFIG_ENABLE_ATTACH_CREATE]]
2550
+ ** <dt>SQLITE_DBCONFIG_ENABLE_ATTACH_CREATE</dt>
2551
+ ** <dd>The SQLITE_DBCONFIG_ENABLE_ATTACH_CREATE option enables or disables
2552
+ ** the ability of the [ATTACH DATABASE] SQL command to create a new database
2553
+ ** file if the database filed named in the ATTACH command does not already
2554
+ ** exist. This ability of ATTACH to create a new database is enabled by
2555
+ ** default. Applications can disable or reenable the ability for ATTACH to
2556
+ ** create new database files using this DBCONFIG option.<p>
2557
+ ** This option takes two arguments which are an integer and a pointer
2558
+ ** to an integer. The first argument is 1, 0, or -1 to enable, disable, or
2559
+ ** leave unchanged the attach-create flag, respectively. If the second
2560
+ ** argument is not NULL, then 0 or 1 is written into the integer that the
2561
+ ** second argument points to depending on if the attach-create flag is set
2562
+ ** after processing the first argument.
2563
+ ** </dd>
2564
+ **
2565
+ ** [[SQLITE_DBCONFIG_ENABLE_ATTACH_WRITE]]
2566
+ ** <dt>SQLITE_DBCONFIG_ENABLE_ATTACH_WRITE</dt>
2567
+ ** <dd>The SQLITE_DBCONFIG_ENABLE_ATTACH_WRITE option enables or disables the
2568
+ ** ability of the [ATTACH DATABASE] SQL command to open a database for writing.
2569
+ ** This capability is enabled by default. Applications can disable or
2570
+ ** reenable this capability using the current DBCONFIG option. If the
2571
+ ** the this capability is disabled, the [ATTACH] command will still work,
2572
+ ** but the database will be opened read-only. If this option is disabled,
2573
+ ** then the ability to create a new database using [ATTACH] is also disabled,
2574
+ ** regardless of the value of the [SQLITE_DBCONFIG_ENABLE_ATTACH_CREATE]
2575
+ ** option.<p>
2576
+ ** This option takes two arguments which are an integer and a pointer
2577
+ ** to an integer. The first argument is 1, 0, or -1 to enable, disable, or
2578
+ ** leave unchanged the ability to ATTACH another database for writing,
2579
+ ** respectively. If the second argument is not NULL, then 0 or 1 is written
2580
+ ** into the integer to which the second argument points, depending on whether
2581
+ ** the ability to ATTACH a read/write database is enabled or disabled
2582
+ ** after processing the first argument.
2583
+ ** </dd>
2584
+ **
2585
+ ** [[SQLITE_DBCONFIG_ENABLE_COMMENTS]]
2586
+ ** <dt>SQLITE_DBCONFIG_ENABLE_COMMENTS</dt>
2587
+ ** <dd>The SQLITE_DBCONFIG_ENABLE_COMMENTS option enables or disables the
2588
+ ** ability to include comments in SQL text. Comments are enabled by default.
2589
+ ** An application can disable or reenable comments in SQL text using this
2590
+ ** DBCONFIG option.<p>
2591
+ ** This option takes two arguments which are an integer and a pointer
2592
+ ** to an integer. The first argument is 1, 0, or -1 to enable, disable, or
2593
+ ** leave unchanged the ability to use comments in SQL text,
2594
+ ** respectively. If the second argument is not NULL, then 0 or 1 is written
2595
+ ** into the integer that the second argument points to depending on if
2596
+ ** comments are allowed in SQL text after processing the first argument.
2597
+ ** </dd>
2598
+ **
2512
2599
  ** </dl>
2600
+ **
2601
+ ** [[DBCONFIG arguments]] <h3>Arguments To SQLITE_DBCONFIG Options</h3>
2602
+ **
2603
+ ** <p>Most of the SQLITE_DBCONFIG options take two arguments, so that the
2604
+ ** overall call to [sqlite3_db_config()] has a total of four parameters.
2605
+ ** The first argument (the third parameter to sqlite3_db_config()) is a integer.
2606
+ ** The second argument is a pointer to an integer. If the first argument is 1,
2607
+ ** then the option becomes enabled. If the first integer argument is 0, then the
2608
+ ** option is disabled. If the first argument is -1, then the option setting
2609
+ ** is unchanged. The second argument, the pointer to an integer, may be NULL.
2610
+ ** If the second argument is not NULL, then a value of 0 or 1 is written into
2611
+ ** the integer to which the second argument points, depending on whether the
2612
+ ** setting is disabled or enabled after applying any changes specified by
2613
+ ** the first argument.
2614
+ **
2615
+ ** <p>While most SQLITE_DBCONFIG options use the argument format
2616
+ ** described in the previous paragraph, the [SQLITE_DBCONFIG_MAINDBNAME]
2617
+ ** and [SQLITE_DBCONFIG_LOOKASIDE] options are different. See the
2618
+ ** documentation of those exceptional options for details.
2513
2619
  */
2514
2620
  #define SQLITE_DBCONFIG_MAINDBNAME 1000 /* const char* */
2515
2621
  #define SQLITE_DBCONFIG_LOOKASIDE 1001 /* void* int int */
@@ -2531,7 +2637,10 @@ struct sqlite3_mem_methods {
2531
2637
  #define SQLITE_DBCONFIG_TRUSTED_SCHEMA 1017 /* int int* */
2532
2638
  #define SQLITE_DBCONFIG_STMT_SCANSTATUS 1018 /* int int* */
2533
2639
  #define SQLITE_DBCONFIG_REVERSE_SCANORDER 1019 /* int int* */
2534
- #define SQLITE_DBCONFIG_MAX 1019 /* Largest DBCONFIG */
2640
+ #define SQLITE_DBCONFIG_ENABLE_ATTACH_CREATE 1020 /* int int* */
2641
+ #define SQLITE_DBCONFIG_ENABLE_ATTACH_WRITE 1021 /* int int* */
2642
+ #define SQLITE_DBCONFIG_ENABLE_COMMENTS 1022 /* int int* */
2643
+ #define SQLITE_DBCONFIG_MAX 1022 /* Largest DBCONFIG */
2535
2644
 
2536
2645
  /*
2537
2646
  ** CAPI3REF: Enable Or Disable Extended Result Codes
@@ -2623,10 +2732,14 @@ SQLITE_API void sqlite3_set_last_insert_rowid(sqlite3*,sqlite3_int64);
2623
2732
  ** deleted by the most recently completed INSERT, UPDATE or DELETE
2624
2733
  ** statement on the database connection specified by the only parameter.
2625
2734
  ** 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
2735
+ ** and that if the number of rows modified by the most recent INSERT, UPDATE,
2627
2736
  ** or DELETE is greater than the maximum value supported by type "int", then
2628
2737
  ** the return value of sqlite3_changes() is undefined. ^Executing any other
2629
2738
  ** type of SQL statement does not modify the value returned by these functions.
2739
+ ** For the purposes of this interface, a CREATE TABLE AS SELECT statement
2740
+ ** does not count as an INSERT, UPDATE or DELETE statement and hence the rows
2741
+ ** added to the new table by the CREATE TABLE AS SELECT statement are not
2742
+ ** counted.
2630
2743
  **
2631
2744
  ** ^Only changes made directly by the INSERT, UPDATE or DELETE statement are
2632
2745
  ** considered - auxiliary changes caused by [CREATE TRIGGER | triggers],
@@ -3571,8 +3684,8 @@ SQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);
3571
3684
  **
3572
3685
  ** [[OPEN_EXRESCODE]] ^(<dt>[SQLITE_OPEN_EXRESCODE]</dt>
3573
3686
  ** <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
3687
+ ** In other words, the database behaves as if
3688
+ ** [sqlite3_extended_result_codes(db,1)] were called on the database
3576
3689
  ** connection as soon as the connection is created. In addition to setting
3577
3690
  ** the extended result code mode, this flag also causes [sqlite3_open_v2()]
3578
3691
  ** to return an extended result code.</dd>
@@ -4186,11 +4299,22 @@ SQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal);
4186
4299
  ** <dd>The SQLITE_PREPARE_NO_VTAB flag causes the SQL compiler
4187
4300
  ** to return an error (error code SQLITE_ERROR) if the statement uses
4188
4301
  ** any virtual tables.
4302
+ **
4303
+ ** [[SQLITE_PREPARE_DONT_LOG]] <dt>SQLITE_PREPARE_DONT_LOG</dt>
4304
+ ** <dd>The SQLITE_PREPARE_DONT_LOG flag prevents SQL compiler
4305
+ ** errors from being sent to the error log defined by
4306
+ ** [SQLITE_CONFIG_LOG]. This can be used, for example, to do test
4307
+ ** compiles to see if some SQL syntax is well-formed, without generating
4308
+ ** messages on the global error log when it is not. If the test compile
4309
+ ** fails, the sqlite3_prepare_v3() call returns the same error indications
4310
+ ** with or without this flag; it just omits the call to [sqlite3_log()] that
4311
+ ** logs the error.
4189
4312
  ** </dl>
4190
4313
  */
4191
4314
  #define SQLITE_PREPARE_PERSISTENT 0x01
4192
4315
  #define SQLITE_PREPARE_NORMALIZE 0x02
4193
4316
  #define SQLITE_PREPARE_NO_VTAB 0x04
4317
+ #define SQLITE_PREPARE_DONT_LOG 0x10
4194
4318
 
4195
4319
  /*
4196
4320
  ** CAPI3REF: Compiling An SQL Statement
@@ -4223,13 +4347,17 @@ SQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal);
4223
4347
  ** and sqlite3_prepare16_v3() use UTF-16.
4224
4348
  **
4225
4349
  ** ^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
4350
+ ** first zero terminator. ^If nByte is positive, then it is the maximum
4351
+ ** number of bytes read from zSql. When nByte is positive, zSql is read
4352
+ ** up to the first zero terminator or until the nByte bytes have been read,
4353
+ ** whichever comes first. ^If nByte is zero, then no prepared
4228
4354
  ** statement is generated.
4229
4355
  ** If the caller knows that the supplied string is nul-terminated, then
4230
4356
  ** there is a small performance advantage to passing an nByte parameter that
4231
4357
  ** is the number of bytes in the input string <i>including</i>
4232
4358
  ** the nul-terminator.
4359
+ ** Note that nByte measure the length of the input in bytes, not
4360
+ ** characters, even for the UTF-16 interfaces.
4233
4361
  **
4234
4362
  ** ^If pzTail is not NULL then *pzTail is made to point to the first byte
4235
4363
  ** past the end of the first SQL statement in zSql. These routines only
@@ -5600,7 +5728,7 @@ SQLITE_API int sqlite3_create_window_function(
5600
5728
  ** This flag instructs SQLite to omit some corner-case optimizations that
5601
5729
  ** might disrupt the operation of the [sqlite3_value_subtype()] function,
5602
5730
  ** causing it to return zero rather than the correct subtype().
5603
- ** SQL functions that invokes [sqlite3_value_subtype()] should have this
5731
+ ** All SQL functions that invoke [sqlite3_value_subtype()] should have this
5604
5732
  ** property. If the SQLITE_SUBTYPE property is omitted, then the return
5605
5733
  ** value from [sqlite3_value_subtype()] might sometimes be zero even though
5606
5734
  ** a non-zero subtype was specified by the function argument expression.
@@ -5616,6 +5744,15 @@ SQLITE_API int sqlite3_create_window_function(
5616
5744
  ** [sqlite3_result_subtype()] should avoid setting this property, as the
5617
5745
  ** purpose of this property is to disable certain optimizations that are
5618
5746
  ** incompatible with subtypes.
5747
+ **
5748
+ ** [[SQLITE_SELFORDER1]] <dt>SQLITE_SELFORDER1</dt><dd>
5749
+ ** The SQLITE_SELFORDER1 flag indicates that the function is an aggregate
5750
+ ** that internally orders the values provided to the first argument. The
5751
+ ** ordered-set aggregate SQL notation with a single ORDER BY term can be
5752
+ ** used to invoke this function. If the ordered-set aggregate notation is
5753
+ ** used on a function that lacks this flag, then an error is raised. Note
5754
+ ** that the ordered-set aggregate syntax is only available if SQLite is
5755
+ ** built using the -DSQLITE_ENABLE_ORDERED_SET_AGGREGATES compile-time option.
5619
5756
  ** </dd>
5620
5757
  ** </dl>
5621
5758
  */
@@ -5624,6 +5761,7 @@ SQLITE_API int sqlite3_create_window_function(
5624
5761
  #define SQLITE_SUBTYPE 0x000100000
5625
5762
  #define SQLITE_INNOCUOUS 0x000200000
5626
5763
  #define SQLITE_RESULT_SUBTYPE 0x001000000
5764
+ #define SQLITE_SELFORDER1 0x002000000
5627
5765
 
5628
5766
  /*
5629
5767
  ** CAPI3REF: Deprecated Functions
@@ -5821,7 +5959,7 @@ SQLITE_API int sqlite3_value_encoding(sqlite3_value*);
5821
5959
  ** one SQL function to another. Use the [sqlite3_result_subtype()]
5822
5960
  ** routine to set the subtype for the return value of an SQL function.
5823
5961
  **
5824
- ** Every [application-defined SQL function] that invoke this interface
5962
+ ** Every [application-defined SQL function] that invokes this interface
5825
5963
  ** should include the [SQLITE_SUBTYPE] property in the text
5826
5964
  ** encoding argument when the function is [sqlite3_create_function|registered].
5827
5965
  ** If the [SQLITE_SUBTYPE] property is omitted, then sqlite3_value_subtype()
@@ -7428,9 +7566,11 @@ struct sqlite3_module {
7428
7566
  ** will be returned by the strategy.
7429
7567
  **
7430
7568
  ** 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.
7569
+ ** mask of SQLITE_INDEX_SCAN_* flags. One such flag is
7570
+ ** [SQLITE_INDEX_SCAN_HEX], which if set causes the [EXPLAIN QUERY PLAN]
7571
+ ** output to show the idxNum has hex instead of as decimal. Another flag is
7572
+ ** SQLITE_INDEX_SCAN_UNIQUE, which if set indicates that the query plan will
7573
+ ** return at most one row.
7434
7574
  **
7435
7575
  ** Additionally, if xBestIndex sets the SQLITE_INDEX_SCAN_UNIQUE flag, then
7436
7576
  ** SQLite also assumes that if a call to the xUpdate() method is made as
@@ -7494,7 +7634,9 @@ struct sqlite3_index_info {
7494
7634
  ** [sqlite3_index_info].idxFlags field to some combination of
7495
7635
  ** these bits.
7496
7636
  */
7497
- #define SQLITE_INDEX_SCAN_UNIQUE 1 /* Scan visits at most 1 row */
7637
+ #define SQLITE_INDEX_SCAN_UNIQUE 0x00000001 /* Scan visits at most 1 row */
7638
+ #define SQLITE_INDEX_SCAN_HEX 0x00000002 /* Display idxNum as hex */
7639
+ /* in EXPLAIN QUERY PLAN */
7498
7640
 
7499
7641
  /*
7500
7642
  ** CAPI3REF: Virtual Table Constraint Operator Codes
@@ -8331,6 +8473,7 @@ SQLITE_API int sqlite3_test_control(int op, ...);
8331
8473
  #define SQLITE_TESTCTRL_JSON_SELFCHECK 14
8332
8474
  #define SQLITE_TESTCTRL_OPTIMIZATIONS 15
8333
8475
  #define SQLITE_TESTCTRL_ISKEYWORD 16 /* NOT USED */
8476
+ #define SQLITE_TESTCTRL_GETOPT 16
8334
8477
  #define SQLITE_TESTCTRL_SCRATCHMALLOC 17 /* NOT USED */
8335
8478
  #define SQLITE_TESTCTRL_INTERNAL_FUNCTIONS 17
8336
8479
  #define SQLITE_TESTCTRL_LOCALTIME_FAULT 18
@@ -8350,7 +8493,7 @@ SQLITE_API int sqlite3_test_control(int op, ...);
8350
8493
  #define SQLITE_TESTCTRL_TRACEFLAGS 31
8351
8494
  #define SQLITE_TESTCTRL_TUNE 32
8352
8495
  #define SQLITE_TESTCTRL_LOGEST 33
8353
- #define SQLITE_TESTCTRL_USELONGDOUBLE 34
8496
+ #define SQLITE_TESTCTRL_USELONGDOUBLE 34 /* NOT USED */
8354
8497
  #define SQLITE_TESTCTRL_LAST 34 /* Largest TESTCTRL */
8355
8498
 
8356
8499
  /*
@@ -9326,6 +9469,16 @@ typedef struct sqlite3_backup sqlite3_backup;
9326
9469
  ** APIs are not strictly speaking threadsafe. If they are invoked at the
9327
9470
  ** same time as another thread is invoking sqlite3_backup_step() it is
9328
9471
  ** possible that they return invalid values.
9472
+ **
9473
+ ** <b>Alternatives To Using The Backup API</b>
9474
+ **
9475
+ ** Other techniques for safely creating a consistent backup of an SQLite
9476
+ ** database include:
9477
+ **
9478
+ ** <ul>
9479
+ ** <li> The [VACUUM INTO] command.
9480
+ ** <li> The [sqlite3_rsync] utility program.
9481
+ ** </ul>
9329
9482
  */
9330
9483
  SQLITE_API sqlite3_backup *sqlite3_backup_init(
9331
9484
  sqlite3 *pDest, /* Destination database handle */
@@ -10525,6 +10678,14 @@ typedef struct sqlite3_snapshot {
10525
10678
  ** If there is not already a read-transaction open on schema S when
10526
10679
  ** this function is called, one is opened automatically.
10527
10680
  **
10681
+ ** If a read-transaction is opened by this function, then it is guaranteed
10682
+ ** that the returned snapshot object may not be invalidated by a database
10683
+ ** writer or checkpointer until after the read-transaction is closed. This
10684
+ ** is not guaranteed if a read-transaction is already open when this
10685
+ ** function is called. In that case, any subsequent write or checkpoint
10686
+ ** operation on the database may invalidate the returned snapshot handle,
10687
+ ** even while the read-transaction remains open.
10688
+ **
10528
10689
  ** The following must be true for this function to succeed. If any of
10529
10690
  ** the following statements are false when sqlite3_snapshot_get() is
10530
10691
  ** called, SQLITE_ERROR is returned. The final value of *P is undefined
@@ -10682,8 +10843,9 @@ SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_recover(sqlite3 *db, const c
10682
10843
  /*
10683
10844
  ** CAPI3REF: Serialize a database
10684
10845
  **
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.
10846
+ ** The sqlite3_serialize(D,S,P,F) interface returns a pointer to
10847
+ ** memory that is a serialization of the S database on
10848
+ ** [database connection] D. If S is a NULL pointer, the main database is used.
10687
10849
  ** If P is not a NULL pointer, then the size of the database in bytes
10688
10850
  ** is written into *P.
10689
10851
  **
@@ -10833,8 +10995,6 @@ SQLITE_API int sqlite3_deserialize(
10833
10995
  #if defined(__wasi__)
10834
10996
  # undef SQLITE_WASI
10835
10997
  # define SQLITE_WASI 1
10836
- # undef SQLITE_OMIT_WAL
10837
- # define SQLITE_OMIT_WAL 1/* because it requires shared memory APIs */
10838
10998
  # ifndef SQLITE_OMIT_LOAD_EXTENSION
10839
10999
  # define SQLITE_OMIT_LOAD_EXTENSION
10840
11000
  # endif
@@ -10846,7 +11006,7 @@ SQLITE_API int sqlite3_deserialize(
10846
11006
  #ifdef __cplusplus
10847
11007
  } /* End of the 'extern "C"' block */
10848
11008
  #endif
10849
- #endif /* SQLITE3_H */
11009
+ /* #endif for SQLITE3_H will be added by mksqlite3.tcl */
10850
11010
 
10851
11011
  /******** Begin file sqlite3rtree.h *********/
10852
11012
  /*
@@ -13037,6 +13197,10 @@ struct Fts5PhraseIter {
13037
13197
  ** (i.e. if it is a contentless table), then this API always iterates
13038
13198
  ** through an empty set (all calls to xPhraseFirst() set iCol to -1).
13039
13199
  **
13200
+ ** In all cases, matches are visited in (column ASC, offset ASC) order.
13201
+ ** i.e. all those in column 0, sorted by offset, followed by those in
13202
+ ** column 1, etc.
13203
+ **
13040
13204
  ** xPhraseNext()
13041
13205
  ** See xPhraseFirst above.
13042
13206
  **
@@ -13093,19 +13257,57 @@ struct Fts5PhraseIter {
13093
13257
  ** value returned by xInstCount(), SQLITE_RANGE is returned. Otherwise,
13094
13258
  ** output variable (*ppToken) is set to point to a buffer containing the
13095
13259
  ** 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.
13260
+ ** bytes.
13099
13261
  **
13100
13262
  ** The output text is not a copy of the document text that was tokenized.
13101
13263
  ** It is the output of the tokenizer module. For tokendata=1 tables, this
13102
13264
  ** includes any embedded 0x00 and trailing data.
13103
13265
  **
13266
+ ** This API may be slow in some cases if the token identified by parameters
13267
+ ** iIdx and iToken matched a prefix token in the query. In most cases, the
13268
+ ** first call to this API for each prefix token in the query is forced
13269
+ ** to scan the portion of the full-text index that matches the prefix
13270
+ ** token to collect the extra data required by this API. If the prefix
13271
+ ** token matches a large number of token instances in the document set,
13272
+ ** this may be a performance problem.
13273
+ **
13274
+ ** If the user knows in advance that a query may use this API for a
13275
+ ** prefix token, FTS5 may be configured to collect all required data as part
13276
+ ** of the initial querying of the full-text index, avoiding the second scan
13277
+ ** entirely. This also causes prefix queries that do not use this API to
13278
+ ** run more slowly and use more memory. FTS5 may be configured in this way
13279
+ ** either on a per-table basis using the [FTS5 insttoken | 'insttoken']
13280
+ ** option, or on a per-query basis using the
13281
+ ** [fts5_insttoken | fts5_insttoken()] user function.
13282
+ **
13104
13283
  ** This API can be quite slow if used with an FTS5 table created with the
13105
13284
  ** "detail=none" or "detail=column" option.
13285
+ **
13286
+ ** xColumnLocale(pFts5, iIdx, pzLocale, pnLocale)
13287
+ ** If parameter iCol is less than zero, or greater than or equal to the
13288
+ ** number of columns in the table, SQLITE_RANGE is returned.
13289
+ **
13290
+ ** Otherwise, this function attempts to retrieve the locale associated
13291
+ ** with column iCol of the current row. Usually, there is no associated
13292
+ ** locale, and output parameters (*pzLocale) and (*pnLocale) are set
13293
+ ** to NULL and 0, respectively. However, if the fts5_locale() function
13294
+ ** was used to associate a locale with the value when it was inserted
13295
+ ** into the fts5 table, then (*pzLocale) is set to point to a nul-terminated
13296
+ ** buffer containing the name of the locale in utf-8 encoding. (*pnLocale)
13297
+ ** is set to the size in bytes of the buffer, not including the
13298
+ ** nul-terminator.
13299
+ **
13300
+ ** If successful, SQLITE_OK is returned. Or, if an error occurs, an
13301
+ ** SQLite error code is returned. The final value of the output parameters
13302
+ ** is undefined in this case.
13303
+ **
13304
+ ** xTokenize_v2:
13305
+ ** Tokenize text using the tokenizer belonging to the FTS5 table. This
13306
+ ** API is the same as the xTokenize() API, except that it allows a tokenizer
13307
+ ** locale to be specified.
13106
13308
  */
13107
13309
  struct Fts5ExtensionApi {
13108
- int iVersion; /* Currently always set to 3 */
13310
+ int iVersion; /* Currently always set to 4 */
13109
13311
 
13110
13312
  void *(*xUserData)(Fts5Context*);
13111
13313
 
@@ -13147,6 +13349,15 @@ struct Fts5ExtensionApi {
13147
13349
  const char **ppToken, int *pnToken
13148
13350
  );
13149
13351
  int (*xInstToken)(Fts5Context*, int iIdx, int iToken, const char**, int*);
13352
+
13353
+ /* Below this point are iVersion>=4 only */
13354
+ int (*xColumnLocale)(Fts5Context*, int iCol, const char **pz, int *pn);
13355
+ int (*xTokenize_v2)(Fts5Context*,
13356
+ const char *pText, int nText, /* Text to tokenize */
13357
+ const char *pLocale, int nLocale, /* Locale to pass to tokenizer */
13358
+ void *pCtx, /* Context passed to xToken() */
13359
+ int (*xToken)(void*, int, const char*, int, int, int) /* Callback */
13360
+ );
13150
13361
  };
13151
13362
 
13152
13363
  /*
@@ -13167,7 +13378,7 @@ struct Fts5ExtensionApi {
13167
13378
  ** A tokenizer instance is required to actually tokenize text.
13168
13379
  **
13169
13380
  ** The first argument passed to this function is a copy of the (void*)
13170
- ** pointer provided by the application when the fts5_tokenizer object
13381
+ ** pointer provided by the application when the fts5_tokenizer_v2 object
13171
13382
  ** was registered with FTS5 (the third argument to xCreateTokenizer()).
13172
13383
  ** The second and third arguments are an array of nul-terminated strings
13173
13384
  ** containing the tokenizer arguments, if any, specified following the
@@ -13191,7 +13402,7 @@ struct Fts5ExtensionApi {
13191
13402
  ** argument passed to this function is a pointer to an Fts5Tokenizer object
13192
13403
  ** returned by an earlier call to xCreate().
13193
13404
  **
13194
- ** The second argument indicates the reason that FTS5 is requesting
13405
+ ** The third argument indicates the reason that FTS5 is requesting
13195
13406
  ** tokenization of the supplied text. This is always one of the following
13196
13407
  ** four values:
13197
13408
  **
@@ -13215,6 +13426,13 @@ struct Fts5ExtensionApi {
13215
13426
  ** on a columnsize=0 database.
13216
13427
  ** </ul>
13217
13428
  **
13429
+ ** The sixth and seventh arguments passed to xTokenize() - pLocale and
13430
+ ** nLocale - are a pointer to a buffer containing the locale to use for
13431
+ ** tokenization (e.g. "en_US") and its size in bytes, respectively. The
13432
+ ** pLocale buffer is not nul-terminated. pLocale may be passed NULL (in
13433
+ ** which case nLocale is always 0) to indicate that the tokenizer should
13434
+ ** use its default locale.
13435
+ **
13218
13436
  ** For each token in the input string, the supplied callback xToken() must
13219
13437
  ** be invoked. The first argument to it should be a copy of the pointer
13220
13438
  ** passed as the second argument to xTokenize(). The third and fourth
@@ -13238,6 +13456,30 @@ struct Fts5ExtensionApi {
13238
13456
  ** may abandon the tokenization and return any error code other than
13239
13457
  ** SQLITE_OK or SQLITE_DONE.
13240
13458
  **
13459
+ ** If the tokenizer is registered using an fts5_tokenizer_v2 object,
13460
+ ** then the xTokenize() method has two additional arguments - pLocale
13461
+ ** and nLocale. These specify the locale that the tokenizer should use
13462
+ ** for the current request. If pLocale and nLocale are both 0, then the
13463
+ ** tokenizer should use its default locale. Otherwise, pLocale points to
13464
+ ** an nLocale byte buffer containing the name of the locale to use as utf-8
13465
+ ** text. pLocale is not nul-terminated.
13466
+ **
13467
+ ** FTS5_TOKENIZER
13468
+ **
13469
+ ** There is also an fts5_tokenizer object. This is an older, deprecated,
13470
+ ** version of fts5_tokenizer_v2. It is similar except that:
13471
+ **
13472
+ ** <ul>
13473
+ ** <li> There is no "iVersion" field, and
13474
+ ** <li> The xTokenize() method does not take a locale argument.
13475
+ ** </ul>
13476
+ **
13477
+ ** Legacy fts5_tokenizer tokenizers must be registered using the
13478
+ ** legacy xCreateTokenizer() function, instead of xCreateTokenizer_v2().
13479
+ **
13480
+ ** Tokenizer implementations registered using either API may be retrieved
13481
+ ** using both xFindTokenizer() and xFindTokenizer_v2().
13482
+ **
13241
13483
  ** SYNONYM SUPPORT
13242
13484
  **
13243
13485
  ** Custom tokenizers may also support synonyms. Consider a case in which a
@@ -13346,6 +13588,33 @@ struct Fts5ExtensionApi {
13346
13588
  ** inefficient.
13347
13589
  */
13348
13590
  typedef struct Fts5Tokenizer Fts5Tokenizer;
13591
+ typedef struct fts5_tokenizer_v2 fts5_tokenizer_v2;
13592
+ struct fts5_tokenizer_v2 {
13593
+ int iVersion; /* Currently always 2 */
13594
+
13595
+ int (*xCreate)(void*, const char **azArg, int nArg, Fts5Tokenizer **ppOut);
13596
+ void (*xDelete)(Fts5Tokenizer*);
13597
+ int (*xTokenize)(Fts5Tokenizer*,
13598
+ void *pCtx,
13599
+ int flags, /* Mask of FTS5_TOKENIZE_* flags */
13600
+ const char *pText, int nText,
13601
+ const char *pLocale, int nLocale,
13602
+ int (*xToken)(
13603
+ void *pCtx, /* Copy of 2nd argument to xTokenize() */
13604
+ int tflags, /* Mask of FTS5_TOKEN_* flags */
13605
+ const char *pToken, /* Pointer to buffer containing token */
13606
+ int nToken, /* Size of token in bytes */
13607
+ int iStart, /* Byte offset of token within input text */
13608
+ int iEnd /* Byte offset of end of token within input text */
13609
+ )
13610
+ );
13611
+ };
13612
+
13613
+ /*
13614
+ ** New code should use the fts5_tokenizer_v2 type to define tokenizer
13615
+ ** implementations. The following type is included for legacy applications
13616
+ ** that still use it.
13617
+ */
13349
13618
  typedef struct fts5_tokenizer fts5_tokenizer;
13350
13619
  struct fts5_tokenizer {
13351
13620
  int (*xCreate)(void*, const char **azArg, int nArg, Fts5Tokenizer **ppOut);
@@ -13365,6 +13634,7 @@ struct fts5_tokenizer {
13365
13634
  );
13366
13635
  };
13367
13636
 
13637
+
13368
13638
  /* Flags that may be passed as the third argument to xTokenize() */
13369
13639
  #define FTS5_TOKENIZE_QUERY 0x0001
13370
13640
  #define FTS5_TOKENIZE_PREFIX 0x0002
@@ -13384,7 +13654,7 @@ struct fts5_tokenizer {
13384
13654
  */
13385
13655
  typedef struct fts5_api fts5_api;
13386
13656
  struct fts5_api {
13387
- int iVersion; /* Currently always set to 2 */
13657
+ int iVersion; /* Currently always set to 3 */
13388
13658
 
13389
13659
  /* Create a new tokenizer */
13390
13660
  int (*xCreateTokenizer)(
@@ -13411,6 +13681,25 @@ struct fts5_api {
13411
13681
  fts5_extension_function xFunction,
13412
13682
  void (*xDestroy)(void*)
13413
13683
  );
13684
+
13685
+ /* APIs below this point are only available if iVersion>=3 */
13686
+
13687
+ /* Create a new tokenizer */
13688
+ int (*xCreateTokenizer_v2)(
13689
+ fts5_api *pApi,
13690
+ const char *zName,
13691
+ void *pUserData,
13692
+ fts5_tokenizer_v2 *pTokenizer,
13693
+ void (*xDestroy)(void*)
13694
+ );
13695
+
13696
+ /* Find an existing tokenizer */
13697
+ int (*xFindTokenizer_v2)(
13698
+ fts5_api *pApi,
13699
+ const char *zName,
13700
+ void **ppUserData,
13701
+ fts5_tokenizer_v2 **ppTokenizer
13702
+ );
13414
13703
  };
13415
13704
 
13416
13705
  /*
@@ -13424,103 +13713,8 @@ struct fts5_api {
13424
13713
  #endif /* _FTS5_H */
13425
13714
 
13426
13715
  /******** End of fts5.h *********/
13716
+ #endif /* SQLITE3_H */
13427
13717
  #else // USE_LIBSQLITE3
13428
13718
  // If users really want to link against the system sqlite3 we
13429
13719
  // 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 */
13720
+ #endif