-
Notifications
You must be signed in to change notification settings - Fork 313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
templates: QOL suggestions #322
Comments
@switchupcb I appreciate your suggestions, please feel free to send actual code changes via a PR and I'll consider them, if they are inline with the goals of the project and are well written. If |
Which suggestions are inline with the goals of the project? I will PR a roadmap for template organization
I'm pretty sure this is possible right now with the addition of custom funcs. You would have to encourage people to use an additional The lack of documentation on Does it represent the incoming schema (table, sproc, query, etc)? |
Why close? |
Here are a list of features that aren't necessarily issues, but make using the library more complex:
Quality of Life Issues
gotpl
.gotpl
pertains to SQL, sqlserver, oracle, postgres, etcfuncs2.go.tpl
that doesn't interfere with funcs.godb.go.tpl
, etc)funcs.go.tpl
is tediousfuncs.go.tpl
is 1223 lines with comments as documentation.funcs.go.tpl
; split intofuncs
directory and give it domains.Other Suggestions
Batch Templates
Default
xo
templates are focused around context code which generate single-object CRUD functions. The user is able to optimize this by using custom functions to change template implementation: a single network request can be sent via batch (with or without transactions). This implies multiple objects are being used in a function.In contrast, there are no templates which provide use for multiple objects. For example, an SQL statement such as
can be turned into
This would be an interesting template to have but there is no indication this would be supported. The README used to say it wasn't focused on optimization.
Domain Templates
Default
xo
templates are focused around generating models with respective single-object CRUD functions. As a result, these function similar to Data Access Objects (DAOs). This library would become a standard for database generation if it included a way to map these DAO models to external application-specific models. An example of this occurring would be in a repository pattern where multiple DAOs may be involved within a single domain object.There is also no indication on whether this would be supported.
The text was updated successfully, but these errors were encountered: