Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for CSVString (0.09 sec)

  1. internal/s3select/sql/value_test.go

    		t.Run(tt.name, func(t *testing.T) {
    			v := valueBuilders[i]()
    			vAlt := altValueBuilders[i]()
    			if got := v.CSVString(); got != tt.want {
    				t.Errorf("CSVString() = %v, want %v", got, tt.want)
    			}
    			if got := vAlt.CSVString(); got != tt.wantAlt {
    				t.Errorf("CSVString() = %v, want %v", got, tt.wantAlt)
    			}
    		})
    	}
    }
    
    func TestValue_bytesToInt(t *testing.T) {
    	type fields struct {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Mar 06 16:56:10 UTC 2023
    - 12.5K bytes
    - Viewed (0)
  2. internal/s3select/csv/record.go

    }
    
    // Set - sets the value for a column name.
    func (r *Record) Set(name string, value *sql.Value) (sql.Record, error) {
    	r.columnNames = append(r.columnNames, name)
    	r.csvRecord = append(r.csvRecord, value.CSVString())
    	return r, nil
    }
    
    // Reset data in record.
    func (r *Record) Reset() {
    	if len(r.columnNames) > 0 {
    		r.columnNames = r.columnNames[:0]
    	}
    	if len(r.csvRecord) > 0 {
    		r.csvRecord = r.csvRecord[:0]
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Sep 23 19:35:41 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  3. internal/s3select/sql/value.go

    	v.value = b
    }
    
    func (v *Value) setTimestamp(t time.Time) {
    	v.value = t
    }
    
    func (v Value) String() string {
    	return fmt.Sprintf("%#v", v.value)
    }
    
    // CSVString - convert to string for CSV serialization
    func (v Value) CSVString() string {
    	switch x := v.value.(type) {
    	case nil, Missing:
    		return ""
    	case bool:
    		if x {
    			return "true"
    		}
    		return "false"
    	case string:
    		return x
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Feb 25 20:31:19 UTC 2022
    - 20.2K bytes
    - Viewed (0)
Back to top