Pārlūkot izejas kodu

增加sql带参数的查询方法,map

qdy 3 mēnešus atpakaļ
vecāks
revīzija
30fffac502
1 mainītis faili ar 3 papildinājumiem un 2 dzēšanām
  1. 3
    2
      types/response.go

+ 3
- 2
types/response.go Parādīt failu

@@ -6,8 +6,9 @@ import (
6 6
 
7 7
 // QueryRequest 查询请求
8 8
 type QueryRequest struct {
9
-	SQL    string                 `json:"sql" binding:"required"`
10
-	Params map[string]interface{} `json:"params,omitempty"`
9
+	SQL              string                 `json:"sql" binding:"required"`
10
+	Params           map[string]interface{} `json:"params,omitempty"`
11
+	PositionalParams []interface{}          `json:"positionalParams,omitempty"` // 位置参
11 12
 }
12 13
 
13 14
 // QueryResult 查询结果

Notiek ielāde…
Atcelt
Saglabāt