mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-10-06 19:07:50 +00:00
exclude internal fields (i.e. _exists) from Inspect output
This commit is contained in:
parent
742135dc10
commit
f79fde43e3
1 changed files with 5 additions and 0 deletions
|
|
@ -19,6 +19,7 @@ import (
|
|||
"crypto/tls"
|
||||
"fmt"
|
||||
"net"
|
||||
"strings"
|
||||
|
||||
"github.com/pilosa/pilosa/v2"
|
||||
"github.com/pilosa/pilosa/v2/logger"
|
||||
|
|
@ -111,6 +112,10 @@ func (h grpcHandler) Inspect(req *pb.InspectRequest, stream pb.Pilosa_InspectSer
|
|||
|
||||
var fields []*pilosa.Field
|
||||
for _, field := range index.Fields() {
|
||||
// exclude internal fields (starting with "_")
|
||||
if strings.HasPrefix(field.Name(), "_") {
|
||||
continue
|
||||
}
|
||||
if len(req.FilterFields) > 0 {
|
||||
for _, filter := range req.FilterFields {
|
||||
if filter == field.Name() {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue