Skip to content

Commit

Permalink
refactor: create constants
Browse files Browse the repository at this point in the history
  • Loading branch information
whoAbhishekSah committed Feb 17, 2025
1 parent 75f9c67 commit 1e00177
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rql/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,16 @@ var validNumberOperations = []string{"eq", "neq", "gt", "gte", "lte"}
var validStringOperations = []string{"eq", "neq", "like"}
var validBoolOperations = []string{"eq", "neq"}
var validDatetimeOperations = []string{"eq", "neq", "gt", "gte", "lte"}
var validSortOrder = []string{"asc", "desc"}

const TAG = "rql"
const DATATYPE_NUMBER = "number"
const DATATYPE_DATETIME = "datetime"
const DATATYPE_STRING = "string"
const DATATYPE_BOOL = "bool"
const SORT_ORDER_ASC = "asc"
const SORT_ORDER_DESC = "desc"

var validSortOrder = []string{SORT_ORDER_ASC, SORT_ORDER_DESC}

type Query struct {
Filters []Filter `json:"filters"`
Expand Down

0 comments on commit 1e00177

Please sign in to comment.