Closed andyslack closed 1 month ago
[!CAUTION]
Review failed
The pull request is closed.
The changes in this pull request involve modifications to several files, primarily focusing on configuration updates, enhancements to testing, and improvements in the handling of database queries and relations. The .env.example
file has been updated to include new configuration variables and modify existing ones. The package.json
file reflects a change in the ngrok port number. Enhancements to the test suite for the application controller and the introduction of new methods in the SalesOrderTestingService
are also present. Additionally, improvements in SQL query logging and the handling of relations in the Query
class have been implemented.
File | Change Summary |
---|---|
.env.example |
Uncommented and added configuration variables: PORT , AUTH_USER_TABLE_NAME , AUTH_USER_API_KEY_FIELD , AUTH_USER_API_KEY_TABLE_NAME , ROLE_LOCATION_USER_TABLE_NAME , ROLE_LOCATION_USER_TABLE_ROLE_FIELD . Removed commented-out database connection strings. |
package.json |
Updated start:ngrok script to change port from 3000 to 3050 . |
src/app.controller.get.test.spec.ts |
Added SalesOrderTestingService for sales order management in tests. Introduced new test case "Get One - With Relations" and added cleanup for created sales orders. |
src/app.controller.get.ts |
Enhanced getById and list methods to use a new postQueryRelations array for managing query relations, improving clarity and maintainability. |
src/databases/mysql.database.ts |
Added replaceQ utility for improved SQL query logging. Updated performQuery and find methods for better command string formatting and trimming. |
src/helpers/Query.find.test.spec.ts |
Removed the test case 'Passing Relations' from findMany tests, while preserving other tests. |
src/helpers/Query.ts |
Added buildRelations method for constructing relations in queries. Minor adjustments in perform method and new types DatabaseWhere and WhereOperator . |
src/helpers/Schema.ts |
Updated validateRelations method to separate validated relations from existing relations, enhancing clarity. |
src/testing/salesorder.testing.service.ts |
Added deleteOrder method and refactored createOrder method in SalesOrderTestingService for better maintainability. |
src/utils/String.ts |
Introduced replaceQ function for replacing placeholders in SQL strings with corresponding values from an array. |
GetController
class involve restructuring logic for handling requests, which may relate to modifications in the main PR affecting the .env.example
file and database configurations.GetController
class include formatting improvements and minor adjustments, potentially relevant as they may affect how the application interacts with environment variables defined in the main PR.x-request-id
in various methods in the GetController
class enhances request tracking, aligning with changes in the main PR related to user authentication and API key management..env.example
file to clarify database configurations directly relate to changes in the main PR, which also involves database connection strings and settings.🐰 "In the garden where changes bloom,
New settings sprout, dispelling gloom.
With orders saved and queries neat,
Our code now dances, oh so sweet!
From logs to tests, all's in place,
Hopping forward, we embrace!" 🌼
Summary by CodeRabbit
New Features
Bug Fixes
Tests
Chores