diff --git a/AdminApis.html b/AdminApis.html index eba17419..2be5dd4e 100644 --- a/AdminApis.html +++ b/AdminApis.html @@ -94,7 +94,7 @@ diff --git a/AdminApis.ts.html b/AdminApis.ts.html index ac5c22b2..990e2434 100644 --- a/AdminApis.ts.html +++ b/AdminApis.ts.html @@ -96,7 +96,7 @@ diff --git a/AliasesEvent.html b/AliasesEvent.html index fc4bcba9..28eeff6f 100644 --- a/AliasesEvent.html +++ b/AliasesEvent.html @@ -94,7 +94,7 @@ diff --git a/AliasesEventContent.html b/AliasesEventContent.html index c1b4a38c..25a44eed 100644 --- a/AliasesEventContent.html +++ b/AliasesEventContent.html @@ -94,7 +94,7 @@ diff --git a/Appservice.html b/Appservice.html index 6d2e1eb3..6331022f 100644 --- a/Appservice.html +++ b/Appservice.html @@ -94,7 +94,7 @@ diff --git a/AppserviceJoinRoomStrategy.html b/AppserviceJoinRoomStrategy.html index 21dabc02..85e05469 100644 --- a/AppserviceJoinRoomStrategy.html +++ b/AppserviceJoinRoomStrategy.html @@ -94,7 +94,7 @@ diff --git a/Appservice_Appservice.html b/Appservice_Appservice.html index e356e69c..59abba68 100644 --- a/Appservice_Appservice.html +++ b/Appservice_Appservice.html @@ -94,7 +94,7 @@ diff --git a/AudioMessageEventContent.html b/AudioMessageEventContent.html index fdbf3258..f0e34091 100644 --- a/AudioMessageEventContent.html +++ b/AudioMessageEventContent.html @@ -94,7 +94,7 @@ diff --git a/AutojoinRoomsMixin.html b/AutojoinRoomsMixin.html index d8c5f522..975349cf 100644 --- a/AutojoinRoomsMixin.html +++ b/AutojoinRoomsMixin.html @@ -94,7 +94,7 @@ diff --git a/AutojoinUpgradedRoomsMixin.html b/AutojoinUpgradedRoomsMixin.html index a30de3f4..1af7e0d2 100644 --- a/AutojoinUpgradedRoomsMixin.html +++ b/AutojoinUpgradedRoomsMixin.html @@ -94,7 +94,7 @@ diff --git a/CanonicalAliasEvent.html b/CanonicalAliasEvent.html index 1e734d84..2cb4e884 100644 --- a/CanonicalAliasEvent.html +++ b/CanonicalAliasEvent.html @@ -94,7 +94,7 @@ diff --git a/CanonicalAliasEventContent.html b/CanonicalAliasEventContent.html index f1cb2fde..90783ef8 100644 --- a/CanonicalAliasEventContent.html +++ b/CanonicalAliasEventContent.html @@ -94,7 +94,7 @@ diff --git a/ConsoleLogger.html b/ConsoleLogger.html index 3ee306ad..704ddc61 100644 --- a/ConsoleLogger.html +++ b/ConsoleLogger.html @@ -94,7 +94,7 @@ diff --git a/CreateEvent.html b/CreateEvent.html index e6069723..820eaaad 100644 --- a/CreateEvent.html +++ b/CreateEvent.html @@ -94,7 +94,7 @@ diff --git a/CreateEventContent.html b/CreateEventContent.html index 60f16c4a..79fb0895 100644 --- a/CreateEventContent.html +++ b/CreateEventContent.html @@ -94,7 +94,7 @@ diff --git a/CryptoClient.html b/CryptoClient.html index a9bf67a2..9935b455 100644 --- a/CryptoClient.html +++ b/CryptoClient.html @@ -94,7 +94,7 @@ diff --git a/DMs.html b/DMs.html index 0effecc9..0606008c 100644 --- a/DMs.html +++ b/DMs.html @@ -94,7 +94,7 @@ diff --git a/DMs.ts.html b/DMs.ts.html index 3eadf601..6ccc84d8 100644 --- a/DMs.ts.html +++ b/DMs.ts.html @@ -96,7 +96,7 @@ diff --git a/DMs_DMs.html b/DMs_DMs.html index 4b155098..59156a9a 100644 --- a/DMs_DMs.html +++ b/DMs_DMs.html @@ -94,7 +94,7 @@ diff --git a/DimensionalFileInfo.html b/DimensionalFileInfo.html index 0e92cc21..93e01ad9 100644 --- a/DimensionalFileInfo.html +++ b/DimensionalFileInfo.html @@ -94,7 +94,7 @@ diff --git a/EncryptedFile.html b/EncryptedFile.html index 4a5f53d6..b91e4960 100644 --- a/EncryptedFile.html +++ b/EncryptedFile.html @@ -94,7 +94,7 @@ diff --git a/EncryptedRoomEvent.html b/EncryptedRoomEvent.html index 72118ad3..d948c63b 100644 --- a/EncryptedRoomEvent.html +++ b/EncryptedRoomEvent.html @@ -94,7 +94,7 @@ diff --git a/EncryptedRoomEventContent.html b/EncryptedRoomEventContent.html index 3dca8521..93e06b42 100644 --- a/EncryptedRoomEventContent.html +++ b/EncryptedRoomEventContent.html @@ -94,7 +94,7 @@ diff --git a/EncryptionEvent.html b/EncryptionEvent.html index 79878226..5d60707b 100644 --- a/EncryptionEvent.html +++ b/EncryptionEvent.html @@ -94,7 +94,7 @@ diff --git a/EncryptionEventContent.html b/EncryptionEventContent.html index 91c418ef..20adaae2 100644 --- a/EncryptionEventContent.html +++ b/EncryptionEventContent.html @@ -94,7 +94,7 @@ diff --git a/EventRedactedError.html b/EventRedactedError.html index 01f8af70..3bd6f19a 100644 --- a/EventRedactedError.html +++ b/EventRedactedError.html @@ -94,7 +94,7 @@ diff --git a/FallbackKey.html b/FallbackKey.html index 1921140e..1cd84b4f 100644 --- a/FallbackKey.html +++ b/FallbackKey.html @@ -94,7 +94,7 @@ diff --git a/FileInfo.html b/FileInfo.html index 2979cfce..163e7f2c 100644 --- a/FileInfo.html +++ b/FileInfo.html @@ -94,7 +94,7 @@ diff --git a/FileMessageEventContent.html b/FileMessageEventContent.html index 1a297cb8..568496e8 100644 --- a/FileMessageEventContent.html +++ b/FileMessageEventContent.html @@ -94,7 +94,7 @@ diff --git a/FileWithThumbnailInfo.html b/FileWithThumbnailInfo.html index ef989969..f5b63659 100644 --- a/FileWithThumbnailInfo.html +++ b/FileWithThumbnailInfo.html @@ -94,7 +94,7 @@ diff --git a/FunctionCallContext.html b/FunctionCallContext.html index cbfba550..008fe9d8 100644 --- a/FunctionCallContext.html +++ b/FunctionCallContext.html @@ -94,7 +94,7 @@ diff --git a/IApplicationServiceProtocol.html b/IApplicationServiceProtocol.html index 72fe1093..8a2220d5 100644 --- a/IApplicationServiceProtocol.html +++ b/IApplicationServiceProtocol.html @@ -94,7 +94,7 @@ diff --git a/IAppserviceCryptoStorageProvider.html b/IAppserviceCryptoStorageProvider.html index 3f137949..02dd9a20 100644 --- a/IAppserviceCryptoStorageProvider.html +++ b/IAppserviceCryptoStorageProvider.html @@ -94,7 +94,7 @@ diff --git a/IAppserviceOptions.html b/IAppserviceOptions.html index f41b9ee8..23750c89 100644 --- a/IAppserviceOptions.html +++ b/IAppserviceOptions.html @@ -94,7 +94,7 @@ diff --git a/IAppserviceRegistration.html b/IAppserviceRegistration.html index cdcbe296..178a4498 100644 --- a/IAppserviceRegistration.html +++ b/IAppserviceRegistration.html @@ -94,7 +94,7 @@ diff --git a/IAppserviceStorageProvider.html b/IAppserviceStorageProvider.html index 25d06216..b34d538b 100644 --- a/IAppserviceStorageProvider.html +++ b/IAppserviceStorageProvider.html @@ -94,7 +94,7 @@ diff --git a/ICryptoRoomInformation.html b/ICryptoRoomInformation.html index 536f0b2a..d79447b0 100644 --- a/ICryptoRoomInformation.html +++ b/ICryptoRoomInformation.html @@ -94,7 +94,7 @@ diff --git a/ICryptoStorageProvider.html b/ICryptoStorageProvider.html index 37b3e052..ed8add7e 100644 --- a/ICryptoStorageProvider.html +++ b/ICryptoStorageProvider.html @@ -94,7 +94,7 @@ diff --git a/IFilter.ts.html b/IFilter.ts.html index e2a5a835..8cade0a6 100644 --- a/IFilter.ts.html +++ b/IFilter.ts.html @@ -96,7 +96,7 @@ diff --git a/IFilterInfo.html b/IFilterInfo.html index 5b545e14..f9467586 100644 --- a/IFilterInfo.html +++ b/IFilterInfo.html @@ -94,7 +94,7 @@ diff --git a/ILogger.html b/ILogger.html index 22b0533a..1b99698c 100644 --- a/ILogger.html +++ b/ILogger.html @@ -94,7 +94,7 @@ diff --git a/IMegolmEncrypted.html b/IMegolmEncrypted.html index 35b2e96f..ff53dc38 100644 --- a/IMegolmEncrypted.html +++ b/IMegolmEncrypted.html @@ -94,7 +94,7 @@ diff --git a/IMetricListener.html b/IMetricListener.html index 7781b4d1..5813ed92 100644 --- a/IMetricListener.html +++ b/IMetricListener.html @@ -94,7 +94,7 @@ diff --git a/IOlmEncrypted.html b/IOlmEncrypted.html index 50e59c2a..3f233379 100644 --- a/IOlmEncrypted.html +++ b/IOlmEncrypted.html @@ -94,7 +94,7 @@ diff --git a/IPreprocessor.html b/IPreprocessor.html index 2abadbae..2db117b8 100644 --- a/IPreprocessor.html +++ b/IPreprocessor.html @@ -94,7 +94,7 @@ diff --git a/IRemoteRoomInfo.html b/IRemoteRoomInfo.html index 737e96e5..39c05f35 100644 --- a/IRemoteRoomInfo.html +++ b/IRemoteRoomInfo.html @@ -94,7 +94,7 @@ diff --git a/IRemoteUserInfo.html b/IRemoteUserInfo.html index 34175223..5bcbe6a3 100644 --- a/IRemoteUserInfo.html +++ b/IRemoteUserInfo.html @@ -94,7 +94,7 @@ diff --git a/IRichReplyMetadata.html b/IRichReplyMetadata.html index 1d84eef2..a9f088e3 100644 --- a/IRichReplyMetadata.html +++ b/IRichReplyMetadata.html @@ -94,7 +94,7 @@ diff --git a/IStorageProvider.html b/IStorageProvider.html index 74e2dc33..0a3f5f79 100644 --- a/IStorageProvider.html +++ b/IStorageProvider.html @@ -94,7 +94,7 @@ diff --git a/IToDeviceMessage.html b/IToDeviceMessage.html index 755e00e8..333182f0 100644 --- a/IToDeviceMessage.html +++ b/IToDeviceMessage.html @@ -94,7 +94,7 @@ diff --git a/IWhoAmI.html b/IWhoAmI.html index 31f769b2..65aba0f1 100644 --- a/IWhoAmI.html +++ b/IWhoAmI.html @@ -94,7 +94,7 @@ diff --git a/IdentityClient.html b/IdentityClient.html index 0352dea9..9b553d4d 100644 --- a/IdentityClient.html +++ b/IdentityClient.html @@ -94,7 +94,7 @@ diff --git a/IdentityClientCallContext.html b/IdentityClientCallContext.html index 2dddecb5..ae009408 100644 --- a/IdentityClientCallContext.html +++ b/IdentityClientCallContext.html @@ -94,7 +94,7 @@ diff --git a/IdentityServerAccount.html b/IdentityServerAccount.html index 6df4f450..69658d06 100644 --- a/IdentityServerAccount.html +++ b/IdentityServerAccount.html @@ -94,7 +94,7 @@ diff --git a/IdentityServerInvite.html b/IdentityServerInvite.html index cb1ad132..2969515c 100644 --- a/IdentityServerInvite.html +++ b/IdentityServerInvite.html @@ -94,7 +94,7 @@ diff --git a/ImageMessageEventContent.html b/ImageMessageEventContent.html index 9de106fe..c0515687 100644 --- a/ImageMessageEventContent.html +++ b/ImageMessageEventContent.html @@ -94,7 +94,7 @@ diff --git a/Intent.html b/Intent.html index d90fc504..3908b179 100644 --- a/Intent.html +++ b/Intent.html @@ -94,7 +94,7 @@ diff --git a/IntentCallContext.html b/IntentCallContext.html index 438687be..14e3092c 100644 --- a/IntentCallContext.html +++ b/IntentCallContext.html @@ -94,7 +94,7 @@ diff --git a/Intent_Intent.html b/Intent_Intent.html index e78f1b8d..cd520bd3 100644 --- a/Intent_Intent.html +++ b/Intent_Intent.html @@ -94,7 +94,7 @@ diff --git a/InvalidEventError.html b/InvalidEventError.html index abe00b6d..94a9936c 100644 --- a/InvalidEventError.html +++ b/InvalidEventError.html @@ -94,7 +94,7 @@ diff --git a/JoinRulesEvent.html b/JoinRulesEvent.html index ef090164..93a00b1e 100644 --- a/JoinRulesEvent.html +++ b/JoinRulesEvent.html @@ -94,7 +94,7 @@ diff --git a/JoinRulesEventContent.html b/JoinRulesEventContent.html index 51061d98..b555edcc 100644 --- a/JoinRulesEventContent.html +++ b/JoinRulesEventContent.html @@ -94,7 +94,7 @@ diff --git a/LocationMessageEventContent.html b/LocationMessageEventContent.html index 24032323..65e24316 100644 --- a/LocationMessageEventContent.html +++ b/LocationMessageEventContent.html @@ -94,7 +94,7 @@ diff --git a/LogLevel.html b/LogLevel.html index eda5b62d..aaec824a 100644 --- a/LogLevel.html +++ b/LogLevel.html @@ -94,7 +94,7 @@ diff --git a/LogService.html b/LogService.html index f6ef0e2e..74dae396 100644 --- a/LogService.html +++ b/LogService.html @@ -94,7 +94,7 @@ diff --git a/MSC2380MediaInfo.html b/MSC2380MediaInfo.html index 84710065..f9df2c43 100644 --- a/MSC2380MediaInfo.html +++ b/MSC2380MediaInfo.html @@ -94,7 +94,7 @@ diff --git a/MSC2716BatchSendResponse.html b/MSC2716BatchSendResponse.html index 032c313d..6be1c71d 100644 --- a/MSC2716BatchSendResponse.html +++ b/MSC2716BatchSendResponse.html @@ -94,7 +94,7 @@ diff --git a/MSC2716ChunkEventContent.html b/MSC2716ChunkEventContent.html index 15eb1554..686fbe66 100644 --- a/MSC2716ChunkEventContent.html +++ b/MSC2716ChunkEventContent.html @@ -94,7 +94,7 @@ diff --git a/MSC2716InsertionEventContent.html b/MSC2716InsertionEventContent.html index f4b2a00f..0fd3ab25 100644 --- a/MSC2716InsertionEventContent.html +++ b/MSC2716InsertionEventContent.html @@ -94,7 +94,7 @@ diff --git a/MSC2716MarkerEventContent.html b/MSC2716MarkerEventContent.html index 0d214885..d53ad15d 100644 --- a/MSC2716MarkerEventContent.html +++ b/MSC2716MarkerEventContent.html @@ -94,7 +94,7 @@ diff --git a/MSC3983KeyClaimResponse.html b/MSC3983KeyClaimResponse.html index dd8a7fde..bbfc7b21 100644 --- a/MSC3983KeyClaimResponse.html +++ b/MSC3983KeyClaimResponse.html @@ -94,7 +94,7 @@ diff --git a/MSC3984KeyQueryResponse.html b/MSC3984KeyQueryResponse.html index 28109d74..2588d293 100644 --- a/MSC3984KeyQueryResponse.html +++ b/MSC3984KeyQueryResponse.html @@ -94,7 +94,7 @@ diff --git a/MatrixAuth.html b/MatrixAuth.html index 35c23189..c17ced7a 100644 --- a/MatrixAuth.html +++ b/MatrixAuth.html @@ -94,7 +94,7 @@ diff --git a/MatrixAuth.ts.html b/MatrixAuth.ts.html index 17ace34d..631a989e 100644 --- a/MatrixAuth.ts.html +++ b/MatrixAuth.ts.html @@ -96,7 +96,7 @@ diff --git a/MatrixAuth_MatrixAuth.html b/MatrixAuth_MatrixAuth.html index cdb4d638..a3341e98 100644 --- a/MatrixAuth_MatrixAuth.html +++ b/MatrixAuth_MatrixAuth.html @@ -94,7 +94,7 @@ diff --git a/MatrixBridge.html b/MatrixBridge.html index 612bd9c6..e5bdbae4 100644 --- a/MatrixBridge.html +++ b/MatrixBridge.html @@ -94,7 +94,7 @@ diff --git a/MatrixClient.html b/MatrixClient.html index e730996a..53235716 100644 --- a/MatrixClient.html +++ b/MatrixClient.html @@ -94,7 +94,7 @@ diff --git a/MatrixClient.ts.html b/MatrixClient.ts.html index 7aadbb77..26657edd 100644 --- a/MatrixClient.ts.html +++ b/MatrixClient.ts.html @@ -96,7 +96,7 @@ diff --git a/MatrixClientCallContext.html b/MatrixClientCallContext.html index 44c14135..9f8d66af 100644 --- a/MatrixClientCallContext.html +++ b/MatrixClientCallContext.html @@ -94,7 +94,7 @@ diff --git a/MatrixClient_MatrixClient.html b/MatrixClient_MatrixClient.html index dc1ddaa0..f080b689 100644 --- a/MatrixClient_MatrixClient.html +++ b/MatrixClient_MatrixClient.html @@ -94,7 +94,7 @@ diff --git a/MatrixEntity.html b/MatrixEntity.html index 51d9e2c2..5f39bc28 100644 --- a/MatrixEntity.html +++ b/MatrixEntity.html @@ -94,7 +94,7 @@ diff --git a/MatrixEntity_MatrixEntity.html b/MatrixEntity_MatrixEntity.html index 69b7b9e6..747c49b3 100644 --- a/MatrixEntity_MatrixEntity.html +++ b/MatrixEntity_MatrixEntity.html @@ -94,7 +94,7 @@ diff --git a/MatrixError.html b/MatrixError.html index e2833d05..42ca6b33 100644 --- a/MatrixError.html +++ b/MatrixError.html @@ -94,7 +94,7 @@ diff --git a/MatrixError_MatrixError.html b/MatrixError_MatrixError.html index 48791be6..01550aaa 100644 --- a/MatrixError_MatrixError.html +++ b/MatrixError_MatrixError.html @@ -94,7 +94,7 @@ diff --git a/MatrixEvent.html b/MatrixEvent.html index 8be02de8..2f902488 100644 --- a/MatrixEvent.html +++ b/MatrixEvent.html @@ -94,7 +94,7 @@ diff --git a/MatrixGlob.html b/MatrixGlob.html index 0e6f1b71..89b2da5c 100644 --- a/MatrixGlob.html +++ b/MatrixGlob.html @@ -94,7 +94,7 @@ diff --git a/MatrixGlob_MatrixGlob.html b/MatrixGlob_MatrixGlob.html index 3696a626..0a0d73dc 100644 --- a/MatrixGlob_MatrixGlob.html +++ b/MatrixGlob_MatrixGlob.html @@ -94,7 +94,7 @@ diff --git a/MatrixProfile.html b/MatrixProfile.html index 3633ab97..6cb238ea 100644 --- a/MatrixProfile.html +++ b/MatrixProfile.html @@ -94,7 +94,7 @@ diff --git a/MatrixProfileInfo.html b/MatrixProfileInfo.html index aa1d9b24..6b1e1950 100644 --- a/MatrixProfileInfo.html +++ b/MatrixProfileInfo.html @@ -94,7 +94,7 @@ diff --git a/MatrixProfile_MatrixProfile.html b/MatrixProfile_MatrixProfile.html index 5c623e77..36c45427 100644 --- a/MatrixProfile_MatrixProfile.html +++ b/MatrixProfile_MatrixProfile.html @@ -94,7 +94,7 @@ diff --git a/MembershipEvent.html b/MembershipEvent.html index 1e7c4f59..a8dbee10 100644 --- a/MembershipEvent.html +++ b/MembershipEvent.html @@ -94,7 +94,7 @@ diff --git a/MembershipEventContent.html b/MembershipEventContent.html index a0139c20..b9b7d8bd 100644 --- a/MembershipEventContent.html +++ b/MembershipEventContent.html @@ -94,7 +94,7 @@ diff --git a/MemoryStorageProvider.html b/MemoryStorageProvider.html index 3f2199c1..f7a7ab23 100644 --- a/MemoryStorageProvider.html +++ b/MemoryStorageProvider.html @@ -94,7 +94,7 @@ diff --git a/MentionPill.html b/MentionPill.html index 01767193..5d65cfd5 100644 --- a/MentionPill.html +++ b/MentionPill.html @@ -94,7 +94,7 @@ diff --git a/MessageEvent.html b/MessageEvent.html index 5490e18d..d8d7cfb0 100644 --- a/MessageEvent.html +++ b/MessageEvent.html @@ -94,7 +94,7 @@ diff --git a/MessageEventContent.html b/MessageEventContent.html index dfb0d946..5cd08b67 100644 --- a/MessageEventContent.html +++ b/MessageEventContent.html @@ -94,7 +94,7 @@ diff --git a/Metrics.html b/Metrics.html index 44433186..08ffea96 100644 --- a/Metrics.html +++ b/Metrics.html @@ -94,7 +94,7 @@ diff --git a/Metrics_Metrics.html b/Metrics_Metrics.html index 53b27c91..d84a8189 100644 --- a/Metrics_Metrics.html +++ b/Metrics_Metrics.html @@ -94,7 +94,7 @@ diff --git a/MultiUserDeviceListResponse.html b/MultiUserDeviceListResponse.html index 00efd946..df48c38a 100644 --- a/MultiUserDeviceListResponse.html +++ b/MultiUserDeviceListResponse.html @@ -94,7 +94,7 @@ diff --git a/NamespacedFsProvider.html b/NamespacedFsProvider.html index 9df223a5..1709856c 100644 --- a/NamespacedFsProvider.html +++ b/NamespacedFsProvider.html @@ -94,7 +94,7 @@ diff --git a/NamespacedPostgresProvider.html b/NamespacedPostgresProvider.html new file mode 100644 index 00000000..efaffa33 --- /dev/null +++ b/NamespacedPostgresProvider.html @@ -0,0 +1,280 @@ + + + + + + + + NamespacedPostgresProvider + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+
+
+ +
+
+
+

Class

+

NamespacedPostgresProvider

+
+ + + + + +
+ +
+ +

NamespacedPostgresProvider()

+ +
A namespaced storage provider that uses postgres to store information.
+ + +
+ +
+
+ + +
+
+
+
+ Constructor +
+ + + + +

+ # + + + + new NamespacedPostgresProvider() + + +

+ + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ View Source + + storage/SimplePostgresStorageProvider.ts, line 125 + +

+ +
+ + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + +
+ + + +
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/OTKClaimResponse.html b/OTKClaimResponse.html index d8ecb2ba..1539bab5 100644 --- a/OTKClaimResponse.html +++ b/OTKClaimResponse.html @@ -94,7 +94,7 @@ diff --git a/OpenIDConnectToken.html b/OpenIDConnectToken.html index 175aff31..3ba4c337 100644 --- a/OpenIDConnectToken.html +++ b/OpenIDConnectToken.html @@ -94,7 +94,7 @@ diff --git a/OwnUserDevice.html b/OwnUserDevice.html index c24b6d9e..257810fc 100644 --- a/OwnUserDevice.html +++ b/OwnUserDevice.html @@ -94,7 +94,7 @@ diff --git a/PantalaimonClient.html b/PantalaimonClient.html index 8f0f4007..2481f7ff 100644 --- a/PantalaimonClient.html +++ b/PantalaimonClient.html @@ -94,7 +94,7 @@ diff --git a/PantalaimonClient.ts.html b/PantalaimonClient.ts.html index 156e8ac7..2109f6c9 100644 --- a/PantalaimonClient.ts.html +++ b/PantalaimonClient.ts.html @@ -96,7 +96,7 @@ diff --git a/PantalaimonClient_PantalaimonClient.html b/PantalaimonClient_PantalaimonClient.html index 820585a5..796ecac3 100644 --- a/PantalaimonClient_PantalaimonClient.html +++ b/PantalaimonClient_PantalaimonClient.html @@ -94,7 +94,7 @@ diff --git a/PermalinkParts.html b/PermalinkParts.html index 99fac577..6d4d9b3b 100644 --- a/PermalinkParts.html +++ b/PermalinkParts.html @@ -94,7 +94,7 @@ diff --git a/Permalinks.html b/Permalinks.html index ef917e87..543c32cf 100644 --- a/Permalinks.html +++ b/Permalinks.html @@ -94,7 +94,7 @@ diff --git a/PinnedEventsEvent.html b/PinnedEventsEvent.html index 1968f3da..2130c9fa 100644 --- a/PinnedEventsEvent.html +++ b/PinnedEventsEvent.html @@ -94,7 +94,7 @@ diff --git a/PinnedEventsEventContent.html b/PinnedEventsEventContent.html index 3a759e5e..49e26ae7 100644 --- a/PinnedEventsEventContent.html +++ b/PinnedEventsEventContent.html @@ -94,7 +94,7 @@ diff --git a/Policies.html b/Policies.html index 9fcdcd11..03d500f7 100644 --- a/Policies.html +++ b/Policies.html @@ -94,7 +94,7 @@ diff --git a/Policy.html b/Policy.html index 66db122c..2b1b212c 100644 --- a/Policy.html +++ b/Policy.html @@ -94,7 +94,7 @@ diff --git a/PowerLevelBounds.html b/PowerLevelBounds.html index 8c6a6920..3110fb27 100644 --- a/PowerLevelBounds.html +++ b/PowerLevelBounds.html @@ -94,7 +94,7 @@ diff --git a/PowerLevelsEvent.html b/PowerLevelsEvent.html index 2b73a9ac..963fb777 100644 --- a/PowerLevelsEvent.html +++ b/PowerLevelsEvent.html @@ -94,7 +94,7 @@ diff --git a/PowerLevelsEventContent.html b/PowerLevelsEventContent.html index 6a7d0ebb..d6466bc7 100644 --- a/PowerLevelsEventContent.html +++ b/PowerLevelsEventContent.html @@ -94,7 +94,7 @@ diff --git a/Presence.html b/Presence.html index bbe00449..816aa99b 100644 --- a/Presence.html +++ b/Presence.html @@ -94,7 +94,7 @@ diff --git a/PresenceEvent.html b/PresenceEvent.html index 89398c46..78291167 100644 --- a/PresenceEvent.html +++ b/PresenceEvent.html @@ -94,7 +94,7 @@ diff --git a/PresenceEventContent.html b/PresenceEventContent.html index 4478f9df..009a89d2 100644 --- a/PresenceEventContent.html +++ b/PresenceEventContent.html @@ -94,7 +94,7 @@ diff --git a/PreviousRoomInfo.html b/PreviousRoomInfo.html index e0e2a5e9..a6df5763 100644 --- a/PreviousRoomInfo.html +++ b/PreviousRoomInfo.html @@ -94,7 +94,7 @@ diff --git a/ProfileCache.html b/ProfileCache.html index 641d31ad..88a27af8 100644 --- a/ProfileCache.html +++ b/ProfileCache.html @@ -94,7 +94,7 @@ diff --git a/ProfileCache_ProfileCache.html b/ProfileCache_ProfileCache.html index ff296dcd..2d95b0da 100644 --- a/ProfileCache_ProfileCache.html +++ b/ProfileCache_ProfileCache.html @@ -94,7 +94,7 @@ diff --git a/RedactionEvent.html b/RedactionEvent.html index 859ffe64..471ff28c 100644 --- a/RedactionEvent.html +++ b/RedactionEvent.html @@ -94,7 +94,7 @@ diff --git a/RedactionEventContent.html b/RedactionEventContent.html index 1cf4b8f0..b0f4eb32 100644 --- a/RedactionEventContent.html +++ b/RedactionEventContent.html @@ -94,7 +94,7 @@ diff --git a/RichConsoleLogger.html b/RichConsoleLogger.html index 64601e13..9dcfb048 100644 --- a/RichConsoleLogger.html +++ b/RichConsoleLogger.html @@ -94,7 +94,7 @@ diff --git a/RichRepliesPreprocessor.html b/RichRepliesPreprocessor.html index c4e4d9c5..b21fab59 100644 --- a/RichRepliesPreprocessor.html +++ b/RichRepliesPreprocessor.html @@ -94,7 +94,7 @@ diff --git a/RichRepliesPreprocessor_RichRepliesPreprocessor.html b/RichRepliesPreprocessor_RichRepliesPreprocessor.html index 06b3704f..c29e7fe9 100644 --- a/RichRepliesPreprocessor_RichRepliesPreprocessor.html +++ b/RichRepliesPreprocessor_RichRepliesPreprocessor.html @@ -94,7 +94,7 @@ diff --git a/RichReply.html b/RichReply.html index 701326ae..ec5418ce 100644 --- a/RichReply.html +++ b/RichReply.html @@ -94,7 +94,7 @@ diff --git a/RoomAlias.html b/RoomAlias.html index 25962c06..1d5a9d02 100644 --- a/RoomAlias.html +++ b/RoomAlias.html @@ -94,7 +94,7 @@ diff --git a/RoomAvatarEvent.html b/RoomAvatarEvent.html index 8bd1d86d..8df1d1c1 100644 --- a/RoomAvatarEvent.html +++ b/RoomAvatarEvent.html @@ -94,7 +94,7 @@ diff --git a/RoomAvatarEventContent.html b/RoomAvatarEventContent.html index d8c4640a..d819d4ca 100644 --- a/RoomAvatarEventContent.html +++ b/RoomAvatarEventContent.html @@ -94,7 +94,7 @@ diff --git a/RoomCreateOptions.html b/RoomCreateOptions.html index 82f703e5..d9bcfbe3 100644 --- a/RoomCreateOptions.html +++ b/RoomCreateOptions.html @@ -94,7 +94,7 @@ diff --git a/RoomEvent.html b/RoomEvent.html index dd38ce7b..50d1631e 100644 --- a/RoomEvent.html +++ b/RoomEvent.html @@ -94,7 +94,7 @@ diff --git a/RoomEventContent.html b/RoomEventContent.html index 6f25be74..5373a37f 100644 --- a/RoomEventContent.html +++ b/RoomEventContent.html @@ -94,7 +94,7 @@ diff --git a/RoomNameEvent.html b/RoomNameEvent.html index ccdeafd2..872c87dd 100644 --- a/RoomNameEvent.html +++ b/RoomNameEvent.html @@ -94,7 +94,7 @@ diff --git a/RoomNameEventContent.html b/RoomNameEventContent.html index 23f827a3..473c2e62 100644 --- a/RoomNameEventContent.html +++ b/RoomNameEventContent.html @@ -94,7 +94,7 @@ diff --git a/RoomTopicEvent.html b/RoomTopicEvent.html index a2896626..cb07c639 100644 --- a/RoomTopicEvent.html +++ b/RoomTopicEvent.html @@ -94,7 +94,7 @@ diff --git a/RoomTopicEventContent.html b/RoomTopicEventContent.html index 06bb8ab4..5c540e17 100644 --- a/RoomTopicEventContent.html +++ b/RoomTopicEventContent.html @@ -94,7 +94,7 @@ diff --git a/RoomTracker.html b/RoomTracker.html index c4222dec..ee2c3697 100644 --- a/RoomTracker.html +++ b/RoomTracker.html @@ -94,7 +94,7 @@ diff --git a/RustEngine.html b/RustEngine.html index 3f965cbc..36fedd8a 100644 --- a/RustEngine.html +++ b/RustEngine.html @@ -94,7 +94,7 @@ diff --git a/RustSdkAppserviceCryptoStorageProvider.html b/RustSdkAppserviceCryptoStorageProvider.html index 3fd4f06b..44054b9f 100644 --- a/RustSdkAppserviceCryptoStorageProvider.html +++ b/RustSdkAppserviceCryptoStorageProvider.html @@ -94,7 +94,7 @@ diff --git a/RustSdkAppserviceCryptoStorageProvider_RustSdkAppserviceCryptoStorageProvider.html b/RustSdkAppserviceCryptoStorageProvider_RustSdkAppserviceCryptoStorageProvider.html index 2b8eefa2..2dfae507 100644 --- a/RustSdkAppserviceCryptoStorageProvider_RustSdkAppserviceCryptoStorageProvider.html +++ b/RustSdkAppserviceCryptoStorageProvider_RustSdkAppserviceCryptoStorageProvider.html @@ -94,7 +94,7 @@ diff --git a/RustSdkCryptoStorageProvider.html b/RustSdkCryptoStorageProvider.html index af369d06..6ec40b04 100644 --- a/RustSdkCryptoStorageProvider.html +++ b/RustSdkCryptoStorageProvider.html @@ -94,7 +94,7 @@ diff --git a/RustSdkCryptoStorageProvider_RustSdkCryptoStorageProvider.html b/RustSdkCryptoStorageProvider_RustSdkCryptoStorageProvider.html index 4c6498fb..90cac7d9 100644 --- a/RustSdkCryptoStorageProvider_RustSdkCryptoStorageProvider.html +++ b/RustSdkCryptoStorageProvider_RustSdkCryptoStorageProvider.html @@ -94,7 +94,7 @@ diff --git a/Signatures.html b/Signatures.html index 6b880e7e..4d7df369 100644 --- a/Signatures.html +++ b/Signatures.html @@ -94,7 +94,7 @@ diff --git a/SignedCurve25519OTK.html b/SignedCurve25519OTK.html index a9d617a2..eb529422 100644 --- a/SignedCurve25519OTK.html +++ b/SignedCurve25519OTK.html @@ -94,7 +94,7 @@ diff --git a/SimpleFsStorageProvider.html b/SimpleFsStorageProvider.html index 928f74d2..01e741a6 100644 --- a/SimpleFsStorageProvider.html +++ b/SimpleFsStorageProvider.html @@ -94,7 +94,7 @@ diff --git a/SimpleFsStorageProvider_SimpleFsStorageProvider.html b/SimpleFsStorageProvider_SimpleFsStorageProvider.html index c69c3cec..c4a8e437 100644 --- a/SimpleFsStorageProvider_SimpleFsStorageProvider.html +++ b/SimpleFsStorageProvider_SimpleFsStorageProvider.html @@ -94,7 +94,7 @@ diff --git a/SimplePostgresStorageProvider.html b/SimplePostgresStorageProvider.html new file mode 100644 index 00000000..1bdf0c47 --- /dev/null +++ b/SimplePostgresStorageProvider.html @@ -0,0 +1,398 @@ + + + + + + + + SimplePostgresStorageProvider + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+
+
+ +
+
+
+

Class

+

SimplePostgresStorageProvider

+
+ + + + + +
+ +
+ +

SimplePostgresStorageProvider(connectionString, trackTransactionsInMemory, maxInMemoryTransactions)

+ +
A barebones postgresql storage provider. It is not efficient, but it does work.
+ + +
+ +
+
+ + +
+
+
+
+ Constructor +
+ + + + +

+ # + + + + new SimplePostgresStorageProvider(connectionString, trackTransactionsInMemory, maxInMemoryTransactions) + + +

+ + + + +
+ Creates a new simple postgresql storage provider. +
+ + + + + + + + + + +
Parameters:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefaultDescription
connectionString + + + + The `postgres://` connection string to use.
trackTransactionsInMemory + + + + true + + True (default) to track all received appservice transactions rather than on disk.
maxInMemoryTransactions + + + + 20 + + The maximum number of transactions to hold in memory before rotating the oldest out. Defaults to 20.
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ View Source + + storage/SimplePostgresStorageProvider.ts, line 7 + +

+ +
+ + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ + + + + + +

Classes

+ +
+
SimplePostgresStorageProvider
+
+ +
SimplePostgresStorageProvider
+
+
+ + + + + + + + + + + + + + + +
+ +
+ + + + +
+ + + +
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/SimplePostgresStorageProvider_SimplePostgresStorageProvider.html b/SimplePostgresStorageProvider_SimplePostgresStorageProvider.html new file mode 100644 index 00000000..7db03298 --- /dev/null +++ b/SimplePostgresStorageProvider_SimplePostgresStorageProvider.html @@ -0,0 +1,369 @@ + + + + + + + + SimplePostgresStorageProvider + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+
+
+ +
+
+
+

Class

+

SimplePostgresStorageProvider

+
+ + + + + +
+ +
+ +

+ SimplePostgresStorageProvider#SimplePostgresStorageProvider(connectionString, trackTransactionsInMemory, maxInMemoryTransactions)

+ + +
+ +
+
+ + +
+
+
+
+ Constructor +
+ + + + +

+ # + + + + new SimplePostgresStorageProvider(connectionString, trackTransactionsInMemory, maxInMemoryTransactions) + + +

+ + + + +
+ Creates a new simple postgresql storage provider. +
+ + + + + + + + + + +
Parameters:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
connectionString + + The `postgres://` connection string to use.
trackTransactionsInMemory + + True (default) to track all received appservice transactions rather than on disk.
maxInMemoryTransactions + + The maximum number of transactions to hold in memory before rotating the oldest out. Defaults to 20.
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ View Source + + storage/SimplePostgresStorageProvider.ts, line 165 + +

+ +
+ + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + +
+ + + +
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/SimpleRetryJoinStrategy.html b/SimpleRetryJoinStrategy.html index 76c279b8..3e00bc8c 100644 --- a/SimpleRetryJoinStrategy.html +++ b/SimpleRetryJoinStrategy.html @@ -94,7 +94,7 @@ diff --git a/Space.html b/Space.html index faa6d04b..31b25234 100644 --- a/Space.html +++ b/Space.html @@ -94,7 +94,7 @@ diff --git a/SpaceChildEntityOptions.html b/SpaceChildEntityOptions.html index 8f68e6cd..4e6681a1 100644 --- a/SpaceChildEntityOptions.html +++ b/SpaceChildEntityOptions.html @@ -94,7 +94,7 @@ diff --git a/SpaceChildEvent.html b/SpaceChildEvent.html index 1638b324..5626a212 100644 --- a/SpaceChildEvent.html +++ b/SpaceChildEvent.html @@ -94,7 +94,7 @@ diff --git a/SpaceChildEventContent.html b/SpaceChildEventContent.html index 65e1adcc..97185102 100644 --- a/SpaceChildEventContent.html +++ b/SpaceChildEventContent.html @@ -94,7 +94,7 @@ diff --git a/SpaceCreateOptions.html b/SpaceCreateOptions.html index 157f100d..2e972501 100644 --- a/SpaceCreateOptions.html +++ b/SpaceCreateOptions.html @@ -94,7 +94,7 @@ diff --git a/SpaceEntityMap.html b/SpaceEntityMap.html index 1c131ac1..86261500 100644 --- a/SpaceEntityMap.html +++ b/SpaceEntityMap.html @@ -94,7 +94,7 @@ diff --git a/StateEvent.html b/StateEvent.html index f7b16a56..743c506e 100644 --- a/StateEvent.html +++ b/StateEvent.html @@ -94,7 +94,7 @@ diff --git a/SynapseAdminApis.html b/SynapseAdminApis.html index ccfce551..c0e09eb8 100644 --- a/SynapseAdminApis.html +++ b/SynapseAdminApis.html @@ -94,7 +94,7 @@ diff --git a/SynapseAdminApis.ts.html b/SynapseAdminApis.ts.html index 536f9023..bdb41696 100644 --- a/SynapseAdminApis.ts.html +++ b/SynapseAdminApis.ts.html @@ -96,7 +96,7 @@ diff --git a/SynapseRegistrationToken.html b/SynapseRegistrationToken.html index eb3307fc..8dc469d5 100644 --- a/SynapseRegistrationToken.html +++ b/SynapseRegistrationToken.html @@ -94,7 +94,7 @@ diff --git a/SynapseRoomList.html b/SynapseRoomList.html index 6df3b2ab..3fadf005 100644 --- a/SynapseRoomList.html +++ b/SynapseRoomList.html @@ -94,7 +94,7 @@ diff --git a/SynapseRoomListing.html b/SynapseRoomListing.html index 5e4a6e08..68519b1f 100644 --- a/SynapseRoomListing.html +++ b/SynapseRoomListing.html @@ -94,7 +94,7 @@ diff --git a/SynapseUser.html b/SynapseUser.html index 7aab57bf..489144e1 100644 --- a/SynapseUser.html +++ b/SynapseUser.html @@ -94,7 +94,7 @@ diff --git a/SynapseUserList.html b/SynapseUserList.html index 90f72fc1..aa04cfd5 100644 --- a/SynapseUserList.html +++ b/SynapseUserList.html @@ -94,7 +94,7 @@ diff --git a/SynapseUserListing.html b/SynapseUserListing.html index 1078fa34..9d636c6d 100644 --- a/SynapseUserListing.html +++ b/SynapseUserListing.html @@ -94,7 +94,7 @@ diff --git a/SynapseUserProperties.html b/SynapseUserProperties.html index 1bad6a04..4f3ba4b8 100644 --- a/SynapseUserProperties.html +++ b/SynapseUserProperties.html @@ -94,7 +94,7 @@ diff --git a/SynchronousMatrixClient.html b/SynchronousMatrixClient.html index 29b78632..0485a29c 100644 --- a/SynchronousMatrixClient.html +++ b/SynchronousMatrixClient.html @@ -94,7 +94,7 @@ diff --git a/SynchronousMatrixClient.ts.html b/SynchronousMatrixClient.ts.html index eeeee632..d28795bb 100644 --- a/SynchronousMatrixClient.ts.html +++ b/SynchronousMatrixClient.ts.html @@ -96,7 +96,7 @@ diff --git a/SynchronousMatrixClient_SynchronousMatrixClient.html b/SynchronousMatrixClient_SynchronousMatrixClient.html index 0bb869cc..31f6a71e 100644 --- a/SynchronousMatrixClient_SynchronousMatrixClient.html +++ b/SynchronousMatrixClient_SynchronousMatrixClient.html @@ -94,7 +94,7 @@ diff --git a/TextualMessageEventContent.html b/TextualMessageEventContent.html index 442dcded..0c5e435d 100644 --- a/TextualMessageEventContent.html +++ b/TextualMessageEventContent.html @@ -94,7 +94,7 @@ diff --git a/Threepid.html b/Threepid.html index 7ea62bee..52648a84 100644 --- a/Threepid.html +++ b/Threepid.html @@ -94,7 +94,7 @@ diff --git a/ThumbnailInfo.html b/ThumbnailInfo.html index 2dca695f..060ebff5 100644 --- a/ThumbnailInfo.html +++ b/ThumbnailInfo.html @@ -94,7 +94,7 @@ diff --git a/ThumbnailedFileInfo.html b/ThumbnailedFileInfo.html index 1a2ab9e3..88eee1b2 100644 --- a/ThumbnailedFileInfo.html +++ b/ThumbnailedFileInfo.html @@ -94,7 +94,7 @@ diff --git a/TimedFileInfo.html b/TimedFileInfo.html index 430b8da1..cdb56ec0 100644 --- a/TimedFileInfo.html +++ b/TimedFileInfo.html @@ -94,7 +94,7 @@ diff --git a/TranslatedPolicy.html b/TranslatedPolicy.html index 61a93bac..c8f3955a 100644 --- a/TranslatedPolicy.html +++ b/TranslatedPolicy.html @@ -94,7 +94,7 @@ diff --git a/TypicalUnsigned.html b/TypicalUnsigned.html index 94ff61fc..1a78e0de 100644 --- a/TypicalUnsigned.html +++ b/TypicalUnsigned.html @@ -94,7 +94,7 @@ diff --git a/UnpaddedBase64.html b/UnpaddedBase64.html index d7c9756c..38324a41 100644 --- a/UnpaddedBase64.html +++ b/UnpaddedBase64.html @@ -94,7 +94,7 @@ diff --git a/UnstableApis.html b/UnstableApis.html index 73a80068..8ac05052 100644 --- a/UnstableApis.html +++ b/UnstableApis.html @@ -94,7 +94,7 @@ diff --git a/UnstableApis.ts.html b/UnstableApis.ts.html index 736c3449..4037f78d 100644 --- a/UnstableApis.ts.html +++ b/UnstableApis.ts.html @@ -96,7 +96,7 @@ diff --git a/UnstableAppserviceApis.html b/UnstableAppserviceApis.html index 5e92a717..54a260a4 100644 --- a/UnstableAppserviceApis.html +++ b/UnstableAppserviceApis.html @@ -94,7 +94,7 @@ diff --git a/UserDevice.html b/UserDevice.html index 66df6015..c7f27cd9 100644 --- a/UserDevice.html +++ b/UserDevice.html @@ -94,7 +94,7 @@ diff --git a/UserID.html b/UserID.html index 1526a235..f43d2541 100644 --- a/UserID.html +++ b/UserID.html @@ -94,7 +94,7 @@ diff --git a/VideoFileInfo.html b/VideoFileInfo.html index ab0d57f1..c0341379 100644 --- a/VideoFileInfo.html +++ b/VideoFileInfo.html @@ -94,7 +94,7 @@ diff --git a/VideoMessageEventContent.html b/VideoMessageEventContent.html index 2511837d..b87cc4c1 100644 --- a/VideoMessageEventContent.html +++ b/VideoMessageEventContent.html @@ -94,7 +94,7 @@ diff --git a/WhoisInfo.html b/WhoisInfo.html index 092e9fac..51a591e8 100644 --- a/WhoisInfo.html +++ b/WhoisInfo.html @@ -94,7 +94,7 @@ diff --git a/appservice_Appservice.ts.html b/appservice_Appservice.ts.html index 3b34757a..295ecbce 100644 --- a/appservice_Appservice.ts.html +++ b/appservice_Appservice.ts.html @@ -96,7 +96,7 @@ diff --git a/appservice_Intent.ts.html b/appservice_Intent.ts.html index 8b36b951..362476c6 100644 --- a/appservice_Intent.ts.html +++ b/appservice_Intent.ts.html @@ -96,7 +96,7 @@ diff --git a/appservice_MatrixBridge.ts.html b/appservice_MatrixBridge.ts.html index 2cac1b9f..01f66ffe 100644 --- a/appservice_MatrixBridge.ts.html +++ b/appservice_MatrixBridge.ts.html @@ -96,7 +96,7 @@ diff --git a/appservice_UnstableAppserviceApis.ts.html b/appservice_UnstableAppserviceApis.ts.html index c07603f7..0c480806 100644 --- a/appservice_UnstableAppserviceApis.ts.html +++ b/appservice_UnstableAppserviceApis.ts.html @@ -96,7 +96,7 @@ diff --git a/appservice_http_responses.ts.html b/appservice_http_responses.ts.html index 131c87b4..039851ff 100644 --- a/appservice_http_responses.ts.html +++ b/appservice_http_responses.ts.html @@ -96,7 +96,7 @@ diff --git a/b64.ts.html b/b64.ts.html index 7c1dbc72..19bf8029 100644 --- a/b64.ts.html +++ b/b64.ts.html @@ -96,7 +96,7 @@ diff --git a/e2ee_CryptoClient.ts.html b/e2ee_CryptoClient.ts.html index 845b33e0..0228d3fd 100644 --- a/e2ee_CryptoClient.ts.html +++ b/e2ee_CryptoClient.ts.html @@ -96,7 +96,7 @@ diff --git a/e2ee_ICryptoRoomInformation.ts.html b/e2ee_ICryptoRoomInformation.ts.html index 0ae3ea4c..8c754b3b 100644 --- a/e2ee_ICryptoRoomInformation.ts.html +++ b/e2ee_ICryptoRoomInformation.ts.html @@ -96,7 +96,7 @@ diff --git a/e2ee_RoomTracker.ts.html b/e2ee_RoomTracker.ts.html index a5778928..20251acf 100644 --- a/e2ee_RoomTracker.ts.html +++ b/e2ee_RoomTracker.ts.html @@ -96,7 +96,7 @@ diff --git a/e2ee_RustEngine.ts.html b/e2ee_RustEngine.ts.html index cfa734aa..70912235 100644 --- a/e2ee_RustEngine.ts.html +++ b/e2ee_RustEngine.ts.html @@ -96,7 +96,7 @@ diff --git a/e2ee_decorators.ts.html b/e2ee_decorators.ts.html index 3e988b43..8df3d398 100644 --- a/e2ee_decorators.ts.html +++ b/e2ee_decorators.ts.html @@ -96,7 +96,7 @@ diff --git a/global.html b/global.html index 81fc81c8..93651876 100644 --- a/global.html +++ b/global.html @@ -94,7 +94,7 @@ diff --git a/helpers_MatrixEntity.ts.html b/helpers_MatrixEntity.ts.html index 827dda81..6c70345e 100644 --- a/helpers_MatrixEntity.ts.html +++ b/helpers_MatrixEntity.ts.html @@ -96,7 +96,7 @@ diff --git a/helpers_MatrixGlob.ts.html b/helpers_MatrixGlob.ts.html index 25a194a0..69d1bda2 100644 --- a/helpers_MatrixGlob.ts.html +++ b/helpers_MatrixGlob.ts.html @@ -96,7 +96,7 @@ diff --git a/helpers_MentionPill.ts.html b/helpers_MentionPill.ts.html index 1765c68d..519e33da 100644 --- a/helpers_MentionPill.ts.html +++ b/helpers_MentionPill.ts.html @@ -96,7 +96,7 @@ diff --git a/helpers_Permalinks.ts.html b/helpers_Permalinks.ts.html index 5da951d7..2d5fdafc 100644 --- a/helpers_Permalinks.ts.html +++ b/helpers_Permalinks.ts.html @@ -96,7 +96,7 @@ diff --git a/helpers_ProfileCache.ts.html b/helpers_ProfileCache.ts.html index c9e14d82..5833e92e 100644 --- a/helpers_ProfileCache.ts.html +++ b/helpers_ProfileCache.ts.html @@ -96,7 +96,7 @@ diff --git a/helpers_RichReply.ts.html b/helpers_RichReply.ts.html index f59c8742..4a5b024f 100644 --- a/helpers_RichReply.ts.html +++ b/helpers_RichReply.ts.html @@ -96,7 +96,7 @@ diff --git a/helpers_UnpaddedBase64.ts.html b/helpers_UnpaddedBase64.ts.html index 97110477..30263207 100644 --- a/helpers_UnpaddedBase64.ts.html +++ b/helpers_UnpaddedBase64.ts.html @@ -96,7 +96,7 @@ diff --git a/http.ts.html b/http.ts.html index 576a7948..90ad3efe 100644 --- a/http.ts.html +++ b/http.ts.html @@ -96,7 +96,7 @@ diff --git a/identity_IdentityClient.ts.html b/identity_IdentityClient.ts.html index 8dddf9c6..844b8b47 100644 --- a/identity_IdentityClient.ts.html +++ b/identity_IdentityClient.ts.html @@ -96,7 +96,7 @@ diff --git a/index.html b/index.html index 8b9c5305..54379077 100644 --- a/index.html +++ b/index.html @@ -94,7 +94,7 @@ diff --git a/logging_ConsoleLogger.ts.html b/logging_ConsoleLogger.ts.html index 454b24a8..56040fdb 100644 --- a/logging_ConsoleLogger.ts.html +++ b/logging_ConsoleLogger.ts.html @@ -96,7 +96,7 @@ diff --git a/logging_ILogger.ts.html b/logging_ILogger.ts.html index af14a7b1..102bf130 100644 --- a/logging_ILogger.ts.html +++ b/logging_ILogger.ts.html @@ -96,7 +96,7 @@ diff --git a/logging_LogService.ts.html b/logging_LogService.ts.html index 95dfe89b..82ece160 100644 --- a/logging_LogService.ts.html +++ b/logging_LogService.ts.html @@ -96,7 +96,7 @@ diff --git a/logging_RichConsoleLogger.ts.html b/logging_RichConsoleLogger.ts.html index 5d5b21fa..627a514f 100644 --- a/logging_RichConsoleLogger.ts.html +++ b/logging_RichConsoleLogger.ts.html @@ -96,7 +96,7 @@ diff --git a/metrics_IMetricListener.ts.html b/metrics_IMetricListener.ts.html index 0b97873f..fc3895d0 100644 --- a/metrics_IMetricListener.ts.html +++ b/metrics_IMetricListener.ts.html @@ -96,7 +96,7 @@ diff --git a/metrics_Metrics.ts.html b/metrics_Metrics.ts.html index 4d527979..4215a4a1 100644 --- a/metrics_Metrics.ts.html +++ b/metrics_Metrics.ts.html @@ -96,7 +96,7 @@ diff --git a/metrics_contexts.ts.html b/metrics_contexts.ts.html index 098836c6..2adb9d2a 100644 --- a/metrics_contexts.ts.html +++ b/metrics_contexts.ts.html @@ -96,7 +96,7 @@ diff --git a/metrics_decorators.ts.html b/metrics_decorators.ts.html index cac54064..13f6484d 100644 --- a/metrics_decorators.ts.html +++ b/metrics_decorators.ts.html @@ -96,7 +96,7 @@ diff --git a/metrics_names.ts.html b/metrics_names.ts.html index 0469c360..2f06c4cf 100644 --- a/metrics_names.ts.html +++ b/metrics_names.ts.html @@ -96,7 +96,7 @@ diff --git a/mixins_AutojoinRoomsMixin.ts.html b/mixins_AutojoinRoomsMixin.ts.html index 6b4f8b82..cdb9d982 100644 --- a/mixins_AutojoinRoomsMixin.ts.html +++ b/mixins_AutojoinRoomsMixin.ts.html @@ -96,7 +96,7 @@ diff --git a/mixins_AutojoinUpgradedRoomsMixin.ts.html b/mixins_AutojoinUpgradedRoomsMixin.ts.html index 3dc07115..e16e964a 100644 --- a/mixins_AutojoinUpgradedRoomsMixin.ts.html +++ b/mixins_AutojoinUpgradedRoomsMixin.ts.html @@ -96,7 +96,7 @@ diff --git a/models_Account.ts.html b/models_Account.ts.html index 149f51eb..e10714f2 100644 --- a/models_Account.ts.html +++ b/models_Account.ts.html @@ -96,7 +96,7 @@ diff --git a/models_CreateRoom.ts.html b/models_CreateRoom.ts.html index 2e63620e..1920c4ab 100644 --- a/models_CreateRoom.ts.html +++ b/models_CreateRoom.ts.html @@ -96,7 +96,7 @@ diff --git a/models_Crypto.ts.html b/models_Crypto.ts.html index 9bdbb443..ab542f84 100644 --- a/models_Crypto.ts.html +++ b/models_Crypto.ts.html @@ -96,7 +96,7 @@ diff --git a/models_IdentityServerModels.ts.html b/models_IdentityServerModels.ts.html index d4a5b726..f4e96789 100644 --- a/models_IdentityServerModels.ts.html +++ b/models_IdentityServerModels.ts.html @@ -96,7 +96,7 @@ diff --git a/models_MSC2176.ts.html b/models_MSC2176.ts.html index 4703ab25..264612e8 100644 --- a/models_MSC2176.ts.html +++ b/models_MSC2176.ts.html @@ -96,7 +96,7 @@ diff --git a/models_MatrixError.ts.html b/models_MatrixError.ts.html index 205442ac..338127b7 100644 --- a/models_MatrixError.ts.html +++ b/models_MatrixError.ts.html @@ -96,7 +96,7 @@ diff --git a/models_MatrixProfile.ts.html b/models_MatrixProfile.ts.html index f06e611d..70332758 100644 --- a/models_MatrixProfile.ts.html +++ b/models_MatrixProfile.ts.html @@ -96,7 +96,7 @@ diff --git a/models_OpenIDConnect.ts.html b/models_OpenIDConnect.ts.html index 10179ba7..db37dcf2 100644 --- a/models_OpenIDConnect.ts.html +++ b/models_OpenIDConnect.ts.html @@ -96,7 +96,7 @@ diff --git a/models_Policies.ts.html b/models_Policies.ts.html index c0f2e97f..5b00f2ae 100644 --- a/models_Policies.ts.html +++ b/models_Policies.ts.html @@ -96,7 +96,7 @@ diff --git a/models_PowerLevelAction.ts.html b/models_PowerLevelAction.ts.html index b9a065c0..babbc70c 100644 --- a/models_PowerLevelAction.ts.html +++ b/models_PowerLevelAction.ts.html @@ -96,7 +96,7 @@ diff --git a/models_PowerLevelBounds.ts.html b/models_PowerLevelBounds.ts.html index 5833878f..0fa7de2d 100644 --- a/models_PowerLevelBounds.ts.html +++ b/models_PowerLevelBounds.ts.html @@ -96,7 +96,7 @@ diff --git a/models_Presence.ts.html b/models_Presence.ts.html index d3cde214..2223b989 100644 --- a/models_Presence.ts.html +++ b/models_Presence.ts.html @@ -96,7 +96,7 @@ diff --git a/models_ServerVersions.ts.html b/models_ServerVersions.ts.html index a5400ee1..a14683f9 100644 --- a/models_ServerVersions.ts.html +++ b/models_ServerVersions.ts.html @@ -96,7 +96,7 @@ diff --git a/models_Spaces.ts.html b/models_Spaces.ts.html index 16122508..e8031aec 100644 --- a/models_Spaces.ts.html +++ b/models_Spaces.ts.html @@ -96,7 +96,7 @@ diff --git a/models_Threepid.ts.html b/models_Threepid.ts.html index cb855fb6..8a517cf3 100644 --- a/models_Threepid.ts.html +++ b/models_Threepid.ts.html @@ -96,7 +96,7 @@ diff --git a/models_events_AliasesEvent.ts.html b/models_events_AliasesEvent.ts.html index 63d79d47..9c98654f 100644 --- a/models_events_AliasesEvent.ts.html +++ b/models_events_AliasesEvent.ts.html @@ -96,7 +96,7 @@ diff --git a/models_events_CanonicalAliasEvent.ts.html b/models_events_CanonicalAliasEvent.ts.html index 7e8cc831..3e25526a 100644 --- a/models_events_CanonicalAliasEvent.ts.html +++ b/models_events_CanonicalAliasEvent.ts.html @@ -96,7 +96,7 @@ diff --git a/models_events_CreateEvent.ts.html b/models_events_CreateEvent.ts.html index 12931ae1..ff9dd3f5 100644 --- a/models_events_CreateEvent.ts.html +++ b/models_events_CreateEvent.ts.html @@ -96,7 +96,7 @@ diff --git a/models_events_EncryptedRoomEvent.ts.html b/models_events_EncryptedRoomEvent.ts.html index dbfd90a2..055fe791 100644 --- a/models_events_EncryptedRoomEvent.ts.html +++ b/models_events_EncryptedRoomEvent.ts.html @@ -96,7 +96,7 @@ diff --git a/models_events_EncryptionEvent.ts.html b/models_events_EncryptionEvent.ts.html index b692154e..71580041 100644 --- a/models_events_EncryptionEvent.ts.html +++ b/models_events_EncryptionEvent.ts.html @@ -96,7 +96,7 @@ diff --git a/models_events_Event.ts.html b/models_events_Event.ts.html index 055310ff..de38735e 100644 --- a/models_events_Event.ts.html +++ b/models_events_Event.ts.html @@ -96,7 +96,7 @@ diff --git a/models_events_EventKind.ts.html b/models_events_EventKind.ts.html index 90ece4cb..6f4dd867 100644 --- a/models_events_EventKind.ts.html +++ b/models_events_EventKind.ts.html @@ -96,7 +96,7 @@ diff --git a/models_events_InvalidEventError.ts.html b/models_events_InvalidEventError.ts.html index 55839912..4f808402 100644 --- a/models_events_InvalidEventError.ts.html +++ b/models_events_InvalidEventError.ts.html @@ -96,7 +96,7 @@ diff --git a/models_events_JoinRulesEvent.ts.html b/models_events_JoinRulesEvent.ts.html index 60a8f30b..9d71cbc1 100644 --- a/models_events_JoinRulesEvent.ts.html +++ b/models_events_JoinRulesEvent.ts.html @@ -96,7 +96,7 @@ diff --git a/models_events_MembershipEvent.ts.html b/models_events_MembershipEvent.ts.html index 552a3eba..cdf0587f 100644 --- a/models_events_MembershipEvent.ts.html +++ b/models_events_MembershipEvent.ts.html @@ -96,7 +96,7 @@ diff --git a/models_events_MessageEvent.ts.html b/models_events_MessageEvent.ts.html index 5f3348d4..bc689b74 100644 --- a/models_events_MessageEvent.ts.html +++ b/models_events_MessageEvent.ts.html @@ -96,7 +96,7 @@ diff --git a/models_events_PinnedEventsEvent.ts.html b/models_events_PinnedEventsEvent.ts.html index 58b50d1b..77e40e2f 100644 --- a/models_events_PinnedEventsEvent.ts.html +++ b/models_events_PinnedEventsEvent.ts.html @@ -96,7 +96,7 @@ diff --git a/models_events_PowerLevelsEvent.ts.html b/models_events_PowerLevelsEvent.ts.html index 58ab4cd4..44ed65ed 100644 --- a/models_events_PowerLevelsEvent.ts.html +++ b/models_events_PowerLevelsEvent.ts.html @@ -96,7 +96,7 @@ diff --git a/models_events_PresenceEvent.ts.html b/models_events_PresenceEvent.ts.html index 77fafc0a..400e3642 100644 --- a/models_events_PresenceEvent.ts.html +++ b/models_events_PresenceEvent.ts.html @@ -96,7 +96,7 @@ diff --git a/models_events_RedactionEvent.ts.html b/models_events_RedactionEvent.ts.html index 8dce0088..3f147ec6 100644 --- a/models_events_RedactionEvent.ts.html +++ b/models_events_RedactionEvent.ts.html @@ -96,7 +96,7 @@ diff --git a/models_events_RoomAvatarEvent.ts.html b/models_events_RoomAvatarEvent.ts.html index 539f8418..f60b2d89 100644 --- a/models_events_RoomAvatarEvent.ts.html +++ b/models_events_RoomAvatarEvent.ts.html @@ -96,7 +96,7 @@ diff --git a/models_events_RoomEvent.ts.html b/models_events_RoomEvent.ts.html index c5f42e38..a4207a20 100644 --- a/models_events_RoomEvent.ts.html +++ b/models_events_RoomEvent.ts.html @@ -96,7 +96,7 @@ diff --git a/models_events_RoomNameEvent.ts.html b/models_events_RoomNameEvent.ts.html index 9a0fac82..0eb493c6 100644 --- a/models_events_RoomNameEvent.ts.html +++ b/models_events_RoomNameEvent.ts.html @@ -96,7 +96,7 @@ diff --git a/models_events_RoomTopicEvent.ts.html b/models_events_RoomTopicEvent.ts.html index 468a599d..ec8f34e3 100644 --- a/models_events_RoomTopicEvent.ts.html +++ b/models_events_RoomTopicEvent.ts.html @@ -96,7 +96,7 @@ diff --git a/models_events_SpaceChildEvent.ts.html b/models_events_SpaceChildEvent.ts.html index 6678aa65..b784255d 100644 --- a/models_events_SpaceChildEvent.ts.html +++ b/models_events_SpaceChildEvent.ts.html @@ -96,7 +96,7 @@ diff --git a/models_events_converter.ts.html b/models_events_converter.ts.html index 132c60ac..06869f61 100644 --- a/models_events_converter.ts.html +++ b/models_events_converter.ts.html @@ -96,7 +96,7 @@ diff --git a/models_unstable_MediaInfo.ts.html b/models_unstable_MediaInfo.ts.html index b71935ec..b36b97a7 100644 --- a/models_unstable_MediaInfo.ts.html +++ b/models_unstable_MediaInfo.ts.html @@ -96,7 +96,7 @@ diff --git a/preprocessors_IPreprocessor.ts.html b/preprocessors_IPreprocessor.ts.html index 2ccea40e..13382b86 100644 --- a/preprocessors_IPreprocessor.ts.html +++ b/preprocessors_IPreprocessor.ts.html @@ -96,7 +96,7 @@ diff --git a/preprocessors_RichRepliesPreprocessor.ts.html b/preprocessors_RichRepliesPreprocessor.ts.html index 3af2e6e3..543e38f4 100644 --- a/preprocessors_RichRepliesPreprocessor.ts.html +++ b/preprocessors_RichRepliesPreprocessor.ts.html @@ -96,7 +96,7 @@ diff --git a/request.ts.html b/request.ts.html index 6e11fdcb..c31d247a 100644 --- a/request.ts.html +++ b/request.ts.html @@ -96,7 +96,7 @@ diff --git a/simple-validation.ts.html b/simple-validation.ts.html index 49b8609b..15591b8c 100644 --- a/simple-validation.ts.html +++ b/simple-validation.ts.html @@ -96,7 +96,7 @@ diff --git a/storage_IAppserviceStorageProvider.ts.html b/storage_IAppserviceStorageProvider.ts.html index 2409f0d4..0b1ee9a7 100644 --- a/storage_IAppserviceStorageProvider.ts.html +++ b/storage_IAppserviceStorageProvider.ts.html @@ -96,7 +96,7 @@ diff --git a/storage_ICryptoStorageProvider.ts.html b/storage_ICryptoStorageProvider.ts.html index 1292dbda..0c72ef88 100644 --- a/storage_ICryptoStorageProvider.ts.html +++ b/storage_ICryptoStorageProvider.ts.html @@ -96,7 +96,7 @@ diff --git a/storage_IStorageProvider.ts.html b/storage_IStorageProvider.ts.html index 66f25d2a..5f139279 100644 --- a/storage_IStorageProvider.ts.html +++ b/storage_IStorageProvider.ts.html @@ -96,7 +96,7 @@ diff --git a/storage_MemoryStorageProvider.ts.html b/storage_MemoryStorageProvider.ts.html index 7af43264..c681dc54 100644 --- a/storage_MemoryStorageProvider.ts.html +++ b/storage_MemoryStorageProvider.ts.html @@ -96,7 +96,7 @@ diff --git a/storage_RustSdkCryptoStorageProvider.ts.html b/storage_RustSdkCryptoStorageProvider.ts.html index 0f39af93..c14238cd 100644 --- a/storage_RustSdkCryptoStorageProvider.ts.html +++ b/storage_RustSdkCryptoStorageProvider.ts.html @@ -96,7 +96,7 @@ diff --git a/storage_SimpleFsStorageProvider.ts.html b/storage_SimpleFsStorageProvider.ts.html index 41d5ffee..c5e11ddc 100644 --- a/storage_SimpleFsStorageProvider.ts.html +++ b/storage_SimpleFsStorageProvider.ts.html @@ -96,7 +96,7 @@ diff --git a/storage_SimplePostgresStorageProvider.ts.html b/storage_SimplePostgresStorageProvider.ts.html new file mode 100644 index 00000000..97e01c3d --- /dev/null +++ b/storage_SimplePostgresStorageProvider.ts.html @@ -0,0 +1,313 @@ + + + + + + + + + + storage/SimplePostgresStorageProvider.ts + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+
+
+ +
+
+
+

Source

+

storage/SimplePostgresStorageProvider.ts

+
+ + + + + +
+
+
import * as postgres from "postgres";
+
+import { IStorageProvider } from "./IStorageProvider";
+import { IAppserviceStorageProvider } from "./IAppserviceStorageProvider";
+import { IFilterInfo } from "../IFilter";
+
+/**
+ * A barebones postgresql storage provider. It is not efficient, but it does work.
+ * @category Storage providers
+ */
+export class SimplePostgresStorageProvider implements IStorageProvider, IAppserviceStorageProvider {
+    private readonly db: postgres.Sql;
+    private readonly waitPromise: Promise<void>;
+    private completedTransactions = [];
+
+    /**
+     * Creates a new simple postgresql storage provider.
+     * @param connectionString The `postgres://` connection string to use.
+     * @param trackTransactionsInMemory True (default) to track all received appservice transactions rather than on disk.
+     * @param maxInMemoryTransactions The maximum number of transactions to hold in memory before rotating the oldest out. Defaults to 20.
+     */
+    constructor(connectionString: string, private trackTransactionsInMemory = true, private maxInMemoryTransactions = 20) {
+        this.db = postgres(connectionString);
+
+        this.waitPromise = Promise.all([
+            this.db`
+                CREATE TABLE IF NOT EXISTS bot_metadata (key TEXT NOT NULL PRIMARY KEY, value TEXT);
+            `,
+            this.db`
+                CREATE TABLE IF NOT EXISTS bot_kv (key TEXT NOT NULL PRIMARY KEY, value TEXT);
+            `,
+            this.db`
+                CREATE TABLE IF NOT EXISTS appservice_users (user_id TEXT NOT NULL PRIMARY KEY, registered BOOLEAN NOT NULL);
+            `,
+            this.db`
+                CREATE TABLE IF NOT EXISTS appservice_transactions (txn_id TEXT NOT NULL PRIMARY KEY, completed BOOLEAN NOT NULL);
+            `,
+        ]).then();
+    }
+
+    public async setSyncToken(token: string | null): Promise<any> {
+        await this.waitPromise;
+        return this.db`
+            INSERT INTO bot_metadata (key, value) VALUES ('syncToken', ${token}) 
+            ON CONFLICT (key) DO UPDATE SET value = ${token};
+        `;
+    }
+
+    public async getSyncToken(): Promise<string | null> {
+        await this.waitPromise;
+        return (await this.db`
+            SELECT value FROM bot_metadata WHERE key = 'syncToken';
+        `)[0]?.value;
+    }
+
+    public async setFilter(filter: IFilterInfo): Promise<any> {
+        await this.waitPromise;
+        const filterStr = filter ? JSON.stringify(filter) : null;
+        return this.db`
+            INSERT INTO bot_metadata (key, value) VALUES ('filter', ${filterStr}) 
+            ON CONFLICT (key) DO UPDATE SET value = ${filterStr};
+        `;
+    }
+
+    public async getFilter(): Promise<IFilterInfo> {
+        await this.waitPromise;
+        const value = (await this.db`
+            SELECT value FROM bot_metadata WHERE key = 'filter';
+        `)[0]?.value;
+        return typeof value === "string" ? JSON.parse(value) : value;
+    }
+
+    public async addRegisteredUser(userId: string): Promise<any> {
+        await this.waitPromise;
+        return this.db`
+            INSERT INTO appservice_users (user_id, registered) VALUES (${userId}, TRUE) 
+            ON CONFLICT (user_id) DO UPDATE SET registered = TRUE;
+        `;
+    }
+
+    public async isUserRegistered(userId: string): Promise<boolean> {
+        await this.waitPromise;
+        return !!(await this.db`
+            SELECT registered FROM appservice_users WHERE user_id = ${userId};
+        `)[0]?.registered;
+    }
+
+    public async setTransactionCompleted(transactionId: string): Promise<any> {
+        await this.waitPromise;
+        if (this.trackTransactionsInMemory) {
+            if (this.completedTransactions.indexOf(transactionId) === -1) {
+                this.completedTransactions.push(transactionId);
+            }
+            if (this.completedTransactions.length > this.maxInMemoryTransactions) {
+                this.completedTransactions = this.completedTransactions.reverse().slice(0, this.maxInMemoryTransactions).reverse();
+            }
+            return;
+        }
+
+        return this.db`
+            INSERT INTO appservice_transactions (txn_id, completed) VALUES (${transactionId}, TRUE) 
+            ON CONFLICT (txn_id) DO UPDATE SET completed = TRUE;
+        `;
+    }
+
+    public async isTransactionCompleted(transactionId: string): Promise<boolean> {
+        await this.waitPromise;
+        if (this.trackTransactionsInMemory) {
+            return this.completedTransactions.includes(transactionId);
+        }
+
+        return (await this.db`
+            SELECT completed FROM appservice_transactions WHERE txn_id = ${transactionId};
+        `)[0]?.completed;
+    }
+
+    public async readValue(key: string): Promise<string | null | undefined> {
+        await this.waitPromise;
+        return (await this.db`
+            SELECT value FROM bot_kv WHERE key = ${key};
+        `)[0]?.value;
+    }
+
+    public async storeValue(key: string, value: string): Promise<void> {
+        await this.waitPromise;
+        return this.db`
+            INSERT INTO bot_kv (key, value) VALUES (${key}, ${value}) 
+            ON CONFLICT (key) DO UPDATE SET value = ${value};            
+        `.then();
+    }
+
+    public storageForUser(userId: string): IStorageProvider {
+        return new NamespacedPostgresProvider(userId, this);
+    }
+}
+
+/**
+ * A namespaced storage provider that uses postgres to store information.
+ * @category Storage providers
+ */
+class NamespacedPostgresProvider implements IStorageProvider {
+    constructor(private prefix: string, private parent: SimplePostgresStorageProvider) {
+    }
+
+    public setFilter(filter: IFilterInfo): Promise<any> | void {
+        return this.parent.storeValue(`${this.prefix}_internal_filter`, JSON.stringify(filter));
+    }
+
+    public async getFilter(): Promise<IFilterInfo> {
+        return this.parent.readValue(`${this.prefix}_internal_filter`).then(r => r ? JSON.parse(r) : r);
+    }
+
+    public setSyncToken(token: string | null): Promise<any> | void {
+        return this.parent.storeValue(`${this.prefix}_internal_syncToken`, token ?? "");
+    }
+
+    public async getSyncToken(): Promise<string> {
+        return this.parent.readValue(`${this.prefix}_internal_syncToken`).then(r => r === "" ? null : r);
+    }
+
+    public storeValue(key: string, value: string): Promise<any> | void {
+        return this.parent.storeValue(`${this.prefix}_internal_kv_${key}`, value);
+    }
+
+    public readValue(key: string): string | Promise<string | null | undefined> | null | undefined {
+        return this.parent.readValue(`${this.prefix}_internal_kv_${key}`);
+    }
+}
+
+
+
+ + + + +
+ + + +
+
+
+
+ + + + + + + diff --git a/strategies_AppserviceJoinRoomStrategy.ts.html b/strategies_AppserviceJoinRoomStrategy.ts.html index 2da61f04..c708a561 100644 --- a/strategies_AppserviceJoinRoomStrategy.ts.html +++ b/strategies_AppserviceJoinRoomStrategy.ts.html @@ -96,7 +96,7 @@ diff --git a/strategies_JoinRoomStrategy.ts.html b/strategies_JoinRoomStrategy.ts.html index 7d8fa0ee..9bf92580 100644 --- a/strategies_JoinRoomStrategy.ts.html +++ b/strategies_JoinRoomStrategy.ts.html @@ -96,7 +96,7 @@