File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
src/main/kotlin/com/github/oldmegit/goframehelper/callUtil/orm Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 1
1
package com.github.oldmegit.goframehelper.callUtil.orm
2
2
3
3
import com.github.oldmegit.goframehelper.callUtil.CallUtil
4
- import com.goide.parser.GoParser.ReferenceExpression
5
4
import com.goide.psi.*
6
5
import com.goide.psi.impl.GoPsiUtil
7
6
import com.intellij.psi.PsiComment
@@ -129,6 +128,14 @@ object OrmUtil : CallUtil() {
129
128
// db = db.Xxx
130
129
// db = dao.Xxx
131
130
private fun doAssignmentStatement (assignmentStatement : GoAssignmentStatement ): GoStatement ? {
131
+ // get GoReferenceExpression list
132
+ for (one in assignmentStatement.expressionList) {
133
+ // dao.Xxx
134
+ // if statement contain dao
135
+ if (one.text.startsWith(" dao." )) {
136
+ return assignmentStatement
137
+ }
138
+ }
132
139
for (expression in assignmentStatement.leftHandExprList.expressionList) {
133
140
val psiElementRoot = expression.reference?.resolve()
134
141
return getStatementContainDao(psiElementRoot!! )
You can’t perform that action at this time.
0 commit comments