Skip to content

Commit

Permalink
minor refactoring work in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
adranwit committed Jul 31, 2023
1 parent c491f96 commit 9c8e00c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
3 changes: 1 addition & 2 deletions service.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (
"github.com/viant/datly/reader"
"github.com/viant/datly/router"
"github.com/viant/datly/view"
"github.com/viant/datly/view/state"
sjwt "github.com/viant/scy/auth/jwt"
"github.com/viant/scy/auth/jwt/signer"
"github.com/viant/scy/auth/jwt/verifier"
Expand Down Expand Up @@ -105,7 +104,7 @@ func (s *Service) MergeResource(resource *view.Resource, types *xreflect.Types)
}

// AddParameter add global parameters
func (s *Service) AddParameter(parameters ...*state.Parameter) error {
func (s *Service) AddParameter(parameters ...*view.Parameter) error {
if err := s.ensureNotInitialised(); err != nil {
return err
}
Expand Down
26 changes: 15 additions & 11 deletions view/selector.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package view
import (
"github.com/viant/datly/utils/types"
"github.com/viant/sqlx/io/read/cache"
"github.com/viant/structology"
"github.com/viant/toolbox/format"
"strings"
"sync"
Expand All @@ -13,17 +14,20 @@ type (
Selector struct {
DatabaseFormat format.Case
OutputFormat format.Case
Columns []string `json:",omitempty"`
Fields []string `json:",omitempty"`
OrderBy string `json:",omitempty"`
Offset int `json:",omitempty"`
Limit int `json:",omitempty"`
Parameters ParamState `json:",omitempty"`
Criteria string `json:",omitempty"`
Placeholders []interface{} `json:",omitempty"`
Qualifier []SelectorQualifier
Page int
Ignore bool
Columns []string `json:",omitempty"`
Fields []string `json:",omitempty"`
OrderBy string `json:",omitempty"`
Offset int `json:",omitempty"`
Limit int `json:",omitempty"`

Parameters ParamState `json:",omitempty"`
State *structology.State

Criteria string `json:",omitempty"`
Placeholders []interface{} `json:",omitempty"`
Qualifier []SelectorQualifier
Page int
Ignore bool

initialized bool
_columnNames map[string]bool
Expand Down

0 comments on commit 9c8e00c

Please sign in to comment.