@typetron/framework 0.5.6 → 0.5.7
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/package.json +1 -1
- package/.eslintrc-old.js +0 -208
- package/Cache/Cache.ts +0 -13
- package/Cache/Stores/DatabaseStore.ts +0 -120
- package/Cache/Stores/FileStore.ts +0 -69
- package/Cache/Stores/MemoryStore.ts +0 -71
- package/Cache/index.ts +0 -5
- package/Cache/types.ts +0 -4
- package/Container/ClassResolver.ts +0 -106
- package/Container/Container.ts +0 -144
- package/Container/Contracts.ts +0 -3
- package/Container/Decorators.ts +0 -20
- package/Container/Metadata.ts +0 -16
- package/Container/Resolver.ts +0 -27
- package/Container/index.ts +0 -5
- package/Database/Clauses/Where.ts +0 -0
- package/Database/Connection.ts +0 -52
- package/Database/Decorators.ts +0 -142
- package/Database/Drivers/DatabaseDriver.ts +0 -37
- package/Database/Drivers/MySQL/Alter/index.ts +0 -55
- package/Database/Drivers/MySQL/ColumnDefinition.ts +0 -16
- package/Database/Drivers/MySQL/Create.ts +0 -47
- package/Database/Drivers/MySQL/MysqlDriver.ts +0 -123
- package/Database/Drivers/MySQL/Schema.ts +0 -82
- package/Database/Drivers/MySQL/index.ts +0 -13
- package/Database/Drivers/SQL/Schema.ts +0 -73
- package/Database/Drivers/SQL/Statements/Alter.ts +0 -22
- package/Database/Drivers/SQL/Statements/BaseStatement.ts +0 -55
- package/Database/Drivers/SQL/Statements/Delete.ts +0 -20
- package/Database/Drivers/SQL/Statements/Insert.ts +0 -24
- package/Database/Drivers/SQL/Statements/Select.ts +0 -55
- package/Database/Drivers/SQL/Statements/Update.ts +0 -33
- package/Database/Drivers/SQL/index.ts +0 -8
- package/Database/Drivers/SQLite/Create.ts +0 -45
- package/Database/Drivers/SQLite/Schema.ts +0 -54
- package/Database/Drivers/SQLite/SqliteDriver.ts +0 -144
- package/Database/Drivers/SQLite/index.ts +0 -15
- package/Database/Drivers/SchemaContract.ts +0 -11
- package/Database/Drivers/Statement.ts +0 -16
- package/Database/Drivers/index.ts +0 -4
- package/Database/Entity.ts +0 -377
- package/Database/EntityNotFoundError.ts +0 -5
- package/Database/EntityProxyHandler.ts +0 -43
- package/Database/EntityQuery.ts +0 -197
- package/Database/Expression.ts +0 -3
- package/Database/Fields.ts +0 -816
- package/Database/Helpers.ts +0 -12
- package/Database/List.ts +0 -71
- package/Database/Migrations/Migration.ts +0 -10
- package/Database/Migrations/MigrationHistory.ts +0 -20
- package/Database/Migrations/Migrator.ts +0 -122
- package/Database/Migrations/index.ts +0 -3
- package/Database/ORM/BaseRelationship.ts +0 -10
- package/Database/Query.ts +0 -374
- package/Database/Seeders/Seeder.ts +0 -3
- package/Database/Seeders/SeederManager.ts +0 -27
- package/Database/Seeders/index.ts +0 -2
- package/Database/StringExpression.ts +0 -9
- package/Database/Types.ts +0 -165
- package/Database/index.ts +0 -23
- package/Encryption/index.ts +0 -51
- package/Forms/Decorators.ts +0 -29
- package/Forms/Form.ts +0 -70
- package/Forms/FormFields.ts +0 -36
- package/Forms/index.ts +0 -3
- package/Framework/App.ts +0 -10
- package/Framework/Application.ts +0 -118
- package/Framework/Auth/Auth.ts +0 -122
- package/Framework/Auth/Authenticatable.ts +0 -9
- package/Framework/Auth/User.ts +0 -27
- package/Framework/Auth/index.ts +0 -29
- package/Framework/Config/AppConfig.ts +0 -25
- package/Framework/Config/AuthConfig.ts +0 -9
- package/Framework/Config/BaseConfig.ts +0 -9
- package/Framework/Config/CacheConfig.ts +0 -38
- package/Framework/Config/DatabaseConfig.ts +0 -21
- package/Framework/Config/MailConfig.ts +0 -30
- package/Framework/Config/index.ts +0 -6
- package/Framework/Middleware/AuthMiddleware.ts +0 -31
- package/Framework/Middleware/CorsMiddleware.ts +0 -32
- package/Framework/Middleware/StaticAssetsMiddleware.ts +0 -76
- package/Framework/Middleware/index.ts +0 -2
- package/Framework/Provider.ts +0 -9
- package/Framework/Providers/CacheProvider.ts +0 -28
- package/Framework/Providers/DatabaseProvider.ts +0 -36
- package/Framework/Providers/MailProvider.ts +0 -31
- package/Framework/Providers/WebsocketsProvider.ts +0 -120
- package/Framework/Resolvers/AuthResolver.ts +0 -23
- package/Framework/Resolvers/EntityResolver.ts +0 -41
- package/Framework/Resolvers/FormResolver.ts +0 -37
- package/Framework/RootDir.ts +0 -1
- package/Framework/index.ts +0 -8
- package/Frontend/Angular/index.ts +0 -24
- package/Frontend/Websockets/index.ts +0 -86
- package/LICENSE.md +0 -21
- package/Mail/MailAddress.ts +0 -4
- package/Mail/MailTransport.ts +0 -6
- package/Mail/Mailable.ts +0 -16
- package/Mail/Mailer.ts +0 -27
- package/Mail/PendingMail.ts +0 -68
- package/Mail/SentMessage.ts +0 -20
- package/Mail/Transports/MemoryTransport.ts +0 -13
- package/Mail/Transports/SendGridTransport.ts +0 -95
- package/Mail/index.ts +0 -3
- package/Models/Model.ts +0 -41
- package/Models/index.ts +0 -54
- package/Readme.md +0 -123
- package/Router/BaseController.ts +0 -7
- package/Router/Decorators.ts +0 -224
- package/Router/Guard.ts +0 -10
- package/Router/Http/Contracts.ts +0 -4
- package/Router/Http/ErrorHandler.ts +0 -45
- package/Router/Http/ErrorHandlerInterface.ts +0 -6
- package/Router/Http/Errors/HttpError.ts +0 -15
- package/Router/Http/Handler.ts +0 -183
- package/Router/Http/HttpRoute.ts +0 -110
- package/Router/Http/Middleware.ts +0 -7
- package/Router/Http/Request.ts +0 -225
- package/Router/Http/Response.ts +0 -35
- package/Router/Http/index.ts +0 -85
- package/Router/Metadata.ts +0 -34
- package/Router/Middleware.ts +0 -16
- package/Router/Request.ts +0 -65
- package/Router/Route.ts +0 -16
- package/Router/RouteNotFoundError.ts +0 -5
- package/Router/Router.ts +0 -35
- package/Router/Servers/index.ts +0 -6
- package/Router/Servers/node.ts +0 -49
- package/Router/Servers/uNetworking.ts +0 -151
- package/Router/Websockets/Handler.ts +0 -82
- package/Router/Websockets/Middleware.ts +0 -7
- package/Router/Websockets/Request.ts +0 -3
- package/Router/Websockets/WebsocketRoute.ts +0 -61
- package/Router/Websockets/index.ts +0 -57
- package/Router/Websockets/types.ts +0 -23
- package/Router/index.ts +0 -6
- package/Storage/File.ts +0 -30
- package/Storage/Image.ts +0 -19
- package/Storage/InvalidImage.ts +0 -3
- package/Storage/Storage.ts +0 -98
- package/Storage/index.ts +0 -4
- package/Storage/utils.ts +0 -18
- package/Support/Array.ts +0 -184
- package/Support/Math.ts +0 -12
- package/Support/Metadata.ts +0 -31
- package/Support/String.ts +0 -38
- package/Support/index.ts +0 -19
- package/Support/utils.ts +0 -7
- package/Testing/TestCase.ts +0 -193
- package/Validation/Rule.ts +0 -9
- package/Validation/RuleInterface.ts +0 -10
- package/Validation/Rules/Email.ts +0 -20
- package/Validation/Rules/FileExtension.ts +0 -21
- package/Validation/Rules/MaxLength.ts +0 -17
- package/Validation/Rules/MinLength.ts +0 -18
- package/Validation/Rules/Optional.ts +0 -18
- package/Validation/Rules/Required.ts +0 -29
- package/Validation/Validator.ts +0 -7
- package/Validation/index.ts +0 -12
- package/benchmark-index.js +0 -20
- package/benchmark.ts +0 -47
- package/tests/Cache/DatabaseStoreTest.ts +0 -110
- package/tests/Cache/FileStoreTest.ts +0 -93
- package/tests/Cache/MemoryStoreTest.ts +0 -92
- package/tests/Container/ContainerTest.ts +0 -336
- package/tests/Database/Drivers/MySQL/AlterTest.ts +0 -100
- package/tests/Database/Drivers/MySQL/CreateTest.ts +0 -39
- package/tests/Database/Drivers/MysqlDriverTest.ts +0 -140
- package/tests/Database/Drivers/SqliteDriverTest.ts +0 -126
- package/tests/Database/Entities/Article.ts +0 -21
- package/tests/Database/Entities/Profile.ts +0 -21
- package/tests/Database/Entities/Role.ts +0 -15
- package/tests/Database/Entities/User.ts +0 -35
- package/tests/Database/EntityRelationshipsTest.ts +0 -475
- package/tests/Database/EntityTest.ts +0 -202
- package/tests/Database/Migrations/RunnerTest.ts +0 -96
- package/tests/Database/Migrations/migrations/1.createUserTable.ts +0 -12
- package/tests/Database/Migrations/migrations/2.createArticlesTable.ts +0 -12
- package/tests/Database/QueryTest.ts +0 -573
- package/tests/Database/SchemaTest.ts +0 -32
- package/tests/Database/Seeders/RunnerTest.ts +0 -30
- package/tests/Database/Seeders/seeders/RandomSeeder.ts +0 -10
- package/tests/Database/utils.ts +0 -16
- package/tests/Forms/FormsTest.ts +0 -59
- package/tests/Framework/Middleware/StaticAssetsMiddlewareTest.ts +0 -129
- package/tests/Framework/Resolvers/EntityResolverTest.ts +0 -48
- package/tests/Framework/Router/RouterTest.ts +0 -33
- package/tests/Mail/MailerTest.ts +0 -76
- package/tests/Model/ModelTest.ts +0 -183
- package/tests/Router/HttpHandlerTest.ts +0 -72
- package/tests/Router/RequestTest.ts +0 -77
- package/tests/Router/WebSocketsHandlerTest.ts +0 -51
- package/tests/Storage/StorageTest.ts +0 -97
- package/tests/Support/ArrayTest.ts +0 -167
- package/tests/Support/StringTest.ts +0 -18
- package/tests/Validation/RulesTest.ts +0 -54
- package/types.d.ts +0 -8
- /package/{build/Cache → Cache}/Cache.d.ts +0 -0
- /package/{build/Cache → Cache}/Cache.d.ts.map +0 -0
- /package/{build/Cache → Cache}/Cache.js +0 -0
- /package/{build/Cache → Cache}/Cache.js.map +0 -0
- /package/{build/Cache → Cache}/Stores/DatabaseStore.d.ts +0 -0
- /package/{build/Cache → Cache}/Stores/DatabaseStore.d.ts.map +0 -0
- /package/{build/Cache → Cache}/Stores/DatabaseStore.js +0 -0
- /package/{build/Cache → Cache}/Stores/DatabaseStore.js.map +0 -0
- /package/{build/Cache → Cache}/Stores/FileStore.d.ts +0 -0
- /package/{build/Cache → Cache}/Stores/FileStore.d.ts.map +0 -0
- /package/{build/Cache → Cache}/Stores/FileStore.js +0 -0
- /package/{build/Cache → Cache}/Stores/FileStore.js.map +0 -0
- /package/{build/Cache → Cache}/Stores/MemoryStore.d.ts +0 -0
- /package/{build/Cache → Cache}/Stores/MemoryStore.d.ts.map +0 -0
- /package/{build/Cache → Cache}/Stores/MemoryStore.js +0 -0
- /package/{build/Cache → Cache}/Stores/MemoryStore.js.map +0 -0
- /package/{build/Cache → Cache}/index.d.ts +0 -0
- /package/{build/Cache → Cache}/index.d.ts.map +0 -0
- /package/{build/Cache → Cache}/index.js +0 -0
- /package/{build/Cache → Cache}/index.js.map +0 -0
- /package/{build/Cache → Cache}/types.d.ts +0 -0
- /package/{build/Cache → Cache}/types.d.ts.map +0 -0
- /package/{build/Cache → Cache}/types.js +0 -0
- /package/{build/Cache → Cache}/types.js.map +0 -0
- /package/{build/Container → Container}/ClassResolver.d.ts +0 -0
- /package/{build/Container → Container}/ClassResolver.d.ts.map +0 -0
- /package/{build/Container → Container}/ClassResolver.js +0 -0
- /package/{build/Container → Container}/ClassResolver.js.map +0 -0
- /package/{build/Container → Container}/Container.d.ts +0 -0
- /package/{build/Container → Container}/Container.d.ts.map +0 -0
- /package/{build/Container → Container}/Container.js +0 -0
- /package/{build/Container → Container}/Container.js.map +0 -0
- /package/{build/Container → Container}/Contracts.d.ts +0 -0
- /package/{build/Container → Container}/Contracts.d.ts.map +0 -0
- /package/{build/Container → Container}/Contracts.js +0 -0
- /package/{build/Container → Container}/Contracts.js.map +0 -0
- /package/{build/Container → Container}/Decorators.d.ts +0 -0
- /package/{build/Container → Container}/Decorators.d.ts.map +0 -0
- /package/{build/Container → Container}/Decorators.js +0 -0
- /package/{build/Container → Container}/Decorators.js.map +0 -0
- /package/{build/Container → Container}/Metadata.d.ts +0 -0
- /package/{build/Container → Container}/Metadata.d.ts.map +0 -0
- /package/{build/Container → Container}/Metadata.js +0 -0
- /package/{build/Container → Container}/Metadata.js.map +0 -0
- /package/{build/Container → Container}/Resolver.d.ts +0 -0
- /package/{build/Container → Container}/Resolver.d.ts.map +0 -0
- /package/{build/Container → Container}/Resolver.js +0 -0
- /package/{build/Container → Container}/Resolver.js.map +0 -0
- /package/{build/Container → Container}/index.d.ts +0 -0
- /package/{build/Container → Container}/index.d.ts.map +0 -0
- /package/{build/Container → Container}/index.js +0 -0
- /package/{build/Container → Container}/index.js.map +0 -0
- /package/{build/Database → Database}/Clauses/Where.d.ts +0 -0
- /package/{build/Database → Database}/Clauses/Where.d.ts.map +0 -0
- /package/{build/Database → Database}/Clauses/Where.js +0 -0
- /package/{build/Database → Database}/Clauses/Where.js.map +0 -0
- /package/{build/Database → Database}/Connection.d.ts +0 -0
- /package/{build/Database → Database}/Connection.d.ts.map +0 -0
- /package/{build/Database → Database}/Connection.js +0 -0
- /package/{build/Database → Database}/Connection.js.map +0 -0
- /package/{build/Database → Database}/Decorators.d.ts +0 -0
- /package/{build/Database → Database}/Decorators.d.ts.map +0 -0
- /package/{build/Database → Database}/Decorators.js +0 -0
- /package/{build/Database → Database}/Decorators.js.map +0 -0
- /package/{build/Database → Database}/Drivers/DatabaseDriver.d.ts +0 -0
- /package/{build/Database → Database}/Drivers/DatabaseDriver.d.ts.map +0 -0
- /package/{build/Database → Database}/Drivers/DatabaseDriver.js +0 -0
- /package/{build/Database → Database}/Drivers/DatabaseDriver.js.map +0 -0
- /package/{build/Database → Database}/Drivers/MySQL/Alter/index.d.ts +0 -0
- /package/{build/Database → Database}/Drivers/MySQL/Alter/index.d.ts.map +0 -0
- /package/{build/Database → Database}/Drivers/MySQL/Alter/index.js +0 -0
- /package/{build/Database → Database}/Drivers/MySQL/Alter/index.js.map +0 -0
- /package/{build/Database → Database}/Drivers/MySQL/ColumnDefinition.d.ts +0 -0
- /package/{build/Database → Database}/Drivers/MySQL/ColumnDefinition.d.ts.map +0 -0
- /package/{build/Database → Database}/Drivers/MySQL/ColumnDefinition.js +0 -0
- /package/{build/Database → Database}/Drivers/MySQL/ColumnDefinition.js.map +0 -0
- /package/{build/Database → Database}/Drivers/MySQL/Create.d.ts +0 -0
- /package/{build/Database → Database}/Drivers/MySQL/Create.d.ts.map +0 -0
- /package/{build/Database → Database}/Drivers/MySQL/Create.js +0 -0
- /package/{build/Database → Database}/Drivers/MySQL/Create.js.map +0 -0
- /package/{build/Database → Database}/Drivers/MySQL/MysqlDriver.d.ts +0 -0
- /package/{build/Database → Database}/Drivers/MySQL/MysqlDriver.d.ts.map +0 -0
- /package/{build/Database → Database}/Drivers/MySQL/MysqlDriver.js +0 -0
- /package/{build/Database → Database}/Drivers/MySQL/MysqlDriver.js.map +0 -0
- /package/{build/Database → Database}/Drivers/MySQL/Schema.d.ts +0 -0
- /package/{build/Database → Database}/Drivers/MySQL/Schema.d.ts.map +0 -0
- /package/{build/Database → Database}/Drivers/MySQL/Schema.js +0 -0
- /package/{build/Database → Database}/Drivers/MySQL/Schema.js.map +0 -0
- /package/{build/Database → Database}/Drivers/MySQL/index.d.ts +0 -0
- /package/{build/Database → Database}/Drivers/MySQL/index.d.ts.map +0 -0
- /package/{build/Database → Database}/Drivers/MySQL/index.js +0 -0
- /package/{build/Database → Database}/Drivers/MySQL/index.js.map +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Schema.d.ts +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Schema.d.ts.map +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Schema.js +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Schema.js.map +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Statements/Alter.d.ts +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Statements/Alter.d.ts.map +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Statements/Alter.js +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Statements/Alter.js.map +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Statements/BaseStatement.d.ts +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Statements/BaseStatement.d.ts.map +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Statements/BaseStatement.js +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Statements/BaseStatement.js.map +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Statements/Delete.d.ts +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Statements/Delete.d.ts.map +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Statements/Delete.js +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Statements/Delete.js.map +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Statements/Insert.d.ts +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Statements/Insert.d.ts.map +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Statements/Insert.js +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Statements/Insert.js.map +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Statements/Select.d.ts +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Statements/Select.d.ts.map +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Statements/Select.js +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Statements/Select.js.map +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Statements/Update.d.ts +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Statements/Update.d.ts.map +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Statements/Update.js +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Statements/Update.js.map +0 -0
- /package/{build/Database → Database}/Drivers/SQL/index.d.ts +0 -0
- /package/{build/Database → Database}/Drivers/SQL/index.d.ts.map +0 -0
- /package/{build/Database → Database}/Drivers/SQL/index.js +0 -0
- /package/{build/Database → Database}/Drivers/SQL/index.js.map +0 -0
- /package/{build/Database → Database}/Drivers/SQLite/Create.d.ts +0 -0
- /package/{build/Database → Database}/Drivers/SQLite/Create.d.ts.map +0 -0
- /package/{build/Database → Database}/Drivers/SQLite/Create.js +0 -0
- /package/{build/Database → Database}/Drivers/SQLite/Create.js.map +0 -0
- /package/{build/Database → Database}/Drivers/SQLite/Schema.d.ts +0 -0
- /package/{build/Database → Database}/Drivers/SQLite/Schema.d.ts.map +0 -0
- /package/{build/Database → Database}/Drivers/SQLite/Schema.js +0 -0
- /package/{build/Database → Database}/Drivers/SQLite/Schema.js.map +0 -0
- /package/{build/Database → Database}/Drivers/SQLite/SqliteDriver.d.ts +0 -0
- /package/{build/Database → Database}/Drivers/SQLite/SqliteDriver.d.ts.map +0 -0
- /package/{build/Database → Database}/Drivers/SQLite/SqliteDriver.js +0 -0
- /package/{build/Database → Database}/Drivers/SQLite/SqliteDriver.js.map +0 -0
- /package/{build/Database → Database}/Drivers/SQLite/index.d.ts +0 -0
- /package/{build/Database → Database}/Drivers/SQLite/index.d.ts.map +0 -0
- /package/{build/Database → Database}/Drivers/SQLite/index.js +0 -0
- /package/{build/Database → Database}/Drivers/SQLite/index.js.map +0 -0
- /package/{build/Database → Database}/Drivers/SchemaContract.d.ts +0 -0
- /package/{build/Database → Database}/Drivers/SchemaContract.d.ts.map +0 -0
- /package/{build/Database → Database}/Drivers/SchemaContract.js +0 -0
- /package/{build/Database → Database}/Drivers/SchemaContract.js.map +0 -0
- /package/{build/Database → Database}/Drivers/Statement.d.ts +0 -0
- /package/{build/Database → Database}/Drivers/Statement.d.ts.map +0 -0
- /package/{build/Database → Database}/Drivers/Statement.js +0 -0
- /package/{build/Database → Database}/Drivers/Statement.js.map +0 -0
- /package/{build/Database → Database}/Drivers/index.d.ts +0 -0
- /package/{build/Database → Database}/Drivers/index.d.ts.map +0 -0
- /package/{build/Database → Database}/Drivers/index.js +0 -0
- /package/{build/Database → Database}/Drivers/index.js.map +0 -0
- /package/{build/Database → Database}/Entity.d.ts +0 -0
- /package/{build/Database → Database}/Entity.d.ts.map +0 -0
- /package/{build/Database → Database}/Entity.js +0 -0
- /package/{build/Database → Database}/Entity.js.map +0 -0
- /package/{build/Database → Database}/EntityNotFoundError.d.ts +0 -0
- /package/{build/Database → Database}/EntityNotFoundError.d.ts.map +0 -0
- /package/{build/Database → Database}/EntityNotFoundError.js +0 -0
- /package/{build/Database → Database}/EntityNotFoundError.js.map +0 -0
- /package/{build/Database → Database}/EntityProxyHandler.d.ts +0 -0
- /package/{build/Database → Database}/EntityProxyHandler.d.ts.map +0 -0
- /package/{build/Database → Database}/EntityProxyHandler.js +0 -0
- /package/{build/Database → Database}/EntityProxyHandler.js.map +0 -0
- /package/{build/Database → Database}/EntityQuery.d.ts +0 -0
- /package/{build/Database → Database}/EntityQuery.d.ts.map +0 -0
- /package/{build/Database → Database}/EntityQuery.js +0 -0
- /package/{build/Database → Database}/EntityQuery.js.map +0 -0
- /package/{build/Database → Database}/Expression.d.ts +0 -0
- /package/{build/Database → Database}/Expression.d.ts.map +0 -0
- /package/{build/Database → Database}/Expression.js +0 -0
- /package/{build/Database → Database}/Expression.js.map +0 -0
- /package/{build/Database → Database}/Fields.d.ts +0 -0
- /package/{build/Database → Database}/Fields.d.ts.map +0 -0
- /package/{build/Database → Database}/Fields.js +0 -0
- /package/{build/Database → Database}/Fields.js.map +0 -0
- /package/{build/Database → Database}/Helpers.d.ts +0 -0
- /package/{build/Database → Database}/Helpers.d.ts.map +0 -0
- /package/{build/Database → Database}/Helpers.js +0 -0
- /package/{build/Database → Database}/Helpers.js.map +0 -0
- /package/{build/Database → Database}/List.d.ts +0 -0
- /package/{build/Database → Database}/List.d.ts.map +0 -0
- /package/{build/Database → Database}/List.js +0 -0
- /package/{build/Database → Database}/List.js.map +0 -0
- /package/{build/Database → Database}/Migrations/Migration.d.ts +0 -0
- /package/{build/Database → Database}/Migrations/Migration.d.ts.map +0 -0
- /package/{build/Database → Database}/Migrations/Migration.js +0 -0
- /package/{build/Database → Database}/Migrations/Migration.js.map +0 -0
- /package/{build/Database → Database}/Migrations/MigrationHistory.d.ts +0 -0
- /package/{build/Database → Database}/Migrations/MigrationHistory.d.ts.map +0 -0
- /package/{build/Database → Database}/Migrations/MigrationHistory.js +0 -0
- /package/{build/Database → Database}/Migrations/MigrationHistory.js.map +0 -0
- /package/{build/Database → Database}/Migrations/Migrator.d.ts +0 -0
- /package/{build/Database → Database}/Migrations/Migrator.d.ts.map +0 -0
- /package/{build/Database → Database}/Migrations/Migrator.js +0 -0
- /package/{build/Database → Database}/Migrations/Migrator.js.map +0 -0
- /package/{build/Database → Database}/Migrations/index.d.ts +0 -0
- /package/{build/Database → Database}/Migrations/index.d.ts.map +0 -0
- /package/{build/Database → Database}/Migrations/index.js +0 -0
- /package/{build/Database → Database}/Migrations/index.js.map +0 -0
- /package/{build/Database → Database}/ORM/BaseRelationship.d.ts +0 -0
- /package/{build/Database → Database}/ORM/BaseRelationship.d.ts.map +0 -0
- /package/{build/Database → Database}/ORM/BaseRelationship.js +0 -0
- /package/{build/Database → Database}/ORM/BaseRelationship.js.map +0 -0
- /package/{build/Database → Database}/Query.d.ts +0 -0
- /package/{build/Database → Database}/Query.d.ts.map +0 -0
- /package/{build/Database → Database}/Query.js +0 -0
- /package/{build/Database → Database}/Query.js.map +0 -0
- /package/{build/Database → Database}/Seeders/Seeder.d.ts +0 -0
- /package/{build/Database → Database}/Seeders/Seeder.d.ts.map +0 -0
- /package/{build/Database → Database}/Seeders/Seeder.js +0 -0
- /package/{build/Database → Database}/Seeders/Seeder.js.map +0 -0
- /package/{build/Database → Database}/Seeders/SeederManager.d.ts +0 -0
- /package/{build/Database → Database}/Seeders/SeederManager.d.ts.map +0 -0
- /package/{build/Database → Database}/Seeders/SeederManager.js +0 -0
- /package/{build/Database → Database}/Seeders/SeederManager.js.map +0 -0
- /package/{build/Database → Database}/Seeders/index.d.ts +0 -0
- /package/{build/Database → Database}/Seeders/index.d.ts.map +0 -0
- /package/{build/Database → Database}/Seeders/index.js +0 -0
- /package/{build/Database → Database}/Seeders/index.js.map +0 -0
- /package/{build/Database → Database}/StringExpression.d.ts +0 -0
- /package/{build/Database → Database}/StringExpression.d.ts.map +0 -0
- /package/{build/Database → Database}/StringExpression.js +0 -0
- /package/{build/Database → Database}/StringExpression.js.map +0 -0
- /package/{build/Database → Database}/Types.d.ts +0 -0
- /package/{build/Database → Database}/Types.d.ts.map +0 -0
- /package/{build/Database → Database}/Types.js +0 -0
- /package/{build/Database → Database}/Types.js.map +0 -0
- /package/{build/Database → Database}/index.d.ts +0 -0
- /package/{build/Database → Database}/index.d.ts.map +0 -0
- /package/{build/Database → Database}/index.js +0 -0
- /package/{build/Database → Database}/index.js.map +0 -0
- /package/{build/Encryption → Encryption}/index.d.ts +0 -0
- /package/{build/Encryption → Encryption}/index.d.ts.map +0 -0
- /package/{build/Encryption → Encryption}/index.js +0 -0
- /package/{build/Encryption → Encryption}/index.js.map +0 -0
- /package/{build/Forms → Forms}/Decorators.d.ts +0 -0
- /package/{build/Forms → Forms}/Decorators.d.ts.map +0 -0
- /package/{build/Forms → Forms}/Decorators.js +0 -0
- /package/{build/Forms → Forms}/Decorators.js.map +0 -0
- /package/{build/Forms → Forms}/Form.d.ts +0 -0
- /package/{build/Forms → Forms}/Form.d.ts.map +0 -0
- /package/{build/Forms → Forms}/Form.js +0 -0
- /package/{build/Forms → Forms}/Form.js.map +0 -0
- /package/{build/Forms → Forms}/FormFields.d.ts +0 -0
- /package/{build/Forms → Forms}/FormFields.d.ts.map +0 -0
- /package/{build/Forms → Forms}/FormFields.js +0 -0
- /package/{build/Forms → Forms}/FormFields.js.map +0 -0
- /package/{build/Forms → Forms}/index.d.ts +0 -0
- /package/{build/Forms → Forms}/index.d.ts.map +0 -0
- /package/{build/Forms → Forms}/index.js +0 -0
- /package/{build/Forms → Forms}/index.js.map +0 -0
- /package/{build/Framework → Framework}/App.d.ts +0 -0
- /package/{build/Framework → Framework}/App.d.ts.map +0 -0
- /package/{build/Framework → Framework}/App.js +0 -0
- /package/{build/Framework → Framework}/App.js.map +0 -0
- /package/{build/Framework → Framework}/Application.d.ts +0 -0
- /package/{build/Framework → Framework}/Application.d.ts.map +0 -0
- /package/{build/Framework → Framework}/Application.js +0 -0
- /package/{build/Framework → Framework}/Application.js.map +0 -0
- /package/{build/Framework → Framework}/Auth/Auth.d.ts +0 -0
- /package/{build/Framework → Framework}/Auth/Auth.d.ts.map +0 -0
- /package/{build/Framework → Framework}/Auth/Auth.js +0 -0
- /package/{build/Framework → Framework}/Auth/Auth.js.map +0 -0
- /package/{build/Framework → Framework}/Auth/Authenticatable.d.ts +0 -0
- /package/{build/Framework → Framework}/Auth/Authenticatable.d.ts.map +0 -0
- /package/{build/Framework → Framework}/Auth/Authenticatable.js +0 -0
- /package/{build/Framework → Framework}/Auth/Authenticatable.js.map +0 -0
- /package/{build/Framework → Framework}/Auth/User.d.ts +0 -0
- /package/{build/Framework → Framework}/Auth/User.d.ts.map +0 -0
- /package/{build/Framework → Framework}/Auth/User.js +0 -0
- /package/{build/Framework → Framework}/Auth/User.js.map +0 -0
- /package/{build/Framework → Framework}/Auth/index.d.ts +0 -0
- /package/{build/Framework → Framework}/Auth/index.d.ts.map +0 -0
- /package/{build/Framework → Framework}/Auth/index.js +0 -0
- /package/{build/Framework → Framework}/Auth/index.js.map +0 -0
- /package/{build/Framework → Framework}/Config/AppConfig.d.ts +0 -0
- /package/{build/Framework → Framework}/Config/AppConfig.d.ts.map +0 -0
- /package/{build/Framework → Framework}/Config/AppConfig.js +0 -0
- /package/{build/Framework → Framework}/Config/AppConfig.js.map +0 -0
- /package/{build/Framework → Framework}/Config/AuthConfig.d.ts +0 -0
- /package/{build/Framework → Framework}/Config/AuthConfig.d.ts.map +0 -0
- /package/{build/Framework → Framework}/Config/AuthConfig.js +0 -0
- /package/{build/Framework → Framework}/Config/AuthConfig.js.map +0 -0
- /package/{build/Framework → Framework}/Config/BaseConfig.d.ts +0 -0
- /package/{build/Framework → Framework}/Config/BaseConfig.d.ts.map +0 -0
- /package/{build/Framework → Framework}/Config/BaseConfig.js +0 -0
- /package/{build/Framework → Framework}/Config/BaseConfig.js.map +0 -0
- /package/{build/Framework → Framework}/Config/CacheConfig.d.ts +0 -0
- /package/{build/Framework → Framework}/Config/CacheConfig.d.ts.map +0 -0
- /package/{build/Framework → Framework}/Config/CacheConfig.js +0 -0
- /package/{build/Framework → Framework}/Config/CacheConfig.js.map +0 -0
- /package/{build/Framework → Framework}/Config/DatabaseConfig.d.ts +0 -0
- /package/{build/Framework → Framework}/Config/DatabaseConfig.d.ts.map +0 -0
- /package/{build/Framework → Framework}/Config/DatabaseConfig.js +0 -0
- /package/{build/Framework → Framework}/Config/DatabaseConfig.js.map +0 -0
- /package/{build/Framework → Framework}/Config/MailConfig.d.ts +0 -0
- /package/{build/Framework → Framework}/Config/MailConfig.d.ts.map +0 -0
- /package/{build/Framework → Framework}/Config/MailConfig.js +0 -0
- /package/{build/Framework → Framework}/Config/MailConfig.js.map +0 -0
- /package/{build/Framework → Framework}/Config/index.d.ts +0 -0
- /package/{build/Framework → Framework}/Config/index.d.ts.map +0 -0
- /package/{build/Framework → Framework}/Config/index.js +0 -0
- /package/{build/Framework → Framework}/Config/index.js.map +0 -0
- /package/{build/Framework → Framework}/Middleware/AuthMiddleware.d.ts +0 -0
- /package/{build/Framework → Framework}/Middleware/AuthMiddleware.d.ts.map +0 -0
- /package/{build/Framework → Framework}/Middleware/AuthMiddleware.js +0 -0
- /package/{build/Framework → Framework}/Middleware/AuthMiddleware.js.map +0 -0
- /package/{build/Framework → Framework}/Middleware/CorsMiddleware.d.ts +0 -0
- /package/{build/Framework → Framework}/Middleware/CorsMiddleware.d.ts.map +0 -0
- /package/{build/Framework → Framework}/Middleware/CorsMiddleware.js +0 -0
- /package/{build/Framework → Framework}/Middleware/CorsMiddleware.js.map +0 -0
- /package/{build/Framework → Framework}/Middleware/StaticAssetsMiddleware.d.ts +0 -0
- /package/{build/Framework → Framework}/Middleware/StaticAssetsMiddleware.d.ts.map +0 -0
- /package/{build/Framework → Framework}/Middleware/StaticAssetsMiddleware.js +0 -0
- /package/{build/Framework → Framework}/Middleware/StaticAssetsMiddleware.js.map +0 -0
- /package/{build/Framework → Framework}/Middleware/index.d.ts +0 -0
- /package/{build/Framework → Framework}/Middleware/index.d.ts.map +0 -0
- /package/{build/Framework → Framework}/Middleware/index.js +0 -0
- /package/{build/Framework → Framework}/Middleware/index.js.map +0 -0
- /package/{build/Framework → Framework}/Provider.d.ts +0 -0
- /package/{build/Framework → Framework}/Provider.d.ts.map +0 -0
- /package/{build/Framework → Framework}/Provider.js +0 -0
- /package/{build/Framework → Framework}/Provider.js.map +0 -0
- /package/{build/Framework → Framework}/Providers/CacheProvider.d.ts +0 -0
- /package/{build/Framework → Framework}/Providers/CacheProvider.d.ts.map +0 -0
- /package/{build/Framework → Framework}/Providers/CacheProvider.js +0 -0
- /package/{build/Framework → Framework}/Providers/CacheProvider.js.map +0 -0
- /package/{build/Framework → Framework}/Providers/DatabaseProvider.d.ts +0 -0
- /package/{build/Framework → Framework}/Providers/DatabaseProvider.d.ts.map +0 -0
- /package/{build/Framework → Framework}/Providers/DatabaseProvider.js +0 -0
- /package/{build/Framework → Framework}/Providers/DatabaseProvider.js.map +0 -0
- /package/{build/Framework → Framework}/Providers/MailProvider.d.ts +0 -0
- /package/{build/Framework → Framework}/Providers/MailProvider.d.ts.map +0 -0
- /package/{build/Framework → Framework}/Providers/MailProvider.js +0 -0
- /package/{build/Framework → Framework}/Providers/MailProvider.js.map +0 -0
- /package/{build/Framework → Framework}/Providers/WebsocketsProvider.d.ts +0 -0
- /package/{build/Framework → Framework}/Providers/WebsocketsProvider.d.ts.map +0 -0
- /package/{build/Framework → Framework}/Providers/WebsocketsProvider.js +0 -0
- /package/{build/Framework → Framework}/Providers/WebsocketsProvider.js.map +0 -0
- /package/{build/Framework → Framework}/Resolvers/AuthResolver.d.ts +0 -0
- /package/{build/Framework → Framework}/Resolvers/AuthResolver.d.ts.map +0 -0
- /package/{build/Framework → Framework}/Resolvers/AuthResolver.js +0 -0
- /package/{build/Framework → Framework}/Resolvers/AuthResolver.js.map +0 -0
- /package/{build/Framework → Framework}/Resolvers/EntityResolver.d.ts +0 -0
- /package/{build/Framework → Framework}/Resolvers/EntityResolver.d.ts.map +0 -0
- /package/{build/Framework → Framework}/Resolvers/EntityResolver.js +0 -0
- /package/{build/Framework → Framework}/Resolvers/EntityResolver.js.map +0 -0
- /package/{build/Framework → Framework}/Resolvers/FormResolver.d.ts +0 -0
- /package/{build/Framework → Framework}/Resolvers/FormResolver.d.ts.map +0 -0
- /package/{build/Framework → Framework}/Resolvers/FormResolver.js +0 -0
- /package/{build/Framework → Framework}/Resolvers/FormResolver.js.map +0 -0
- /package/{build/Framework → Framework}/RootDir.d.ts +0 -0
- /package/{build/Framework → Framework}/RootDir.d.ts.map +0 -0
- /package/{build/Framework → Framework}/RootDir.js +0 -0
- /package/{build/Framework → Framework}/RootDir.js.map +0 -0
- /package/{build/Framework → Framework}/index.d.ts +0 -0
- /package/{build/Framework → Framework}/index.d.ts.map +0 -0
- /package/{build/Framework → Framework}/index.js +0 -0
- /package/{build/Framework → Framework}/index.js.map +0 -0
- /package/{build/Mail → Mail}/MailAddress.d.ts +0 -0
- /package/{build/Mail → Mail}/MailAddress.d.ts.map +0 -0
- /package/{build/Mail → Mail}/MailAddress.js +0 -0
- /package/{build/Mail → Mail}/MailAddress.js.map +0 -0
- /package/{build/Mail → Mail}/MailTransport.d.ts +0 -0
- /package/{build/Mail → Mail}/MailTransport.d.ts.map +0 -0
- /package/{build/Mail → Mail}/MailTransport.js +0 -0
- /package/{build/Mail → Mail}/MailTransport.js.map +0 -0
- /package/{build/Mail → Mail}/Mailable.d.ts +0 -0
- /package/{build/Mail → Mail}/Mailable.d.ts.map +0 -0
- /package/{build/Mail → Mail}/Mailable.js +0 -0
- /package/{build/Mail → Mail}/Mailable.js.map +0 -0
- /package/{build/Mail → Mail}/Mailer.d.ts +0 -0
- /package/{build/Mail → Mail}/Mailer.d.ts.map +0 -0
- /package/{build/Mail → Mail}/Mailer.js +0 -0
- /package/{build/Mail → Mail}/Mailer.js.map +0 -0
- /package/{build/Mail → Mail}/PendingMail.d.ts +0 -0
- /package/{build/Mail → Mail}/PendingMail.d.ts.map +0 -0
- /package/{build/Mail → Mail}/PendingMail.js +0 -0
- /package/{build/Mail → Mail}/PendingMail.js.map +0 -0
- /package/{build/Mail → Mail}/SentMessage.d.ts +0 -0
- /package/{build/Mail → Mail}/SentMessage.d.ts.map +0 -0
- /package/{build/Mail → Mail}/SentMessage.js +0 -0
- /package/{build/Mail → Mail}/SentMessage.js.map +0 -0
- /package/{build/Mail → Mail}/Transports/MemoryTransport.d.ts +0 -0
- /package/{build/Mail → Mail}/Transports/MemoryTransport.d.ts.map +0 -0
- /package/{build/Mail → Mail}/Transports/MemoryTransport.js +0 -0
- /package/{build/Mail → Mail}/Transports/MemoryTransport.js.map +0 -0
- /package/{build/Mail → Mail}/Transports/SendGridTransport.d.ts +0 -0
- /package/{build/Mail → Mail}/Transports/SendGridTransport.d.ts.map +0 -0
- /package/{build/Mail → Mail}/Transports/SendGridTransport.js +0 -0
- /package/{build/Mail → Mail}/Transports/SendGridTransport.js.map +0 -0
- /package/{build/Mail → Mail}/index.d.ts +0 -0
- /package/{build/Mail → Mail}/index.d.ts.map +0 -0
- /package/{build/Mail → Mail}/index.js +0 -0
- /package/{build/Mail → Mail}/index.js.map +0 -0
- /package/{build/Models → Models}/Model.d.ts +0 -0
- /package/{build/Models → Models}/Model.d.ts.map +0 -0
- /package/{build/Models → Models}/Model.js +0 -0
- /package/{build/Models → Models}/Model.js.map +0 -0
- /package/{build/Models → Models}/index.d.ts +0 -0
- /package/{build/Models → Models}/index.d.ts.map +0 -0
- /package/{build/Models → Models}/index.js +0 -0
- /package/{build/Models → Models}/index.js.map +0 -0
- /package/{build/Router → Router}/BaseController.d.ts +0 -0
- /package/{build/Router → Router}/BaseController.d.ts.map +0 -0
- /package/{build/Router → Router}/BaseController.js +0 -0
- /package/{build/Router → Router}/BaseController.js.map +0 -0
- /package/{build/Router → Router}/Decorators.d.ts +0 -0
- /package/{build/Router → Router}/Decorators.d.ts.map +0 -0
- /package/{build/Router → Router}/Decorators.js +0 -0
- /package/{build/Router → Router}/Decorators.js.map +0 -0
- /package/{build/Router → Router}/Guard.d.ts +0 -0
- /package/{build/Router → Router}/Guard.d.ts.map +0 -0
- /package/{build/Router → Router}/Guard.js +0 -0
- /package/{build/Router → Router}/Guard.js.map +0 -0
- /package/{build/Router → Router}/Http/Contracts.d.ts +0 -0
- /package/{build/Router → Router}/Http/Contracts.d.ts.map +0 -0
- /package/{build/Router → Router}/Http/Contracts.js +0 -0
- /package/{build/Router → Router}/Http/Contracts.js.map +0 -0
- /package/{build/Router → Router}/Http/ErrorHandler.d.ts +0 -0
- /package/{build/Router → Router}/Http/ErrorHandler.d.ts.map +0 -0
- /package/{build/Router → Router}/Http/ErrorHandler.js +0 -0
- /package/{build/Router → Router}/Http/ErrorHandler.js.map +0 -0
- /package/{build/Router → Router}/Http/ErrorHandlerInterface.d.ts +0 -0
- /package/{build/Router → Router}/Http/ErrorHandlerInterface.d.ts.map +0 -0
- /package/{build/Router → Router}/Http/ErrorHandlerInterface.js +0 -0
- /package/{build/Router → Router}/Http/ErrorHandlerInterface.js.map +0 -0
- /package/{build/Router → Router}/Http/Errors/HttpError.d.ts +0 -0
- /package/{build/Router → Router}/Http/Errors/HttpError.d.ts.map +0 -0
- /package/{build/Router → Router}/Http/Errors/HttpError.js +0 -0
- /package/{build/Router → Router}/Http/Errors/HttpError.js.map +0 -0
- /package/{build/Router → Router}/Http/Handler.d.ts +0 -0
- /package/{build/Router → Router}/Http/Handler.d.ts.map +0 -0
- /package/{build/Router → Router}/Http/Handler.js +0 -0
- /package/{build/Router → Router}/Http/Handler.js.map +0 -0
- /package/{build/Router → Router}/Http/HttpRoute.d.ts +0 -0
- /package/{build/Router → Router}/Http/HttpRoute.d.ts.map +0 -0
- /package/{build/Router → Router}/Http/HttpRoute.js +0 -0
- /package/{build/Router → Router}/Http/HttpRoute.js.map +0 -0
- /package/{build/Router → Router}/Http/Middleware.d.ts +0 -0
- /package/{build/Router → Router}/Http/Middleware.d.ts.map +0 -0
- /package/{build/Router → Router}/Http/Middleware.js +0 -0
- /package/{build/Router → Router}/Http/Middleware.js.map +0 -0
- /package/{build/Router → Router}/Http/Request.d.ts +0 -0
- /package/{build/Router → Router}/Http/Request.d.ts.map +0 -0
- /package/{build/Router → Router}/Http/Request.js +0 -0
- /package/{build/Router → Router}/Http/Request.js.map +0 -0
- /package/{build/Router → Router}/Http/Response.d.ts +0 -0
- /package/{build/Router → Router}/Http/Response.d.ts.map +0 -0
- /package/{build/Router → Router}/Http/Response.js +0 -0
- /package/{build/Router → Router}/Http/Response.js.map +0 -0
- /package/{build/Router → Router}/Http/index.d.ts +0 -0
- /package/{build/Router → Router}/Http/index.d.ts.map +0 -0
- /package/{build/Router → Router}/Http/index.js +0 -0
- /package/{build/Router → Router}/Http/index.js.map +0 -0
- /package/{build/Router → Router}/Metadata.d.ts +0 -0
- /package/{build/Router → Router}/Metadata.d.ts.map +0 -0
- /package/{build/Router → Router}/Metadata.js +0 -0
- /package/{build/Router → Router}/Metadata.js.map +0 -0
- /package/{build/Router → Router}/Middleware.d.ts +0 -0
- /package/{build/Router → Router}/Middleware.d.ts.map +0 -0
- /package/{build/Router → Router}/Middleware.js +0 -0
- /package/{build/Router → Router}/Middleware.js.map +0 -0
- /package/{build/Router → Router}/Request.d.ts +0 -0
- /package/{build/Router → Router}/Request.d.ts.map +0 -0
- /package/{build/Router → Router}/Request.js +0 -0
- /package/{build/Router → Router}/Request.js.map +0 -0
- /package/{build/Router → Router}/Route.d.ts +0 -0
- /package/{build/Router → Router}/Route.d.ts.map +0 -0
- /package/{build/Router → Router}/Route.js +0 -0
- /package/{build/Router → Router}/Route.js.map +0 -0
- /package/{build/Router → Router}/RouteNotFoundError.d.ts +0 -0
- /package/{build/Router → Router}/RouteNotFoundError.d.ts.map +0 -0
- /package/{build/Router → Router}/RouteNotFoundError.js +0 -0
- /package/{build/Router → Router}/RouteNotFoundError.js.map +0 -0
- /package/{build/Router → Router}/Router.d.ts +0 -0
- /package/{build/Router → Router}/Router.d.ts.map +0 -0
- /package/{build/Router → Router}/Router.js +0 -0
- /package/{build/Router → Router}/Router.js.map +0 -0
- /package/{build/Router → Router}/Servers/index.d.ts +0 -0
- /package/{build/Router → Router}/Servers/index.d.ts.map +0 -0
- /package/{build/Router → Router}/Servers/index.js +0 -0
- /package/{build/Router → Router}/Servers/index.js.map +0 -0
- /package/{build/Router → Router}/Servers/node.d.ts +0 -0
- /package/{build/Router → Router}/Servers/node.d.ts.map +0 -0
- /package/{build/Router → Router}/Servers/node.js +0 -0
- /package/{build/Router → Router}/Servers/node.js.map +0 -0
- /package/{build/Router → Router}/Servers/uNetworking.d.ts +0 -0
- /package/{build/Router → Router}/Servers/uNetworking.d.ts.map +0 -0
- /package/{build/Router → Router}/Servers/uNetworking.js +0 -0
- /package/{build/Router → Router}/Servers/uNetworking.js.map +0 -0
- /package/{build/Router → Router}/Websockets/Handler.d.ts +0 -0
- /package/{build/Router → Router}/Websockets/Handler.d.ts.map +0 -0
- /package/{build/Router → Router}/Websockets/Handler.js +0 -0
- /package/{build/Router → Router}/Websockets/Handler.js.map +0 -0
- /package/{build/Router → Router}/Websockets/Middleware.d.ts +0 -0
- /package/{build/Router → Router}/Websockets/Middleware.d.ts.map +0 -0
- /package/{build/Router → Router}/Websockets/Middleware.js +0 -0
- /package/{build/Router → Router}/Websockets/Middleware.js.map +0 -0
- /package/{build/Router → Router}/Websockets/Request.d.ts +0 -0
- /package/{build/Router → Router}/Websockets/Request.d.ts.map +0 -0
- /package/{build/Router → Router}/Websockets/Request.js +0 -0
- /package/{build/Router → Router}/Websockets/Request.js.map +0 -0
- /package/{build/Router → Router}/Websockets/WebsocketRoute.d.ts +0 -0
- /package/{build/Router → Router}/Websockets/WebsocketRoute.d.ts.map +0 -0
- /package/{build/Router → Router}/Websockets/WebsocketRoute.js +0 -0
- /package/{build/Router → Router}/Websockets/WebsocketRoute.js.map +0 -0
- /package/{build/Router → Router}/Websockets/index.d.ts +0 -0
- /package/{build/Router → Router}/Websockets/index.d.ts.map +0 -0
- /package/{build/Router → Router}/Websockets/index.js +0 -0
- /package/{build/Router → Router}/Websockets/index.js.map +0 -0
- /package/{build/Router → Router}/Websockets/types.d.ts +0 -0
- /package/{build/Router → Router}/Websockets/types.d.ts.map +0 -0
- /package/{build/Router → Router}/Websockets/types.js +0 -0
- /package/{build/Router → Router}/Websockets/types.js.map +0 -0
- /package/{build/Router → Router}/index.d.ts +0 -0
- /package/{build/Router → Router}/index.d.ts.map +0 -0
- /package/{build/Router → Router}/index.js +0 -0
- /package/{build/Router → Router}/index.js.map +0 -0
- /package/{build/Storage → Storage}/File.d.ts +0 -0
- /package/{build/Storage → Storage}/File.d.ts.map +0 -0
- /package/{build/Storage → Storage}/File.js +0 -0
- /package/{build/Storage → Storage}/File.js.map +0 -0
- /package/{build/Storage → Storage}/Image.d.ts +0 -0
- /package/{build/Storage → Storage}/Image.d.ts.map +0 -0
- /package/{build/Storage → Storage}/Image.js +0 -0
- /package/{build/Storage → Storage}/Image.js.map +0 -0
- /package/{build/Storage → Storage}/InvalidImage.d.ts +0 -0
- /package/{build/Storage → Storage}/InvalidImage.d.ts.map +0 -0
- /package/{build/Storage → Storage}/InvalidImage.js +0 -0
- /package/{build/Storage → Storage}/InvalidImage.js.map +0 -0
- /package/{build/Storage → Storage}/Storage.d.ts +0 -0
- /package/{build/Storage → Storage}/Storage.d.ts.map +0 -0
- /package/{build/Storage → Storage}/Storage.js +0 -0
- /package/{build/Storage → Storage}/Storage.js.map +0 -0
- /package/{build/Storage → Storage}/index.d.ts +0 -0
- /package/{build/Storage → Storage}/index.d.ts.map +0 -0
- /package/{build/Storage → Storage}/index.js +0 -0
- /package/{build/Storage → Storage}/index.js.map +0 -0
- /package/{build/Storage → Storage}/utils.d.ts +0 -0
- /package/{build/Storage → Storage}/utils.d.ts.map +0 -0
- /package/{build/Storage → Storage}/utils.js +0 -0
- /package/{build/Storage → Storage}/utils.js.map +0 -0
- /package/{build/Support → Support}/Array.d.ts +0 -0
- /package/{build/Support → Support}/Array.d.ts.map +0 -0
- /package/{build/Support → Support}/Array.js +0 -0
- /package/{build/Support → Support}/Array.js.map +0 -0
- /package/{build/Support → Support}/Math.d.ts +0 -0
- /package/{build/Support → Support}/Math.d.ts.map +0 -0
- /package/{build/Support → Support}/Math.js +0 -0
- /package/{build/Support → Support}/Math.js.map +0 -0
- /package/{build/Support → Support}/Metadata.d.ts +0 -0
- /package/{build/Support → Support}/Metadata.d.ts.map +0 -0
- /package/{build/Support → Support}/Metadata.js +0 -0
- /package/{build/Support → Support}/Metadata.js.map +0 -0
- /package/{build/Support → Support}/String.d.ts +0 -0
- /package/{build/Support → Support}/String.d.ts.map +0 -0
- /package/{build/Support → Support}/String.js +0 -0
- /package/{build/Support → Support}/String.js.map +0 -0
- /package/{build/Support → Support}/index.d.ts +0 -0
- /package/{build/Support → Support}/index.d.ts.map +0 -0
- /package/{build/Support → Support}/index.js +0 -0
- /package/{build/Support → Support}/index.js.map +0 -0
- /package/{build/Support → Support}/utils.d.ts +0 -0
- /package/{build/Support → Support}/utils.d.ts.map +0 -0
- /package/{build/Support → Support}/utils.js +0 -0
- /package/{build/Support → Support}/utils.js.map +0 -0
- /package/{build/Testing → Testing}/TestCase.d.ts +0 -0
- /package/{build/Testing → Testing}/TestCase.d.ts.map +0 -0
- /package/{build/Testing → Testing}/TestCase.js +0 -0
- /package/{build/Testing → Testing}/TestCase.js.map +0 -0
- /package/{build/Validation → Validation}/Rule.d.ts +0 -0
- /package/{build/Validation → Validation}/Rule.d.ts.map +0 -0
- /package/{build/Validation → Validation}/Rule.js +0 -0
- /package/{build/Validation → Validation}/Rule.js.map +0 -0
- /package/{build/Validation → Validation}/RuleInterface.d.ts +0 -0
- /package/{build/Validation → Validation}/RuleInterface.d.ts.map +0 -0
- /package/{build/Validation → Validation}/RuleInterface.js +0 -0
- /package/{build/Validation → Validation}/RuleInterface.js.map +0 -0
- /package/{build/Validation → Validation}/Rules/Email.d.ts +0 -0
- /package/{build/Validation → Validation}/Rules/Email.d.ts.map +0 -0
- /package/{build/Validation → Validation}/Rules/Email.js +0 -0
- /package/{build/Validation → Validation}/Rules/Email.js.map +0 -0
- /package/{build/Validation → Validation}/Rules/FileExtension.d.ts +0 -0
- /package/{build/Validation → Validation}/Rules/FileExtension.d.ts.map +0 -0
- /package/{build/Validation → Validation}/Rules/FileExtension.js +0 -0
- /package/{build/Validation → Validation}/Rules/FileExtension.js.map +0 -0
- /package/{build/Validation → Validation}/Rules/MaxLength.d.ts +0 -0
- /package/{build/Validation → Validation}/Rules/MaxLength.d.ts.map +0 -0
- /package/{build/Validation → Validation}/Rules/MaxLength.js +0 -0
- /package/{build/Validation → Validation}/Rules/MaxLength.js.map +0 -0
- /package/{build/Validation → Validation}/Rules/MinLength.d.ts +0 -0
- /package/{build/Validation → Validation}/Rules/MinLength.d.ts.map +0 -0
- /package/{build/Validation → Validation}/Rules/MinLength.js +0 -0
- /package/{build/Validation → Validation}/Rules/MinLength.js.map +0 -0
- /package/{build/Validation → Validation}/Rules/Optional.d.ts +0 -0
- /package/{build/Validation → Validation}/Rules/Optional.d.ts.map +0 -0
- /package/{build/Validation → Validation}/Rules/Optional.js +0 -0
- /package/{build/Validation → Validation}/Rules/Optional.js.map +0 -0
- /package/{build/Validation → Validation}/Rules/Required.d.ts +0 -0
- /package/{build/Validation → Validation}/Rules/Required.d.ts.map +0 -0
- /package/{build/Validation → Validation}/Rules/Required.js +0 -0
- /package/{build/Validation → Validation}/Rules/Required.js.map +0 -0
- /package/{build/Validation → Validation}/Validator.d.ts +0 -0
- /package/{build/Validation → Validation}/Validator.d.ts.map +0 -0
- /package/{build/Validation → Validation}/Validator.js +0 -0
- /package/{build/Validation → Validation}/Validator.js.map +0 -0
- /package/{build/Validation → Validation}/index.d.ts +0 -0
- /package/{build/Validation → Validation}/index.d.ts.map +0 -0
- /package/{build/Validation → Validation}/index.js +0 -0
- /package/{build/Validation → Validation}/index.js.map +0 -0
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import { DatabaseDriver } from '../DatabaseDriver'
|
|
2
|
-
import { Connection, ConnectionConfig, createConnection, OkPacket } from 'mysql'
|
|
3
|
-
import { SqlValue } from '../../Types'
|
|
4
|
-
import { Create } from './Create'
|
|
5
|
-
import { Select } from '../SQL/Statements/Select'
|
|
6
|
-
import { Insert } from '../SQL/Statements/Insert'
|
|
7
|
-
import { Delete } from '../SQL/Statements/Delete'
|
|
8
|
-
import { Update } from '../SQL/Statements/Update'
|
|
9
|
-
import { Alter } from '../SQL/Statements/Alter'
|
|
10
|
-
import { SchemaContract } from '../SchemaContract'
|
|
11
|
-
import { Schema } from './Schema'
|
|
12
|
-
|
|
13
|
-
interface ColumnInfo {
|
|
14
|
-
name: string
|
|
15
|
-
type: string
|
|
16
|
-
nullable: 0 | 1
|
|
17
|
-
default?: string | number
|
|
18
|
-
autoIncrement: 0 | 1
|
|
19
|
-
primaryKey: 0 | 1
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export class MysqlDriver extends DatabaseDriver {
|
|
23
|
-
connection: Connection
|
|
24
|
-
|
|
25
|
-
schema: SchemaContract = new Schema(this)
|
|
26
|
-
|
|
27
|
-
statements = {
|
|
28
|
-
create: Create,
|
|
29
|
-
select: Select,
|
|
30
|
-
insert: Insert,
|
|
31
|
-
delete: Delete,
|
|
32
|
-
update: Update,
|
|
33
|
-
alter: Alter,
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
constructor(connectionConfig: ConnectionConfig) {
|
|
37
|
-
super()
|
|
38
|
-
this.connection = createConnection({
|
|
39
|
-
connectTimeout: 30000,
|
|
40
|
-
...connectionConfig,
|
|
41
|
-
})
|
|
42
|
-
|
|
43
|
-
this.connection.connect()
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
async truncate(table: string) {
|
|
47
|
-
await this.run(`TRUNCATE TABLE ${table}`)
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
runRaw<T>(query: string, params: SqlValue[] = []): Promise<T | OkPacket> {
|
|
51
|
-
return new Promise((resolve, reject) => {
|
|
52
|
-
this.connection.query(query, params, (error, results, fields) => {
|
|
53
|
-
if (error) {
|
|
54
|
-
error.message += `in SQL: "${error.sql}"`
|
|
55
|
-
return reject(error)
|
|
56
|
-
}
|
|
57
|
-
resolve(results)
|
|
58
|
-
})
|
|
59
|
-
})
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
async run(query: string, params: SqlValue[] = []) {
|
|
63
|
-
await this.runRaw(query, params)
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
async get<T>(query: string, params: SqlValue[] = []): Promise<T[]> {
|
|
67
|
-
return (await this.runRaw(query, params) as T[])
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
async first<T>(query: string, params: SqlValue[] = []): Promise<T> {
|
|
71
|
-
return (await this.runRaw(query, params) as T[])?.[0]
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
async insertOne(query: string, params: SqlValue[] = []): Promise<number> {
|
|
75
|
-
return (await this.runRaw(query, params) as OkPacket).insertId
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
tables() {
|
|
79
|
-
return this.get<{name: string}>(
|
|
80
|
-
`select TABLE_NAME as name
|
|
81
|
-
from information_schema.TABLES
|
|
82
|
-
WHERE table_schema = ?
|
|
83
|
-
`,
|
|
84
|
-
[this.connection.config.database]
|
|
85
|
-
)
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
tableExists(table: string): Promise<boolean> {
|
|
89
|
-
return this.first(
|
|
90
|
-
`select *
|
|
91
|
-
from information_schema.tables
|
|
92
|
-
where table_name = ?
|
|
93
|
-
and table_schema = ?
|
|
94
|
-
`,
|
|
95
|
-
[table, this.connection.config.database]
|
|
96
|
-
)
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
async tableColumns(table: string) {
|
|
100
|
-
const columnsInfo = await this.get<ColumnInfo>(
|
|
101
|
-
`select cast(IS_NULLABLE = 'YES' as unsigned) as nullable,
|
|
102
|
-
cast(EXTRA = 'auto_increment' as unsigned) as autoIncrement,
|
|
103
|
-
cast(COLUMN_KEY = 'PRI' as unsigned) as primaryKey,
|
|
104
|
-
COLUMN_NAME as name,
|
|
105
|
-
DATA_TYPE as type,
|
|
106
|
-
COLUMN_DEFAULT as 'default'
|
|
107
|
-
from information_schema.COLUMNS
|
|
108
|
-
where table_name = ?
|
|
109
|
-
and table_schema = ?
|
|
110
|
-
`,
|
|
111
|
-
[table, this.connection.config.database]
|
|
112
|
-
)
|
|
113
|
-
|
|
114
|
-
return columnsInfo.map(info => ({
|
|
115
|
-
name: info.name,
|
|
116
|
-
type: info.type,
|
|
117
|
-
nullable: Boolean(info.nullable),
|
|
118
|
-
default: info.default,
|
|
119
|
-
autoIncrement: info.autoIncrement,
|
|
120
|
-
primaryKey: Boolean(info.primaryKey)
|
|
121
|
-
}))
|
|
122
|
-
}
|
|
123
|
-
}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { ColumnField, Entity, Expression, PrimaryField } from '../..'
|
|
2
|
-
import { Schema as BaseSchema } from '../SQL/Schema'
|
|
3
|
-
import { Create } from './Create'
|
|
4
|
-
import { typesMatches } from '.'
|
|
5
|
-
import { ColumnDefinitionOptions } from '../SQL'
|
|
6
|
-
import { AddColumn, AddConstraint, Alter, Constraints, DropColumn, ModifyColumn } from './Alter'
|
|
7
|
-
|
|
8
|
-
export class Schema extends BaseSchema {
|
|
9
|
-
|
|
10
|
-
columnMetadataToColumnDefinition(metadata: ColumnField<Entity>) {
|
|
11
|
-
return {
|
|
12
|
-
name: metadata.column,
|
|
13
|
-
primaryKey: metadata.constructor === PrimaryField,
|
|
14
|
-
autoIncrement: Number(metadata.constructor === PrimaryField),
|
|
15
|
-
type: this.getColumnTypeBasedOnTypescriptType(metadata),
|
|
16
|
-
default: undefined,
|
|
17
|
-
nullable: true
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
async create(table: string, columns: ColumnField<Entity>[]) {
|
|
22
|
-
const columnsDefinitions: ColumnDefinitionOptions[] = columns.map(column => this.columnMetadataToColumnDefinition(column))
|
|
23
|
-
const createStatement = new Create(table, columnsDefinitions)
|
|
24
|
-
|
|
25
|
-
await this.driver.run(createStatement.toSQL())
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
protected async syncTableColumns(table: string, columnsMetadata: ColumnField<Entity>[]) {
|
|
29
|
-
const columns = columnsMetadata.map(metadata => this.columnMetadataToColumnDefinition(metadata))
|
|
30
|
-
|
|
31
|
-
const tableColumns = await this.driver.tableColumns(table)
|
|
32
|
-
|
|
33
|
-
let alters: Expression[] = []
|
|
34
|
-
|
|
35
|
-
alters = alters.concat(
|
|
36
|
-
columns
|
|
37
|
-
.whereNotIn('name', tableColumns.pluck('name'))
|
|
38
|
-
.map(column => new AddColumn({...column, autoIncrement: undefined}))
|
|
39
|
-
)
|
|
40
|
-
|
|
41
|
-
columns.whereIn('name', tableColumns.pluck('name'))
|
|
42
|
-
.forEach(column => {
|
|
43
|
-
const typeInDB = tableColumns.findWhere('name', column.name)?.type
|
|
44
|
-
if (typeInDB !== column.type) {
|
|
45
|
-
alters.push(new ModifyColumn(column))
|
|
46
|
-
}
|
|
47
|
-
})
|
|
48
|
-
|
|
49
|
-
alters = alters.concat(
|
|
50
|
-
tableColumns
|
|
51
|
-
.whereNotIn('name', columns.pluck('name'))
|
|
52
|
-
.map(tableColumn => new DropColumn(tableColumn.name))
|
|
53
|
-
)
|
|
54
|
-
|
|
55
|
-
await this.driver.run(new Alter(table, alters).toSQL())
|
|
56
|
-
|
|
57
|
-
const additionalAlters: Expression[] = []
|
|
58
|
-
columns.forEach(column => {
|
|
59
|
-
const dbInfo = tableColumns.findWhere('name', column.name)
|
|
60
|
-
if (column.primaryKey && !dbInfo?.primaryKey) {
|
|
61
|
-
additionalAlters.push(new AddConstraint(column, Constraints.PrimaryKey))
|
|
62
|
-
}
|
|
63
|
-
if (column.autoIncrement && !dbInfo?.autoIncrement) {
|
|
64
|
-
additionalAlters.push(new ModifyColumn(column))
|
|
65
|
-
}
|
|
66
|
-
})
|
|
67
|
-
|
|
68
|
-
if (!additionalAlters.empty()) {
|
|
69
|
-
await this.driver.run(new Alter(table, additionalAlters).toSQL())
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
private getColumnTypeBasedOnTypescriptType(column: ColumnField<Entity>) {
|
|
74
|
-
const typePrototype = Array.from(typesMatches.keys())
|
|
75
|
-
.find(key => column.type().prototype instanceof key) || String
|
|
76
|
-
|
|
77
|
-
return typesMatches.get(column.type())
|
|
78
|
-
?? typesMatches.get(column.constructor)
|
|
79
|
-
?? typesMatches.get(typePrototype)
|
|
80
|
-
?? typesMatches.get(String) as string
|
|
81
|
-
}
|
|
82
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Entity } from '../../Entity'
|
|
2
|
-
import { JSONField, PrimaryField } from '../../Fields'
|
|
3
|
-
|
|
4
|
-
// tslint:disable-next-line:no-any
|
|
5
|
-
export const typesMatches = new Map<any, string>([
|
|
6
|
-
[Entity, 'integer'],
|
|
7
|
-
[PrimaryField, `integer`],
|
|
8
|
-
[Number, 'integer'],
|
|
9
|
-
[String, 'varchar(255)'],
|
|
10
|
-
[Date, 'datetime'],
|
|
11
|
-
[JSONField, 'text'],
|
|
12
|
-
[Boolean, 'integer'],
|
|
13
|
-
])
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { SchemaContract } from '../SchemaContract'
|
|
2
|
-
import { BelongsToManyField, ColumnField, Entity, EntityConstructor, EntityMetadata } from '../..'
|
|
3
|
-
|
|
4
|
-
export abstract class Schema extends SchemaContract {
|
|
5
|
-
|
|
6
|
-
// async create(table: string, columns: ColumnField<Entity>[]) {
|
|
7
|
-
// const columnsSQLs = columns
|
|
8
|
-
// .filter(column => column.column)
|
|
9
|
-
// .map(columnMetadata => this.getColumnSql(columnMetadata))
|
|
10
|
-
//
|
|
11
|
-
// // @ts-ignore
|
|
12
|
-
// const createStatement = new Create({
|
|
13
|
-
// table,
|
|
14
|
-
// columns: columnsSQLs
|
|
15
|
-
// })
|
|
16
|
-
//
|
|
17
|
-
// await this.driver.run(createStatement.toSql())
|
|
18
|
-
// }
|
|
19
|
-
|
|
20
|
-
// async addColumn(table: string, column: ColumnField<Entity>) {
|
|
21
|
-
// await this.driver.run(`ALTER TABLE ${table}
|
|
22
|
-
// ADD ${this.getColumnSql(column)}(6)`)
|
|
23
|
-
// }
|
|
24
|
-
|
|
25
|
-
async synchronize(entitiesMetadata: EntityMetadata<Entity, Entity>[]) {
|
|
26
|
-
const pivotTables = new Map<string, ColumnField<Entity>[]>()
|
|
27
|
-
for await(const metadata of entitiesMetadata) {
|
|
28
|
-
const table = metadata.table as string
|
|
29
|
-
const belongsToManyFields = Object.values(metadata.inverseRelationships)
|
|
30
|
-
.filter(field => field instanceof BelongsToManyField) as BelongsToManyField<Entity, Entity>[]
|
|
31
|
-
|
|
32
|
-
belongsToManyFields.forEach(field => {
|
|
33
|
-
const entity = Entity as EntityConstructor<Entity>
|
|
34
|
-
const pivotTableColumns: ColumnField<Entity>[] = [
|
|
35
|
-
// new ColumnField(entity, 'id', () => PrimaryField, 'id'),
|
|
36
|
-
...[field.getParentForeignKey(), field.getRelatedForeignKey()].sort().map(columnName => {
|
|
37
|
-
return new ColumnField(entity, columnName, () => Number, columnName)
|
|
38
|
-
})
|
|
39
|
-
]
|
|
40
|
-
pivotTables.set(field.getPivotTable(), pivotTableColumns)
|
|
41
|
-
})
|
|
42
|
-
const tableInfo = await this.driver.tableExists(table)
|
|
43
|
-
if (!tableInfo) {
|
|
44
|
-
await this.create(table, Object.values({...metadata.columns, ...metadata.relationships}))
|
|
45
|
-
continue
|
|
46
|
-
}
|
|
47
|
-
await this.syncTableColumns(table, Object.values({...metadata.columns, ...metadata.relationships}))
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
for await (const [name, columns] of pivotTables) {
|
|
51
|
-
const tableInfo = await this.driver.tableExists(name)
|
|
52
|
-
if (!tableInfo) {
|
|
53
|
-
await this.create(name, columns)
|
|
54
|
-
continue
|
|
55
|
-
}
|
|
56
|
-
await this.syncTableColumns(name, columns)
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
protected abstract syncTableColumns(table: string, columns: ColumnField<Entity>[]): Promise<void>;
|
|
61
|
-
|
|
62
|
-
// protected getColumnSql(columnMetadata: ColumnField<Entity>): string {
|
|
63
|
-
// const columnType = columnMetadata.type()
|
|
64
|
-
// const type = Array.from(this.typesMatches.keys())
|
|
65
|
-
// .find(key =>
|
|
66
|
-
// key === columnMetadata.type() || columnType.prototype instanceof key || columnMetadata instanceof key
|
|
67
|
-
// ) || String
|
|
68
|
-
//
|
|
69
|
-
// const columnInfo = this.typesMatches.get(type)
|
|
70
|
-
//
|
|
71
|
-
// return `${columnMetadata.column} ${columnInfo}`
|
|
72
|
-
// }
|
|
73
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { BaseStatement } from './BaseStatement'
|
|
2
|
-
import { ColumnField, Entity } from '../../..'
|
|
3
|
-
|
|
4
|
-
export class Alter extends BaseStatement {
|
|
5
|
-
|
|
6
|
-
columns: ColumnField<Entity>[] = []
|
|
7
|
-
|
|
8
|
-
getColumns() {
|
|
9
|
-
return ''
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
toSQL() {
|
|
13
|
-
return `
|
|
14
|
-
ALTER
|
|
15
|
-
TABLE
|
|
16
|
-
${this.table}
|
|
17
|
-
(
|
|
18
|
-
${this.getColumns()}
|
|
19
|
-
)
|
|
20
|
-
`
|
|
21
|
-
}
|
|
22
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { wrap } from '../../../Helpers'
|
|
2
|
-
import { Statement } from '../../Statement'
|
|
3
|
-
|
|
4
|
-
export abstract class BaseStatement extends Statement {
|
|
5
|
-
|
|
6
|
-
get table() {
|
|
7
|
-
return wrap(this.components.table || '')
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
get wheres() {
|
|
11
|
-
const wheres = this.components.wheres || []
|
|
12
|
-
|
|
13
|
-
return wheres.map(where => {
|
|
14
|
-
this.bindings = this.bindings.concat(where.getValues())
|
|
15
|
-
return where.toSql()
|
|
16
|
-
}).join(' ').replace(/^(and |or )/i, '')
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
get limit() {
|
|
20
|
-
const limit = this.components.limit
|
|
21
|
-
return limit ? `LIMIT ${limit.from}` + (limit.count ? `, ${limit.count}` : '') : ''
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
get joins() {
|
|
25
|
-
return this.components.joins.map(join => {
|
|
26
|
-
return `${join.type} JOIN ${wrap(join.table)} ON ${join.first} ${join.operator} ${join.second}`
|
|
27
|
-
}).join(' ')
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
get groups() {
|
|
31
|
-
if (!this.components.groups.length) {
|
|
32
|
-
return ''
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
return `GROUP BY ` + this.components.groups.map(column => wrap(column)).join(', ')
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
get having() {
|
|
39
|
-
return ''
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
get orders() {
|
|
43
|
-
if (!this.components.orders?.length) {
|
|
44
|
-
return ''
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
return 'ORDER BY ' + this.components.orders.map(order => `${wrap(order[0])} ${order[1]}`).join(', ')
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
abstract toSQL(): string;
|
|
51
|
-
|
|
52
|
-
toString() {
|
|
53
|
-
return this.toSQL()
|
|
54
|
-
}
|
|
55
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { BaseStatement } from './BaseStatement'
|
|
2
|
-
|
|
3
|
-
export class Delete extends BaseStatement {
|
|
4
|
-
|
|
5
|
-
get wheres() {
|
|
6
|
-
if (!this.components.wheres.length) {
|
|
7
|
-
return ''
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
return `WHERE ` + super.wheres
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
toSQL() {
|
|
14
|
-
return `
|
|
15
|
-
DELETE
|
|
16
|
-
FROM ${this.table} ${this.wheres} ${this.orders} ${this.limit}
|
|
17
|
-
`
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { BaseStatement } from './BaseStatement'
|
|
2
|
-
import { wrap } from '../../../Helpers'
|
|
3
|
-
|
|
4
|
-
export class Insert extends BaseStatement {
|
|
5
|
-
|
|
6
|
-
get columns() {
|
|
7
|
-
const values = this.components.insert || []
|
|
8
|
-
|
|
9
|
-
return wrap(Object.keys(values.first() ?? {}))
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
get values() {
|
|
13
|
-
return (this.components.insert || []).map(valuesMap => {
|
|
14
|
-
const values = Object.values(valuesMap)
|
|
15
|
-
this.bindings = this.bindings.concat(values)
|
|
16
|
-
return '(' + [...Array(values.length)].map(() => '?').join(', ') + ')'
|
|
17
|
-
}).join(', ')
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
toSQL() {
|
|
21
|
-
return `INSERT INTO ${this.table} (${this.columns})
|
|
22
|
-
VALUES ${this.values} `
|
|
23
|
-
}
|
|
24
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { BaseStatement } from './BaseStatement'
|
|
2
|
-
import { StringExpression } from '../../..'
|
|
3
|
-
import { wrap } from '../../../Helpers'
|
|
4
|
-
|
|
5
|
-
export class Select extends BaseStatement {
|
|
6
|
-
get distinct() {
|
|
7
|
-
return this.components.distinct ? 'DISTINCT ' : ''
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
get columns() {
|
|
11
|
-
let columns = this.components.columns || []
|
|
12
|
-
columns = columns.map(column => {
|
|
13
|
-
return column instanceof StringExpression ? column.value : wrap(column)
|
|
14
|
-
})
|
|
15
|
-
|
|
16
|
-
const aggregate = this.components.aggregate
|
|
17
|
-
if (aggregate) {
|
|
18
|
-
columns.push(`${aggregate.function}(${wrap(aggregate.columns) || '*'}) as aggregate`)
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
if (!columns.length) {
|
|
22
|
-
return '*'
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
return columns.join(', ')
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
get wheres() {
|
|
29
|
-
if (!this.components.wheres.length) {
|
|
30
|
-
return ''
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
return `WHERE ${super.wheres}`
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
toSQL() {
|
|
37
|
-
return `
|
|
38
|
-
SELECT ${this.distinct}${this.columns}
|
|
39
|
-
FROM ${this.table} ${this.joins} ${this.wheres} ${this.groups}
|
|
40
|
-
${this.having}
|
|
41
|
-
${this.orders}
|
|
42
|
-
${this.limit}
|
|
43
|
-
`
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/*
|
|
48
|
-
const query = `SELECT *
|
|
49
|
-
FROM users
|
|
50
|
-
where name = 'john' -- where basic
|
|
51
|
-
or (age in (1, 2, 3) and age > 2) -- where nested
|
|
52
|
-
or age in (1, 2, 3) -- where in
|
|
53
|
-
or age in (SELECT age from users) -- where subSelect
|
|
54
|
-
`;
|
|
55
|
-
*/
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { BaseStatement } from './BaseStatement'
|
|
2
|
-
|
|
3
|
-
export class Update extends BaseStatement {
|
|
4
|
-
|
|
5
|
-
get wheres() {
|
|
6
|
-
if (!this.components.wheres.length) {
|
|
7
|
-
return ''
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
return 'WHERE ' + super.wheres
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
get columns() {
|
|
14
|
-
const columns = []
|
|
15
|
-
const values = this.components.update || {}
|
|
16
|
-
for (const column in values) {
|
|
17
|
-
if (values.hasOwnProperty(column)) {
|
|
18
|
-
this.bindings.push(values[column])
|
|
19
|
-
columns.push(`${column} = ?`)
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
return columns.join(', ')
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
toSQL() {
|
|
26
|
-
return `
|
|
27
|
-
UPDATE
|
|
28
|
-
${this.table}
|
|
29
|
-
SET ${this.columns}
|
|
30
|
-
${this.wheres} ${this.orders} ${this.limit}
|
|
31
|
-
`
|
|
32
|
-
}
|
|
33
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { BaseStatement } from '../SQL/Statements/BaseStatement'
|
|
2
|
-
import { ColumnDefinitionOptions } from '../SQL'
|
|
3
|
-
|
|
4
|
-
export class Create extends BaseStatement {
|
|
5
|
-
|
|
6
|
-
constructor(table: string, public columns: ColumnDefinitionOptions[] = []) {
|
|
7
|
-
super({
|
|
8
|
-
table,
|
|
9
|
-
columns: [],
|
|
10
|
-
joins: [],
|
|
11
|
-
wheres: [],
|
|
12
|
-
groups: [],
|
|
13
|
-
orders: [],
|
|
14
|
-
having: []
|
|
15
|
-
})
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
toSQL() {
|
|
19
|
-
const definitions: string[] = this.getColumnsSQL(this.columns)
|
|
20
|
-
|
|
21
|
-
return `
|
|
22
|
-
CREATE TABLE ${this.table}
|
|
23
|
-
(
|
|
24
|
-
${definitions.join(', \n')}
|
|
25
|
-
)
|
|
26
|
-
`
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
private getColumnsSQL(columns: ColumnDefinitionOptions[]) {
|
|
30
|
-
return columns.map(this.getColumnSQL)
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
private getColumnSQL(column: ColumnDefinitionOptions) {
|
|
34
|
-
const sqlParts = [column.name, column.type]
|
|
35
|
-
|
|
36
|
-
if (column.primaryKey) {
|
|
37
|
-
sqlParts.push('PRIMARY KEY')
|
|
38
|
-
}
|
|
39
|
-
if (column.autoIncrement) {
|
|
40
|
-
sqlParts.push('AUTOINCREMENT')
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
return sqlParts.join(' ')
|
|
44
|
-
}
|
|
45
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { ColumnField, Entity, PrimaryField } from '../..'
|
|
2
|
-
import { Schema as BaseSchema } from '../SQL/Schema'
|
|
3
|
-
import { Create } from './Create'
|
|
4
|
-
import { typesMatches } from '.'
|
|
5
|
-
import { ColumnDefinitionOptions } from '../SQL'
|
|
6
|
-
import { wrap } from '../../Helpers'
|
|
7
|
-
|
|
8
|
-
export class Schema extends BaseSchema {
|
|
9
|
-
|
|
10
|
-
columnMetadataToColumnDefinition(metadata: ColumnField<Entity>) {
|
|
11
|
-
return {
|
|
12
|
-
name: metadata.column,
|
|
13
|
-
primaryKey: metadata.constructor === PrimaryField,
|
|
14
|
-
autoIncrement: Number(metadata.constructor === PrimaryField),
|
|
15
|
-
type: this.getColumnTypeBasedOnTypescriptType(metadata),
|
|
16
|
-
default: undefined,
|
|
17
|
-
nullable: true
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
async create(table: string, columns: ColumnField<Entity>[]) {
|
|
22
|
-
const columnsDefinitions: ColumnDefinitionOptions[] = columns.map(column => this.columnMetadataToColumnDefinition(column))
|
|
23
|
-
const createStatement = new Create(table, columnsDefinitions)
|
|
24
|
-
|
|
25
|
-
await this.driver.run(createStatement.toSQL())
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
protected async syncTableColumns(table: string, columnsMetadata: ColumnField<Entity>[]) {
|
|
29
|
-
const columns = columnsMetadata.map(metadata => this.columnMetadataToColumnDefinition(metadata))
|
|
30
|
-
const tableColumns = await this.driver.tableColumns(table)
|
|
31
|
-
|
|
32
|
-
if (tableColumns.length) {
|
|
33
|
-
const temporaryTableName = table + '_alter_tmp'
|
|
34
|
-
await this.create(temporaryTableName, columnsMetadata)
|
|
35
|
-
const columnList = wrap(columns.whereIn('name', tableColumns.pluck('name')).pluck('name'))
|
|
36
|
-
await this.driver.run(`INSERT INTO ${temporaryTableName}(${columnList})
|
|
37
|
-
SELECT ${columnList}
|
|
38
|
-
FROM ${table}`)
|
|
39
|
-
await this.driver.run(`DROP TABLE ${table}`)
|
|
40
|
-
await this.driver.run(`ALTER TABLE ${temporaryTableName} RENAME TO ${table}`)
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
private getColumnTypeBasedOnTypescriptType(column: ColumnField<Entity>) {
|
|
45
|
-
const typePrototype = Array.from(typesMatches.keys())
|
|
46
|
-
.find(key => column.type().prototype instanceof key) || String
|
|
47
|
-
|
|
48
|
-
return typesMatches.get(column.type())
|
|
49
|
-
?? typesMatches.get(column.constructor)
|
|
50
|
-
?? typesMatches.get(typePrototype)
|
|
51
|
-
?? typesMatches.get(String) as string
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
}
|