Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for csvRecord (0.17 sec)

  1. internal/s3select/csv/record.go

    	}
    	if len(r.csvRecord) > 0 {
    		r.csvRecord = r.csvRecord[:0]
    	}
    	for k := range r.nameIndexMap {
    		delete(r.nameIndexMap, k)
    	}
    }
    
    // Clone the record.
    func (r *Record) Clone(dst sql.Record) sql.Record {
    	other, ok := dst.(*Record)
    	if !ok {
    		other = &Record{}
    	}
    	if len(other.columnNames) > 0 {
    		other.columnNames = other.columnNames[:0]
    	}
    	if len(other.csvRecord) > 0 {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Sep 13 00:00:59 GMT 2022
    - 4.1K bytes
    - Viewed (0)
  2. internal/s3select/simdj/record.go

    		default:
    			return fmt.Errorf("cannot marshal unhandled type: %s", typ.String())
    		}
    		csvRecord = append(csvRecord, columnValue)
    	}
    	w := csv.NewWriter(writer)
    	w.Comma = opts.FieldDelimiter
    	w.Quote = opts.Quote
    	w.QuoteEscape = opts.QuoteEscape
    	w.AlwaysQuote = opts.AlwaysQuote
    	if err := w.Write(csvRecord); err != nil {
    		return err
    	}
    	w.Flush()
    	return w.Error()
    }
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Jun 01 21:59:40 GMT 2021
    - 5.4K bytes
    - Viewed (0)
  3. internal/s3select/json/record.go

    		default:
    			return fmt.Errorf("Cannot marshal unhandled type: %T", kv.Value)
    		}
    		csvRecord = append(csvRecord, columnValue)
    	}
    
    	w := csv.NewWriter(writer)
    	w.Comma = opts.FieldDelimiter
    	w.Quote = opts.Quote
    	w.AlwaysQuote = opts.AlwaysQuote
    	w.QuoteEscape = opts.QuoteEscape
    	if err := w.Write(csvRecord); err != nil {
    		return err
    	}
    	w.Flush()
    	return w.Error()
    }
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Feb 25 20:31:19 GMT 2022
    - 5.2K bytes
    - Viewed (0)
  4. internal/s3select/csv/reader.go

    		r.csvDstPool.Put(r.current)
    		r.current = <-item.dst
    		r.err = item.err
    		r.recordsRead = 0
    	}
    	csvRecord := r.current[r.recordsRead]
    	r.recordsRead++
    
    	// If no column names are set, use _(index)
    	if r.columnNames == nil {
    		r.columnNames = make([]string, len(csvRecord))
    		for i := range csvRecord {
    			r.columnNames[i] = fmt.Sprintf("_%v", i+1)
    		}
    	}
    
    	// If no index map, add that.
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 8.9K bytes
    - Viewed (0)
Back to top