MCPcopy Create free account
hub / github.com/APIParkLab/APIPark / Search

Method Search

service/universally/get-softdelete.go:60–71  ·  view source on GitHub ↗
(ctx context.Context, keyword string, condition map[string]interface{}, sortRule ...string)

Source from the content-addressed store, hash-verified

58 return utils.SliceToSlice(list, s.toModelHandler), nil
59}
60func (s *imlServiceGetSoftDelete[T, E]) Search(ctx context.Context, keyword string, condition map[string]interface{}, sortRule ...string) ([]*T, error) {
61 w := make(map[string]interface{})
62 for k, v := range condition {
63 w[k] = v
64 }
65 w[SoftDeleteField] = false
66 ps, err := s.store.Search(ctx, keyword, w, sortRule...)
67 if err != nil {
68 return nil, err
69 }
70 return utils.SliceToSlice(ps, s.toModelHandler), nil
71}
72
73func (s *imlServiceGetSoftDelete[T, E]) SearchByPage(ctx context.Context, keyword string, condition map[string]interface{}, page int, pageSize int, sortRule ...string) ([]*T, int64, error) {
74 w := make(map[string]interface{})

Callers

nothing calls this directly

Calls 1

SearchMethod · 0.65

Tested by

no test coverage detected