Application of MYSQL Views With GORM
Jul 9, 2023
I am working on dashboard development which involves a complex join. Creating a complex join in database and Expose it to API is problematic.
Source of Problem:
- With Change in Requirement, You need to change the sql. Writing long sql chain with join is troublesome.
- Testing SQL in sql console require sql commands to be shared .
- Preview and Migration
The Process Simplified with SQL views. With Views, We can visualize a table. Some other benefits
- Abstract all joins as a simple table output
- Column rename
- Data type conversion
- Conditional logic application
- Select and Filter as normal table
Rest Simulated Application Will be update Here.
View layer is programming language independent and more robust . Try using it and get an better output, ease of development