[PR #136] [MERGED] Rewrite raw queries #15174

Closed
opened 2025-11-02 11:40:33 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/136
Author: @thibaultmeyer
Created: 11/10/2016
Status: Merged
Merged: 11/10/2016
Merged by: @andreynering

Base: masterHead: feature/rewrite-xorm-queries


📝 Commits (3)

  • a4454f5 Rewrite XORM queries
  • b0ddced Merge remote-tracking branch 'upstream/master' into feature/rewrite-xorm-queries
  • b12f2a5 Remove unused import

📊 Changes

21 files changed (+474 additions, -227 deletions)

View changed files

📝 models/access.go (+6 -2)
📝 models/action.go (+18 -13)
📝 models/admin.go (+7 -2)
📝 models/issue.go (+40 -13)
📝 models/issue_comment.go (+3 -1)
📝 models/issue_label.go (+21 -5)
📝 models/login_source.go (+1 -1)
📝 models/mail.go (+1 -1)
📝 models/org.go (+67 -43)
📝 models/org_team.go (+49 -12)
📝 models/pull.go (+23 -11)
📝 models/release.go (+7 -2)
📝 models/repo.go (+97 -58)
📝 models/repo_collaboration.go (+4 -1)
📝 models/repo_editor.go (+3 -1)
📝 models/repo_mirror.go (+11 -9)
📝 models/ssh_key.go (+27 -9)
📝 models/token.go (+4 -1)
📝 models/user.go (+55 -28)
📝 models/user_mail.go (+10 -3)

...and 1 more files

📄 Description

  • Use real .Count() rather than SELECT + len(array)
  • Raw "SELECT" queries now use XORM
  • Clean other XORM queries (now we can get the real line where an issue appear)
  • gofmt on all model files

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/gitea/pull/136 **Author:** [@thibaultmeyer](https://github.com/thibaultmeyer) **Created:** 11/10/2016 **Status:** ✅ Merged **Merged:** 11/10/2016 **Merged by:** [@andreynering](https://github.com/andreynering) **Base:** `master` ← **Head:** `feature/rewrite-xorm-queries` --- ### 📝 Commits (3) - [`a4454f5`](https://github.com/go-gitea/gitea/commit/a4454f5d0fbeaacb94668012acbb4296465cb28f) Rewrite XORM queries - [`b0ddced`](https://github.com/go-gitea/gitea/commit/b0ddced2b5b8338975e4d9b0d066fd9553574a43) Merge remote-tracking branch 'upstream/master' into feature/rewrite-xorm-queries - [`b12f2a5`](https://github.com/go-gitea/gitea/commit/b12f2a5916e74d89244a51847b753d1f9c585976) Remove unused import ### 📊 Changes **21 files changed** (+474 additions, -227 deletions) <details> <summary>View changed files</summary> 📝 `models/access.go` (+6 -2) 📝 `models/action.go` (+18 -13) 📝 `models/admin.go` (+7 -2) 📝 `models/issue.go` (+40 -13) 📝 `models/issue_comment.go` (+3 -1) 📝 `models/issue_label.go` (+21 -5) 📝 `models/login_source.go` (+1 -1) 📝 `models/mail.go` (+1 -1) 📝 `models/org.go` (+67 -43) 📝 `models/org_team.go` (+49 -12) 📝 `models/pull.go` (+23 -11) 📝 `models/release.go` (+7 -2) 📝 `models/repo.go` (+97 -58) 📝 `models/repo_collaboration.go` (+4 -1) 📝 `models/repo_editor.go` (+3 -1) 📝 `models/repo_mirror.go` (+11 -9) 📝 `models/ssh_key.go` (+27 -9) 📝 `models/token.go` (+4 -1) 📝 `models/user.go` (+55 -28) 📝 `models/user_mail.go` (+10 -3) _...and 1 more files_ </details> ### 📄 Description - Use real .Count() rather than SELECT + len(array) - Raw "SELECT" queries now use XORM - Clean other XORM queries (now we can get the real line where an issue appear) - `gofmt` on all model files --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 11:40:33 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#15174