@breautek/storm 3.3.1 → 4.1.0
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.
- package/CHANGELOG.md +24 -0
- package/bt-config-sample.jsonc +1 -1
- package/docs/README.md +153 -62
- package/docs/classes/{Application.Application-1.md → Application.md} +111 -113
- package/docs/classes/{BackendAuthenticationMiddleware.BackendAuthenticationMiddleware-1.md → BackendAuthenticationMiddleware.md} +6 -8
- package/docs/classes/CORSMiddleware.md +143 -0
- package/docs/classes/{ConfigLoader.ConfigLoader-1.md → ConfigLoader.md} +5 -7
- package/docs/classes/{Database.Database-1.md → Database.md} +30 -32
- package/docs/classes/{DatabaseConnection.DatabaseConnection-1.md → DatabaseConnection.md} +57 -59
- package/docs/classes/DatabaseQueryError.md +307 -0
- package/docs/classes/DiskSpaceError.md +301 -0
- package/docs/classes/DropTemporaryTableQuery.md +201 -0
- package/docs/classes/DumpStream.md +23 -0
- package/docs/classes/DuplicateEntryError.md +303 -0
- package/docs/classes/EntityNotFoundError.md +301 -0
- package/docs/classes/ExpiredTokenError.md +301 -0
- package/docs/classes/Handler.md +323 -0
- package/docs/classes/InternalError.md +301 -0
- package/docs/classes/InvalidCredentialsError.md +301 -0
- package/docs/classes/InvalidValueError.md +309 -0
- package/docs/classes/ManagedDatabaseConnection.md +397 -0
- package/docs/classes/Middleware.md +72 -0
- package/docs/classes/MissingConfigError.md +301 -0
- package/docs/classes/MissingParameterError.md +301 -0
- package/docs/classes/{MySQLConnection.MySQLConnection-1.md → MySQLConnection.md} +63 -65
- package/docs/classes/MySQLDatabase.md +314 -0
- package/docs/classes/{Query.Query-1.md → Query.md} +40 -34
- package/docs/classes/RawQuery.md +218 -0
- package/docs/classes/Request.md +321 -0
- package/docs/classes/Response.md +242 -0
- package/docs/classes/{ResponseData.ResponseData-1.md → ResponseData.md} +18 -20
- package/docs/classes/ServiceProvider.md +296 -0
- package/docs/classes/{ServiceResponse.ServiceResponse-1.md → ServiceResponse.md} +9 -11
- package/docs/classes/SetSessionVariableQuery.md +201 -0
- package/docs/classes/StormError.md +307 -0
- package/docs/classes/TemporaryTableQuery.md +207 -0
- package/docs/classes/{Token.Token-1.md → Token.md} +5 -7
- package/docs/classes/{TokenManager.TokenManager-1.md → TokenManager.md} +16 -18
- package/docs/classes/UnauthorizedAccessError.md +301 -0
- package/docs/enums/ErrorCode.md +107 -0
- package/docs/enums/ExitCode.md +30 -0
- package/docs/enums/HTTPMethod.md +52 -0
- package/docs/enums/JWTError.md +30 -0
- package/docs/enums/StatusCode.md +536 -0
- package/docs/interfaces/IAdditionalErrorDetails.md +7 -0
- package/docs/interfaces/{IAuthTokenData.IAuthTokenData-1.md → IAuthTokenData.md} +4 -6
- package/docs/interfaces/IConfig.md +112 -0
- package/docs/interfaces/{IDatabaseConfig.IDatabaseConfig-1.md → IDatabaseConfig.md} +13 -15
- package/docs/interfaces/{IDatabaseConnection.IDatabaseConnection-1.md → IDatabaseConnection.md} +33 -35
- package/docs/interfaces/IErrorResponse.md +52 -0
- package/docs/interfaces/IFormData.md +30 -0
- package/docs/interfaces/{IHandler.IHandler-1.md → IHandler.md} +4 -6
- package/docs/interfaces/IInsertQueryResult.md +41 -0
- package/docs/interfaces/IJWTVerifyOptions.md +19 -0
- package/docs/interfaces/IParameterMap.md +7 -0
- package/docs/interfaces/IRequestResponse.md +37 -0
- package/docs/interfaces/IServiceHeaders.md +7 -0
- package/docs/interfaces/ISetSessionVariableQueryInput.md +30 -0
- package/docs/interfaces/ITemporaryTableQueryInput.md +30 -0
- package/docs/interfaces/IUpdateQueryResult.md +30 -0
- package/docs/interfaces/formidable.EmitData.md +54 -0
- package/docs/interfaces/{api.formidable.EventData.md → formidable.EventData.md} +10 -10
- package/docs/interfaces/formidable.Fields.md +9 -0
- package/docs/interfaces/{api.formidable.File.md → formidable.File.md} +12 -12
- package/docs/interfaces/{api.formidable.FileJSON.md → formidable.FileJSON.md} +12 -12
- package/docs/interfaces/formidable.Files.md +9 -0
- package/docs/interfaces/{api.formidable.Options.md → formidable.Options.md} +17 -15
- package/docs/interfaces/{api.formidable.Part.md → formidable.Part.md} +41 -41
- package/docs/modules/{api.formidable.md → formidable.md} +25 -27
- package/lib/Application.js +1 -1
- package/lib/Application.js.map +1 -1
- package/lib/BackendAuthenticationMiddleware.js +2 -2
- package/lib/BackendAuthenticationMiddleware.js.map +1 -1
- package/lib/CORSMiddleware.js +1 -1
- package/lib/CORSMiddleware.js.map +1 -1
- package/lib/ConfigLoader.js +1 -1
- package/lib/ConfigLoader.js.map +1 -1
- package/lib/Database.js +1 -1
- package/lib/Database.js.map +1 -1
- package/lib/DatabaseConnection.js +4 -4
- package/lib/DatabaseConnection.js.map +1 -1
- package/lib/Handler.js +2 -2
- package/lib/Handler.js.map +1 -1
- package/lib/ManagedDatabaseConnection.js +4 -4
- package/lib/ManagedDatabaseConnection.js.map +1 -1
- package/lib/MySQLConnection.js +7 -7
- package/lib/MySQLConnection.js.map +1 -1
- package/lib/MySQLDatabase.js +4 -4
- package/lib/MySQLDatabase.js.map +1 -1
- package/lib/Query.d.ts +3 -4
- package/lib/Query.js +2 -2
- package/lib/Query.js.map +1 -1
- package/lib/RawQuery.d.ts +1 -1
- package/lib/RawQuery.js.map +1 -1
- package/lib/Request.d.ts +1 -0
- package/lib/Request.js +2 -2
- package/lib/Request.js.map +1 -1
- package/lib/Response.d.ts +1 -0
- package/lib/Response.js +1 -1
- package/lib/Response.js.map +1 -1
- package/lib/ServiceProvider.d.ts +1 -2
- package/lib/ServiceProvider.js.map +1 -1
- package/lib/ServiceResponse.d.ts +1 -0
- package/lib/SetSessionVariableQuery.d.ts +9 -0
- package/lib/SetSessionVariableQuery.js +20 -0
- package/lib/SetSessionVariableQuery.js.map +1 -0
- package/lib/StormError.js +1 -1
- package/lib/StormError.js.map +1 -1
- package/lib/TemporaryTableQuery.d.ts +3 -3
- package/lib/TemporaryTableQuery.js +2 -2
- package/lib/TemporaryTableQuery.js.map +1 -1
- package/lib/TokenManager.js +1 -1
- package/lib/TokenManager.js.map +1 -1
- package/lib/api.d.ts +1 -0
- package/lib/api.js +3 -1
- package/lib/api.js.map +1 -1
- package/package.json +22 -23
- package/src/Database.ts +1 -2
- package/src/DatabaseConnection.ts +4 -5
- package/src/Query.ts +4 -5
- package/src/RawQuery.ts +1 -1
- package/src/ServiceProvider.ts +1 -2
- package/src/SetSessionVariableQuery.ts +28 -0
- package/src/TemporaryTableQuery.ts +5 -5
- package/src/api.ts +1 -0
- package/.nyc_output/01d7f3ed-ada5-4fbf-bf72-17458de5eda1.json +0 -1
- package/.nyc_output/07a372ea-5f20-411a-8f9b-5cfd38c9f7cf.json +0 -1
- package/.nyc_output/1a03fe29-15f4-4d36-a6f1-061f95c919d2.json +0 -1
- package/.nyc_output/1be973a3-2986-4e51-9bef-ffa834a81029.json +0 -1
- package/.nyc_output/1fa3f196-6284-4422-b186-8fb97ac299b1.json +0 -1
- package/.nyc_output/21b4136c-a3f4-465a-ab85-cdfa70dda252.json +0 -1
- package/.nyc_output/279ce3fa-118b-4b21-bbd4-a0dbabb3cf28.json +0 -1
- package/.nyc_output/370daf16-8792-4296-a491-4b0ff8c5c03d.json +0 -1
- package/.nyc_output/44cabfc1-f759-4ff5-9502-0967bba28c3b.json +0 -1
- package/.nyc_output/52cc8740-cb58-4b4e-b952-bedee8b2a4b9.json +0 -1
- package/.nyc_output/5359ad53-153e-4a68-9158-095880ce3682.json +0 -1
- package/.nyc_output/54476a59-73ed-43c2-b90f-46bad1fd2b24.json +0 -1
- package/.nyc_output/5e815b47-2082-47aa-8d02-548d8f0175a6.json +0 -1
- package/.nyc_output/6300a22c-16ee-4f46-a5bc-ac392153ef39.json +0 -1
- package/.nyc_output/6331ec83-1ccd-4980-8cdb-55f87f01b6a0.json +0 -1
- package/.nyc_output/6a819ad4-b691-45b3-b693-98f812bd3249.json +0 -1
- package/.nyc_output/77e0e45c-5d9f-4848-96a1-cc36e5373078.json +0 -1
- package/.nyc_output/790a50c9-e677-48ed-9d87-3ca0d173f7b0.json +0 -1
- package/.nyc_output/7dad65fb-92f5-4d0a-a576-e071c1ab73e5.json +0 -1
- package/.nyc_output/7ee3638f-2a2d-4d5a-9970-254a86884c40.json +0 -1
- package/.nyc_output/883b8a83-3a1e-4153-a987-3a2f5455a627.json +0 -1
- package/.nyc_output/8dc3a0b6-b04e-45f5-85ec-99efabb63499.json +0 -1
- package/.nyc_output/8e03b522-9fef-4fae-82c0-f51611fab55a.json +0 -1
- package/.nyc_output/946bad92-6c4b-4ac1-b508-83983322629c.json +0 -1
- package/.nyc_output/95d30443-c776-4f68-ab14-34ecdccdaee4.json +0 -1
- package/.nyc_output/abc21188-b3dc-4cce-bc20-f0680a4dde62.json +0 -1
- package/.nyc_output/ac7ebac2-d226-41f9-b271-25b0ad449de0.json +0 -1
- package/.nyc_output/ae1048af-74db-41a3-b4d7-e511f60259ef.json +0 -1
- package/.nyc_output/b121ce1e-5d6b-4b6d-93a7-21b315098afc.json +0 -1
- package/.nyc_output/bb6d14e4-2e75-45bd-a1f0-67c21781bcf6.json +0 -1
- package/.nyc_output/c5d84f76-682f-429c-9b0d-241c81a72907.json +0 -1
- package/.nyc_output/d14c616f-ca9b-402d-879d-c7e91ecc6b89.json +0 -1
- package/.nyc_output/d3096a06-29ef-4de7-b565-b7b1ca58471a.json +0 -1
- package/.nyc_output/d6313ced-0715-41aa-a0bb-22eeae3cccc1.json +0 -1
- package/.nyc_output/e7143b16-9cb3-4900-9498-05c40f90af46.json +0 -1
- package/.nyc_output/eb21b824-fc88-4f0c-9e72-bd691a141b75.json +0 -1
- package/.nyc_output/ee09e08d-c0f5-4fba-9fa1-849b0f32f347.json +0 -1
- package/.nyc_output/ee8b9792-e4fc-4950-8532-733858a2a7f2.json +0 -1
- package/.nyc_output/f4344c1d-e947-4c51-abe0-e3600b4e721d.json +0 -1
- package/.nyc_output/f7d0a4d2-62db-494d-bb67-78e3f93ae05b.json +0 -1
- package/.nyc_output/processinfo/01d7f3ed-ada5-4fbf-bf72-17458de5eda1.json +0 -1
- package/.nyc_output/processinfo/07a372ea-5f20-411a-8f9b-5cfd38c9f7cf.json +0 -1
- package/.nyc_output/processinfo/1a03fe29-15f4-4d36-a6f1-061f95c919d2.json +0 -1
- package/.nyc_output/processinfo/1be973a3-2986-4e51-9bef-ffa834a81029.json +0 -1
- package/.nyc_output/processinfo/1fa3f196-6284-4422-b186-8fb97ac299b1.json +0 -1
- package/.nyc_output/processinfo/21b4136c-a3f4-465a-ab85-cdfa70dda252.json +0 -1
- package/.nyc_output/processinfo/279ce3fa-118b-4b21-bbd4-a0dbabb3cf28.json +0 -1
- package/.nyc_output/processinfo/370daf16-8792-4296-a491-4b0ff8c5c03d.json +0 -1
- package/.nyc_output/processinfo/44cabfc1-f759-4ff5-9502-0967bba28c3b.json +0 -1
- package/.nyc_output/processinfo/52cc8740-cb58-4b4e-b952-bedee8b2a4b9.json +0 -1
- package/.nyc_output/processinfo/5359ad53-153e-4a68-9158-095880ce3682.json +0 -1
- package/.nyc_output/processinfo/54476a59-73ed-43c2-b90f-46bad1fd2b24.json +0 -1
- package/.nyc_output/processinfo/5e815b47-2082-47aa-8d02-548d8f0175a6.json +0 -1
- package/.nyc_output/processinfo/6300a22c-16ee-4f46-a5bc-ac392153ef39.json +0 -1
- package/.nyc_output/processinfo/6331ec83-1ccd-4980-8cdb-55f87f01b6a0.json +0 -1
- package/.nyc_output/processinfo/6a819ad4-b691-45b3-b693-98f812bd3249.json +0 -1
- package/.nyc_output/processinfo/77e0e45c-5d9f-4848-96a1-cc36e5373078.json +0 -1
- package/.nyc_output/processinfo/790a50c9-e677-48ed-9d87-3ca0d173f7b0.json +0 -1
- package/.nyc_output/processinfo/7dad65fb-92f5-4d0a-a576-e071c1ab73e5.json +0 -1
- package/.nyc_output/processinfo/7ee3638f-2a2d-4d5a-9970-254a86884c40.json +0 -1
- package/.nyc_output/processinfo/883b8a83-3a1e-4153-a987-3a2f5455a627.json +0 -1
- package/.nyc_output/processinfo/8dc3a0b6-b04e-45f5-85ec-99efabb63499.json +0 -1
- package/.nyc_output/processinfo/8e03b522-9fef-4fae-82c0-f51611fab55a.json +0 -1
- package/.nyc_output/processinfo/946bad92-6c4b-4ac1-b508-83983322629c.json +0 -1
- package/.nyc_output/processinfo/95d30443-c776-4f68-ab14-34ecdccdaee4.json +0 -1
- package/.nyc_output/processinfo/abc21188-b3dc-4cce-bc20-f0680a4dde62.json +0 -1
- package/.nyc_output/processinfo/ac7ebac2-d226-41f9-b271-25b0ad449de0.json +0 -1
- package/.nyc_output/processinfo/ae1048af-74db-41a3-b4d7-e511f60259ef.json +0 -1
- package/.nyc_output/processinfo/b121ce1e-5d6b-4b6d-93a7-21b315098afc.json +0 -1
- package/.nyc_output/processinfo/bb6d14e4-2e75-45bd-a1f0-67c21781bcf6.json +0 -1
- package/.nyc_output/processinfo/c5d84f76-682f-429c-9b0d-241c81a72907.json +0 -1
- package/.nyc_output/processinfo/d14c616f-ca9b-402d-879d-c7e91ecc6b89.json +0 -1
- package/.nyc_output/processinfo/d3096a06-29ef-4de7-b565-b7b1ca58471a.json +0 -1
- package/.nyc_output/processinfo/d6313ced-0715-41aa-a0bb-22eeae3cccc1.json +0 -1
- package/.nyc_output/processinfo/e7143b16-9cb3-4900-9498-05c40f90af46.json +0 -1
- package/.nyc_output/processinfo/eb21b824-fc88-4f0c-9e72-bd691a141b75.json +0 -1
- package/.nyc_output/processinfo/ee09e08d-c0f5-4fba-9fa1-849b0f32f347.json +0 -1
- package/.nyc_output/processinfo/ee8b9792-e4fc-4950-8532-733858a2a7f2.json +0 -1
- package/.nyc_output/processinfo/f4344c1d-e947-4c51-abe0-e3600b4e721d.json +0 -1
- package/.nyc_output/processinfo/f7d0a4d2-62db-494d-bb67-78e3f93ae05b.json +0 -1
- package/.nyc_output/processinfo/index.json +0 -1
- package/docs/classes/CORSMiddleware.CORSMiddleware-1.md +0 -145
- package/docs/classes/DatabaseQueryError.DatabaseQueryError-1.md +0 -309
- package/docs/classes/DiskSpaceError.DiskSpaceError-1.md +0 -303
- package/docs/classes/DropTemporaryTableQuery.DropTemporaryTableQuery-1.md +0 -197
- package/docs/classes/DumpStream.DumpStream-1.md +0 -25
- package/docs/classes/DuplicateEntryError.DuplicateEntryError-1.md +0 -305
- package/docs/classes/EntityNotFoundError.EntityNotFoundError-1.md +0 -303
- package/docs/classes/ExpiredTokenError.ExpiredTokenError-1.md +0 -303
- package/docs/classes/Handler.Handler-1.md +0 -325
- package/docs/classes/InternalError.InternalError-1.md +0 -303
- package/docs/classes/InvalidConfigError.InvalidConfigError-1.md +0 -316
- package/docs/classes/InvalidCredentialsError.InvalidCredentialsError-1.md +0 -303
- package/docs/classes/InvalidValueError.InvalidValueError-1.md +0 -311
- package/docs/classes/JWTVerifyOptionsParser.JWTVerifyOptionsParser-1.md +0 -45
- package/docs/classes/ManagedDatabaseConnection.ManagedDatabaseConnection-1.md +0 -399
- package/docs/classes/Middleware.Middleware-1.md +0 -74
- package/docs/classes/MissingConfigError.MissingConfigError-1.md +0 -303
- package/docs/classes/MissingParameterError.MissingParameterError-1.md +0 -303
- package/docs/classes/MySQLDatabase.MySQLDatabase-1.md +0 -316
- package/docs/classes/RawQuery.RawQuery-1.md +0 -212
- package/docs/classes/Request.Request-1.md +0 -323
- package/docs/classes/Response.Response-1.md +0 -244
- package/docs/classes/ServiceProvider.ServiceProvider-1.md +0 -298
- package/docs/classes/StormError.StormError-1.md +0 -309
- package/docs/classes/TemporaryTableQuery.TemporaryTableQuery-1.md +0 -197
- package/docs/classes/UnauthorizedAccessError.UnauthorizedAccessError-1.md +0 -301
- package/docs/classes/private_CommitQuery.CommitQuery.md +0 -197
- package/docs/classes/private_RollbackQuery.RollbackQuery.md +0 -197
- package/docs/classes/private_StartTransactionQuery.StartTransactionQuery.md +0 -197
- package/docs/enums/ApplicationEvent.ApplicationEvent-1.md +0 -21
- package/docs/enums/ErrorCode.ErrorCode-1.md +0 -109
- package/docs/enums/ExitCode.ExitCode-1.md +0 -32
- package/docs/enums/HTTPMethod.HTTPMethod-1.md +0 -54
- package/docs/enums/JWTError.JWTError-1.md +0 -32
- package/docs/enums/StatusCode.StatusCode-1.md +0 -538
- package/docs/interfaces/DropTemporaryTableQuery.IDropTemporaryTableQueryInput.md +0 -21
- package/docs/interfaces/IConfig.IConfig-1.md +0 -114
- package/docs/interfaces/IFormData.IFormData-1.md +0 -32
- package/docs/interfaces/IInsertQueryResult.IInsertQueryResult-1.md +0 -43
- package/docs/interfaces/IJWTVerifyOptions.IJWTVerifyOptions-1.md +0 -21
- package/docs/interfaces/IRequestResponse.IRequestResponse-1.md +0 -39
- package/docs/interfaces/IServiceHeaders.IServiceHeaders-1.md +0 -9
- package/docs/interfaces/IUpdateQueryResult.IUpdateQueryResult-1.md +0 -32
- package/docs/interfaces/Request.IParameterMap.md +0 -9
- package/docs/interfaces/Response.IHeaderKeyValuePair.md +0 -9
- package/docs/interfaces/StormError.IAdditionalErrorDetails.md +0 -9
- package/docs/interfaces/StormError.IErrorResponse.md +0 -54
- package/docs/interfaces/TemporaryTableQuery.ITemporaryTableQueryInput.md +0 -32
- package/docs/interfaces/api.formidable.EmitData.md +0 -54
- package/docs/interfaces/api.formidable.Fields.md +0 -9
- package/docs/interfaces/api.formidable.Files.md +0 -9
- package/docs/modules/Application.md +0 -9
- package/docs/modules/ApplicationEvent.md +0 -9
- package/docs/modules/BackendAuthenticationMiddleware.md +0 -9
- package/docs/modules/CORSMiddleware.md +0 -9
- package/docs/modules/ConfigLoader.md +0 -9
- package/docs/modules/Database.md +0 -9
- package/docs/modules/DatabaseConnection.md +0 -34
- package/docs/modules/DatabaseQueryError.md +0 -9
- package/docs/modules/DiskSpaceError.md +0 -9
- package/docs/modules/DropTemporaryTableQuery.md +0 -13
- package/docs/modules/DumpStream.md +0 -9
- package/docs/modules/DuplicateEntryError.md +0 -9
- package/docs/modules/EntityNotFoundError.md +0 -9
- package/docs/modules/ErrorCode.md +0 -9
- package/docs/modules/ExitCode.md +0 -9
- package/docs/modules/ExpiredTokenError.md +0 -9
- package/docs/modules/HTTPMethod.md +0 -9
- package/docs/modules/Handler.md +0 -50
- package/docs/modules/IAuthTokenData.md +0 -9
- package/docs/modules/IConfig.md +0 -9
- package/docs/modules/IDatabaseConfig.md +0 -9
- package/docs/modules/IDatabaseConnection.md +0 -9
- package/docs/modules/IDeleteQueryResult.md +0 -19
- package/docs/modules/IFormData.md +0 -9
- package/docs/modules/IHandler.md +0 -9
- package/docs/modules/IInsertQueryResult.md +0 -9
- package/docs/modules/IJWTVerifyOptions.md +0 -9
- package/docs/modules/IRequestResponse.md +0 -9
- package/docs/modules/IServiceHeaders.md +0 -9
- package/docs/modules/IUpdateQueryResult.md +0 -9
- package/docs/modules/InternalError.md +0 -9
- package/docs/modules/InvalidConfigError.md +0 -9
- package/docs/modules/InvalidCredentialsError.md +0 -9
- package/docs/modules/InvalidValueError.md +0 -9
- package/docs/modules/JWTError.md +0 -9
- package/docs/modules/JWTVerifyOptionsParser.md +0 -9
- package/docs/modules/ManagedDatabaseConnection.md +0 -9
- package/docs/modules/Middleware.md +0 -9
- package/docs/modules/MissingConfigError.md +0 -9
- package/docs/modules/MissingParameterError.md +0 -9
- package/docs/modules/MySQLConnection.md +0 -9
- package/docs/modules/MySQLDatabase.md +0 -9
- package/docs/modules/Query.md +0 -9
- package/docs/modules/RawQuery.md +0 -9
- package/docs/modules/Request.md +0 -13
- package/docs/modules/Response.md +0 -27
- package/docs/modules/ResponseData.md +0 -9
- package/docs/modules/ServiceProvider.md +0 -9
- package/docs/modules/ServiceResponse.md +0 -9
- package/docs/modules/StatusCode.md +0 -9
- package/docs/modules/StormError.md +0 -14
- package/docs/modules/TemporaryTableQuery.md +0 -13
- package/docs/modules/Token.md +0 -9
- package/docs/modules/TokenManager.md +0 -9
- package/docs/modules/UnauthorizedAccessError.md +0 -9
- package/docs/modules/api.md +0 -439
- package/docs/modules/instance.md +0 -44
- package/docs/modules/private_CommitQuery.md +0 -9
- package/docs/modules/private_RollbackQuery.md +0 -9
- package/docs/modules/private_StartTransactionQuery.md +0 -9
package/lib/api.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":";;;AAiBA,uCAAuC;AAA/B,uGAAA,WAAW,OAAA;AACnB,6CAA0C;AAAlC,0GAAA,WAAW,OAAA;AAGnB,+CAA4C;AAApC,4GAAA,YAAY,OAAA;AAGpB,uCAAoC;AAA5B,oGAAA,QAAQ,OAAA;AAChB,2DAAwD;AAAhD,wHAAA,kBAAkB,OAAA;AAC1B,iDAA8C;AAAtC,8GAAA,aAAa,OAAA;AACrB,qDAAkD;AAA1C,kHAAA,eAAe,OAAA;AACvB,yEAAsE;AAA9D,sIAAA,yBAAyB,OAAA;AACjC,iCAA8B;AAAtB,8FAAA,KAAK,OAAA;AACb,6DAAqF;AAA7E,0HAAA,mBAAmB,OAAA;AAC3B,qEAAkE;AAA1D,kIAAA,uBAAuB,OAAA;AAC/B,uCAAoC;AAA5B,oGAAA,QAAQ,OAAA;
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":";;;AAiBA,uCAAuC;AAA/B,uGAAA,WAAW,OAAA;AACnB,6CAA0C;AAAlC,0GAAA,WAAW,OAAA;AAGnB,+CAA4C;AAApC,4GAAA,YAAY,OAAA;AAGpB,uCAAoC;AAA5B,oGAAA,QAAQ,OAAA;AAChB,2DAAwD;AAAhD,wHAAA,kBAAkB,OAAA;AAC1B,iDAA8C;AAAtC,8GAAA,aAAa,OAAA;AACrB,qDAAkD;AAA1C,kHAAA,eAAe,OAAA;AACvB,yEAAsE;AAA9D,sIAAA,yBAAyB,OAAA;AACjC,iCAA8B;AAAtB,8FAAA,KAAK,OAAA;AACb,6DAAqF;AAA7E,0HAAA,mBAAmB,OAAA;AAC3B,qEAAkE;AAA1D,kIAAA,uBAAuB,OAAA;AAC/B,uCAAoC;AAA5B,oGAAA,QAAQ,OAAA;AAIhB,qEAAiG;AAAzF,kIAAA,uBAAuB,OAAA;AAG/B,yCAAsC;AAA9B,sGAAA,SAAS,OAAA;AACjB,2CAIsB;AAHlB,wGAAA,UAAU,OAAA;AAId,uCAAoC;AAA5B,oGAAA,QAAQ,OAAA;AAChB,iEAA8D;AAAtD,8HAAA,qBAAqB,OAAA;AAC7B,qEAAkE;AAA1D,kIAAA,uBAAuB,OAAA;AAC/B,iDAA8C;AAAtC,8GAAA,aAAa,OAAA;AACrB,yDAAsD;AAA9C,sHAAA,iBAAiB,OAAA;AACzB,yDAAsD;AAA9C,sHAAA,iBAAiB,OAAA;AACzB,qEAAkE;AAA1D,kIAAA,uBAAuB,OAAA;AAC/B,6DAA0D;AAAlD,0HAAA,mBAAmB,OAAA;AAC3B,mDAAgD;AAAxC,gHAAA,cAAc,OAAA;AACtB,6DAA0D;AAAlD,0HAAA,mBAAmB,OAAA;AAC3B,2DAAwD;AAAhD,wHAAA,kBAAkB,OAAA;AAC1B,2DAAwD;AAAhD,wHAAA,kBAAkB,OAAA;AAG1B,2CAAwC;AAAhC,wGAAA,UAAU,OAAA;AAClB,2CAAwC;AAAhC,wGAAA,UAAU,OAAA;AAClB,qCAAiD;AAAzC,kGAAA,OAAO,OAAA;AACf,uCAAoC;AAA5B,oGAAA,QAAQ,OAAA;AAChB,+CAA4C;AAApC,4GAAA,YAAY,OAAA;AACpB,qCAAmE;AAA3D,kGAAA,OAAO,OAAA;AACf,mDAAgD;AAAxC,gHAAA,cAAc,OAAA;AACtB,qDAAkD;AAA1C,kHAAA,eAAe,OAAA;AACvB,2CAAwC;AAAhC,wGAAA,UAAU,OAAA;AAClB,qDAAkD;AAA1C,kHAAA,eAAe,OAAA;AACvB,qFAAkF;AAA1E,kJAAA,+BAA+B,OAAA;AAcvC,iCAA8B;AAAtB,8FAAA,KAAK,OAAA;AACb,+CAA4C;AAApC,4GAAA,YAAY,OAAA;AAGpB,uCAAoC;AAA5B,oGAAA,QAAQ,OAAA;AAChB,2CAAwC;AAAhC,wGAAA,UAAU,OAAA;AAGlB,yCAAyC;AACjC,gCAAU"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@breautek/storm",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "Object-Oriented REST API framework",
|
|
5
5
|
"main": "lib/api.js",
|
|
6
6
|
"types": "lib/api.d.ts",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"build": "npm run lint && tsc",
|
|
12
12
|
"build:release": "NODE_ENV=production tsc",
|
|
13
13
|
"build-lib": "rm -r ./lib && tsc",
|
|
14
|
-
"build-docs": "typedoc --excludePrivate --readme none --out ./docs ./src",
|
|
14
|
+
"build-docs": "typedoc --excludePrivate --readme none --out ./docs ./src/api.ts",
|
|
15
15
|
"lint": "eslint --ext .ts '?(src|spec)/**/*.ts' --cache",
|
|
16
16
|
"unit": "jest",
|
|
17
17
|
"test": "npm run-script lint && jest",
|
|
@@ -40,29 +40,28 @@
|
|
|
40
40
|
"node": ">= 12.0.0"
|
|
41
41
|
},
|
|
42
42
|
"author": "norman@normanbreau.com",
|
|
43
|
-
"license": "
|
|
43
|
+
"license": "Apache-2.0",
|
|
44
44
|
"homepage": "https://github.com/breautek/storm.git",
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@arashi/token": "1.0.1",
|
|
47
47
|
"@breautek/merge-change": "1.0.0",
|
|
48
|
-
"@totalpave/interfaces": "3.0.0",
|
|
49
48
|
"@types/body-parser": "1.19.2",
|
|
50
49
|
"@types/express": "4.17.13",
|
|
51
50
|
"@types/formidable": "1.2.3",
|
|
52
|
-
"@types/jsonwebtoken": "8.5.
|
|
53
|
-
"@types/mysql": "2.15.
|
|
54
|
-
"@types/node": "16.11.
|
|
51
|
+
"@types/jsonwebtoken": "8.5.8",
|
|
52
|
+
"@types/mysql": "2.15.21",
|
|
53
|
+
"@types/node": "16.11.26",
|
|
55
54
|
"@types/uuid": "8.3.4",
|
|
56
|
-
"ajv": "8.
|
|
57
|
-
"body-parser": "1.
|
|
55
|
+
"ajv": "8.11.0",
|
|
56
|
+
"body-parser": "1.20.0",
|
|
58
57
|
"commander": "8.3.0",
|
|
59
|
-
"express": "4.
|
|
58
|
+
"express": "4.18.1",
|
|
60
59
|
"form-data": "4.0.0",
|
|
61
60
|
"formidable": "1.2.2",
|
|
62
61
|
"jsonwebtoken": "8.5.1",
|
|
63
62
|
"mysql": "2.18.1",
|
|
64
63
|
"sql-formatter": "4.0.2",
|
|
65
|
-
"tslib": "2.
|
|
64
|
+
"tslib": "2.4.0",
|
|
66
65
|
"uuid": "8.3.2"
|
|
67
66
|
},
|
|
68
67
|
"peerDependencies": {
|
|
@@ -70,17 +69,17 @@
|
|
|
70
69
|
},
|
|
71
70
|
"devDependencies": {
|
|
72
71
|
"@arashi/logger": "2.1.0",
|
|
73
|
-
"@totalpave/eslint-plugin": "6.0.
|
|
74
|
-
"@types/jest": "27.
|
|
75
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
76
|
-
"@typescript-eslint/parser": "5.
|
|
77
|
-
"auto-changelog": "2.
|
|
78
|
-
"eslint": "8.
|
|
79
|
-
"jest": "27.
|
|
80
|
-
"ts-jest": "27.1.
|
|
81
|
-
"ts-node": "10.
|
|
82
|
-
"typedoc": "0.
|
|
83
|
-
"typedoc-plugin-markdown": "3.
|
|
84
|
-
"typescript": "4.
|
|
72
|
+
"@totalpave/eslint-plugin": "6.0.2",
|
|
73
|
+
"@types/jest": "27.5.1",
|
|
74
|
+
"@typescript-eslint/eslint-plugin": "5.27.0",
|
|
75
|
+
"@typescript-eslint/parser": "5.27.0",
|
|
76
|
+
"auto-changelog": "2.4.0",
|
|
77
|
+
"eslint": "8.16.0",
|
|
78
|
+
"jest": "27.5.1",
|
|
79
|
+
"ts-jest": "27.1.3",
|
|
80
|
+
"ts-node": "10.8.0",
|
|
81
|
+
"typedoc": "0.22.17",
|
|
82
|
+
"typedoc-plugin-markdown": "3.12.1",
|
|
83
|
+
"typescript": "4.7.2"
|
|
85
84
|
}
|
|
86
85
|
}
|
package/src/Database.ts
CHANGED
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import { IDictionary } from '@totalpave/interfaces';
|
|
18
17
|
import * as UUID from 'uuid';
|
|
19
18
|
import {DatabaseConnection} from './DatabaseConnection';
|
|
20
19
|
import { getInstance } from './instance';
|
|
@@ -23,7 +22,7 @@ const MASTER_NAME: string = 'MASTER';
|
|
|
23
22
|
const TAG: string = 'Database';
|
|
24
23
|
|
|
25
24
|
export abstract class Database<TDatabaseConfig, TConnectionAPI> {
|
|
26
|
-
private $clusterConfigMap:
|
|
25
|
+
private $clusterConfigMap: Record<any, any>;
|
|
27
26
|
|
|
28
27
|
constructor() {
|
|
29
28
|
this.$clusterConfigMap = {};
|
|
@@ -21,7 +21,6 @@ import {Readable} from 'stream';
|
|
|
21
21
|
import {IDatabaseConnection} from './IDatabaseConnection';
|
|
22
22
|
import {Query} from './Query';
|
|
23
23
|
import { IConfig } from './IConfig';
|
|
24
|
-
import { IDictionary } from '@totalpave/interfaces';
|
|
25
24
|
|
|
26
25
|
export const LINGER_WARNING: number = 10000;
|
|
27
26
|
export const DEFAULT_QUERY_TIMEOUT: number = 3600000;
|
|
@@ -133,8 +132,8 @@ export abstract class DatabaseConnection<TAPI> implements IDatabaseConnection {
|
|
|
133
132
|
this.$armLingerWarning();
|
|
134
133
|
|
|
135
134
|
let queryStr: string = null;
|
|
136
|
-
queryStr = query.getQuery();
|
|
137
|
-
let params:
|
|
135
|
+
queryStr = query.getQuery(this);
|
|
136
|
+
let params: Record<any, any> = query.getParametersForQuery();
|
|
138
137
|
|
|
139
138
|
await query.onPreQuery(this);
|
|
140
139
|
let results: TQueryResult = await this._query<TQueryResult>(queryStr, params);
|
|
@@ -152,8 +151,8 @@ export abstract class DatabaseConnection<TAPI> implements IDatabaseConnection {
|
|
|
152
151
|
public stream(query: Query, streamOptions?: any): Readable {
|
|
153
152
|
this.$armLingerWarning();
|
|
154
153
|
let queryStr: string = null;
|
|
155
|
-
let params:
|
|
156
|
-
queryStr = query.getQuery();
|
|
154
|
+
let params: Record<any, any> = query.getParametersForQuery();
|
|
155
|
+
queryStr = query.getQuery(this);
|
|
157
156
|
return this._stream(queryStr, params, streamOptions);
|
|
158
157
|
}
|
|
159
158
|
|
package/src/Query.ts
CHANGED
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import { IDictionary } from '@totalpave/interfaces';
|
|
18
17
|
import { IDatabaseConnection } from './IDatabaseConnection';
|
|
19
18
|
|
|
20
19
|
export abstract class Query<TQueryParameters = any, TQueryResultSet = any, TQueryPostProcessedResultSet = TQueryResultSet> {
|
|
@@ -28,14 +27,14 @@ export abstract class Query<TQueryParameters = any, TQueryResultSet = any, TQuer
|
|
|
28
27
|
return this.$params;
|
|
29
28
|
}
|
|
30
29
|
|
|
31
|
-
public getParametersForQuery():
|
|
30
|
+
public getParametersForQuery(): Record<any, any> {
|
|
32
31
|
return this.$params;
|
|
33
32
|
}
|
|
34
33
|
|
|
35
|
-
protected abstract _getQuery(): string;
|
|
34
|
+
protected abstract _getQuery(connection: IDatabaseConnection): string;
|
|
36
35
|
|
|
37
|
-
public getQuery(): string {
|
|
38
|
-
return this._getQuery();
|
|
36
|
+
public getQuery(connection: IDatabaseConnection): string {
|
|
37
|
+
return this._getQuery(connection);
|
|
39
38
|
}
|
|
40
39
|
|
|
41
40
|
/**
|
package/src/RawQuery.ts
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
import {Query} from './Query';
|
|
18
18
|
|
|
19
|
-
export class RawQuery<TQueryParameters = any, TQueryResultSet = any> extends Query<TQueryParameters, TQueryResultSet,
|
|
19
|
+
export class RawQuery<TQueryParameters = any, TQueryResultSet = any, TQueryPostProcessedResultSet = TQueryResultSet> extends Query<TQueryParameters, TQueryResultSet, TQueryPostProcessedResultSet> {
|
|
20
20
|
private $query: string;
|
|
21
21
|
|
|
22
22
|
public constructor(query: string, parameters?: TQueryParameters) {
|
package/src/ServiceProvider.ts
CHANGED
|
@@ -19,7 +19,6 @@ import {IServiceHeaders} from './IServiceHeaders';
|
|
|
19
19
|
import {HTTPMethod} from './HTTPMethod';
|
|
20
20
|
import {ServiceResponse} from './ServiceResponse';
|
|
21
21
|
import * as http from 'http';
|
|
22
|
-
import { IDictionary } from '@totalpave/interfaces';
|
|
23
22
|
|
|
24
23
|
const TAG: string = 'ServiceProvider';
|
|
25
24
|
const NO_DATA: string = `|${0x0}|`;
|
|
@@ -62,7 +61,7 @@ export abstract class ServiceProvider {
|
|
|
62
61
|
return 'v1';
|
|
63
62
|
}
|
|
64
63
|
|
|
65
|
-
protected _createURL(url: string, queryParams?:
|
|
64
|
+
protected _createURL(url: string, queryParams?: Record<any, any>): string {
|
|
66
65
|
let queryString: string = '';
|
|
67
66
|
|
|
68
67
|
if (queryParams) {
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
|
|
2
|
+
import {
|
|
3
|
+
Query
|
|
4
|
+
} from './Query';
|
|
5
|
+
|
|
6
|
+
export interface ISetSessionVariableQueryInput {
|
|
7
|
+
name: string;
|
|
8
|
+
value: any;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export class SetSessionVariableQuery extends Query<ISetSessionVariableQueryInput, void> {
|
|
12
|
+
protected _getQuery(): string {
|
|
13
|
+
let params: ISetSessionVariableQueryInput = this.getParameters();
|
|
14
|
+
|
|
15
|
+
if (!/[a-zA-Z_]/ig.test(params.name)) {
|
|
16
|
+
throw new Error('Illegal Variable Name');
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// Only allow alpha letters & underscores for variable names
|
|
20
|
+
return `SET SESSION ${params.name} = :value`;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
public getParametersForQuery(): Record<any, any> {
|
|
24
|
+
return {
|
|
25
|
+
value: this.getParameters().value
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import {
|
|
17
|
+
import { IDatabaseConnection } from './IDatabaseConnection';
|
|
18
18
|
import {Query} from './Query';
|
|
19
19
|
|
|
20
20
|
export interface ITemporaryTableQueryInput {
|
|
@@ -24,20 +24,20 @@ export interface ITemporaryTableQueryInput {
|
|
|
24
24
|
|
|
25
25
|
export class TemporaryTableQuery extends Query<any> {
|
|
26
26
|
|
|
27
|
-
public getParametersForQuery():
|
|
28
|
-
let params:
|
|
27
|
+
public getParametersForQuery(): Record<any, any> {
|
|
28
|
+
let params: Record<any, any> = this.getParameters();
|
|
29
29
|
return {
|
|
30
30
|
...params.selectQuery.getParametersForQuery(),
|
|
31
31
|
tableName: params.tableName
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
protected _getQuery(): string {
|
|
35
|
+
protected override _getQuery(connection: IDatabaseConnection): string {
|
|
36
36
|
let params: ITemporaryTableQueryInput = this.getParameters();
|
|
37
37
|
|
|
38
38
|
return `
|
|
39
39
|
CREATE TEMPORARY TABLE \`${params.tableName}\`
|
|
40
|
-
${params.selectQuery.getQuery()}
|
|
40
|
+
${params.selectQuery.getQuery(connection)}
|
|
41
41
|
`;
|
|
42
42
|
}
|
|
43
43
|
}
|
package/src/api.ts
CHANGED
|
@@ -34,6 +34,7 @@ export {RawQuery} from './RawQuery';
|
|
|
34
34
|
export {IInsertQueryResult} from './IInsertQueryResult';
|
|
35
35
|
export {IDeleteQueryResult} from './IDeleteQueryResult';
|
|
36
36
|
export {IUpdateQueryResult} from './IUpdateQueryResult';
|
|
37
|
+
export {SetSessionVariableQuery, ISetSessionVariableQueryInput} from './SetSessionVariableQuery';
|
|
37
38
|
|
|
38
39
|
// Errors
|
|
39
40
|
export {ErrorCode} from './ErrorCode';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{}
|