Skip to content

Commit 1d1f2d3

Browse files
committed
get more type
1 parent b0783ac commit 1d1f2d3

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

orm/query_get.go

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,36 @@ func (q *Query[T]) GetMapSliceString() (map[string][]string, QueryResult) {
9393
res := q.GetTo(&ret)
9494
return ret, res
9595
}
96+
func (q *Query[T]) GetMapStringInt() (map[string]int64, QueryResult) {
97+
var ret map[string]int64
98+
res := q.GetTo(&ret)
99+
return ret, res
100+
}
101+
func (q *Query[T]) GetMapIntString() (map[int64]string, QueryResult) {
102+
var ret map[int64]string
103+
res := q.GetTo(&ret)
104+
return ret, res
105+
}
106+
func (q *Query[T]) GetMapStringUint() (map[string]uint64, QueryResult) {
107+
var ret map[string]uint64
108+
res := q.GetTo(&ret)
109+
return ret, res
110+
}
111+
func (q *Query[T]) GetMapUintString() (map[uint64]string, QueryResult) {
112+
var ret map[uint64]string
113+
res := q.GetTo(&ret)
114+
return ret, res
115+
}
116+
func (q *Query[T]) GetMapInt() (map[int64]int64, QueryResult) {
117+
var ret map[int64]int64
118+
res := q.GetTo(&ret)
119+
return ret, res
120+
}
121+
func (q *Query[T]) GetMapUint() (map[uint64]uint64, QueryResult) {
122+
var ret map[uint64]uint64
123+
res := q.GetTo(&ret)
124+
return ret, res
125+
}
96126

97127
//get count T
98128
func (q *Query[T]) GetCount() (int64, QueryResult) {

0 commit comments

Comments
 (0)