Skip to content
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

feat(templates): adding a get all method that returns all records for that table #67

Merged
merged 3 commits into from
Jan 27, 2025

Conversation

Jacobbrewer1
Copy link
Owner

Describe your changes

This pull request introduces a new function to retrieve all rows from a specified database table and return them as a slice of structs. The changes are primarily focused on enhancing database interaction capabilities.

Enhancements to database interaction:

  • templates/model.tmpl: Added a new function GetAll{{ $struct }} to retrieve all rows from a table as a slice of structs, including database latency tracking with Prometheus and logging of the SQL query.

@Jacobbrewer1 Jacobbrewer1 enabled auto-merge (squash) January 27, 2025 11:48
@Jacobbrewer1 Jacobbrewer1 disabled auto-merge January 27, 2025 11:48
@Jacobbrewer1 Jacobbrewer1 enabled auto-merge (squash) January 27, 2025 11:54
@Jacobbrewer1 Jacobbrewer1 merged commit 74c1a8a into main Jan 27, 2025
4 checks passed
@Jacobbrewer1 Jacobbrewer1 deleted the feat/get-all branch January 27, 2025 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant