mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
Unexport Field.Keys
This commit is contained in:
parent
ba9c5193b5
commit
16461345f6
2 changed files with 4 additions and 4 deletions
|
|
@ -1577,7 +1577,7 @@ func (e *executor) translateCall(index string, idx *Index, c *pql.Call) error {
|
|||
if field == nil {
|
||||
return ErrFieldNotFound
|
||||
}
|
||||
if field.Keys() {
|
||||
if field.keys() {
|
||||
if c.Args[rowKey] != nil && !isString(c.Args[rowKey]) {
|
||||
return errors.New("row value must be a string when field 'keys' option enabled")
|
||||
}
|
||||
|
|
@ -1628,7 +1628,7 @@ func (e *executor) translateResult(index string, idx *Index, call *pql.Call, res
|
|||
if field == nil {
|
||||
return nil, ErrFieldNotFound
|
||||
}
|
||||
if field.Keys() {
|
||||
if field.keys() {
|
||||
other := make([]Pair, len(result))
|
||||
for i := range result {
|
||||
key, err := e.TranslateStore.TranslateRowToString(index, fieldName, result[i].ID)
|
||||
|
|
|
|||
4
field.go
4
field.go
|
|
@ -428,8 +428,8 @@ func (f *Field) Close() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// Keys returns true if the field uses string keys.
|
||||
func (f *Field) Keys() bool {
|
||||
// keys returns true if the field uses string keys.
|
||||
func (f *Field) keys() bool {
|
||||
f.mu.RLock()
|
||||
defer f.mu.RUnlock()
|
||||
return f.options.Keys
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue