From 0d2ec9df756c37582d2eb69881a35b9d8a7f07b1 Mon Sep 17 00:00:00 2001 From: Patrick Pacher Date: Tue, 26 Apr 2022 15:03:04 +0200 Subject: [PATCH] wip --- netquery/orm/encoder.go | 3 +-- netquery/query.go | 8 ++++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/netquery/orm/encoder.go b/netquery/orm/encoder.go index 0b60f6ca..0bcea756 100644 --- a/netquery/orm/encoder.go +++ b/netquery/orm/encoder.go @@ -106,8 +106,7 @@ func encodeBasic() EncodeFunc { if !col.Nullable { // we need to set the zero value here since the column // is not marked as nullable - //return reflect.New(valType).Elem().Interface(), true, nil - panic("nil pointer for not-null field") + return reflect.New(valType).Elem().Interface(), true, nil } return nil, true, nil diff --git a/netquery/query.go b/netquery/query.go index 2fdbf38f..6febf0b6 100644 --- a/netquery/query.go +++ b/netquery/query.go @@ -38,10 +38,10 @@ type ( Selects []Select QueryRequestPayload struct { - Select Selects `json:"select"` - Query Query `json:"query"` - OrderBy []OrderBy `json:"orderBy"` - GroupBy []string `json:"groupBy"` + Select Selects `json:"select"` + Query Query `json:"query"` + OrderBy OrderBys `json:"orderBy"` + GroupBy []string `json:"groupBy"` selectedFields []string whitelistedFields []string