mirror of
https://github.com/minio/minio.git
synced 2025-11-10 14:09:48 -05:00
Add JSON Path expression evaluation support (#7315)
- Includes support for FROM clause JSON path
This commit is contained in:
committed by
Harshavardhana
parent
b296b3cf8b
commit
e463386921
@@ -20,6 +20,7 @@ import (
|
||||
"bytes"
|
||||
"encoding/csv"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/bcicen/jstream"
|
||||
@@ -86,6 +87,16 @@ func (r *Record) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(kvs)
|
||||
}
|
||||
|
||||
// Raw - returns the underlying data with format info.
|
||||
func (r *Record) Raw() (sql.SelectObjectFormat, interface{}) {
|
||||
return sql.SelectFmtCSV, r
|
||||
}
|
||||
|
||||
// Replace - is not supported for CSV
|
||||
func (r *Record) Replace(_ jstream.KVS) error {
|
||||
return errors.New("Replace is not supported for CSV")
|
||||
}
|
||||
|
||||
// NewRecord - creates new CSV record.
|
||||
func NewRecord() *Record {
|
||||
return &Record{}
|
||||
|
||||
Reference in New Issue
Block a user