Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for DecimalSize (0.16 sec)

  1. migrator/column_type.go

    		return ct.LengthValue.Int64, true
    	}
    	return ct.SQLColumnType.Length()
    }
    
    // DecimalSize returns the scale and precision of a decimal type.
    func (ct ColumnType) DecimalSize() (precision int64, scale int64, ok bool) {
    	if ct.DecimalSizeValue.Valid {
    		return ct.DecimalSizeValue.Int64, ct.ScaleValue.Int64, true
    	}
    	return ct.SQLColumnType.DecimalSize()
    }
    
    // Nullable reports whether the column may be null.
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Thu Mar 24 01:31:58 UTC 2022
    - 3.3K bytes
    - Viewed (0)
  2. migrator.go

    	ColumnType() (columnType string, ok bool) // varchar(64)
    	PrimaryKey() (isPrimaryKey bool, ok bool)
    	AutoIncrement() (isAutoIncrement bool, ok bool)
    	Length() (length int64, ok bool)
    	DecimalSize() (precision int64, scale int64, ok bool)
    	Nullable() (nullable bool, ok bool)
    	Unique() (unique bool, ok bool)
    	ScanType() reflect.Type
    	Comment() (value string, ok bool)
    	DefaultValue() (value string, ok bool)
    }
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Mon Oct 30 09:15:49 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  3. tests/migrate_test.go

    			}
    		case "salary":
    			if precision, o, _ := columnType.DecimalSize(); (fullSupported || precision != 0) && precision != 2 {
    				t.Fatalf("salary's precision should be 2, but got %v %v", precision, o)
    			}
    		case "birthday":
    			if precision, _, _ := columnType.DecimalSize(); (fullSupported || precision != 0) && precision != 2 {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Mon Mar 18 11:24:16 UTC 2024
    - 56.2K bytes
    - Viewed (0)
  4. api/go1.8.txt

    pkg database/sql/driver, type TxOptions struct, ReadOnly bool
    pkg database/sql, func Named(string, interface{}) NamedArg
    pkg database/sql, method (*ColumnType) DatabaseTypeName() string
    pkg database/sql, method (*ColumnType) DecimalSize() (int64, int64, bool)
    pkg database/sql, method (*ColumnType) Length() (int64, bool)
    pkg database/sql, method (*ColumnType) Name() string
    pkg database/sql, method (*ColumnType) Nullable() (bool, bool)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Dec 21 05:25:57 UTC 2016
    - 16.3K bytes
    - Viewed (0)
  5. migrator/migrator.go

    				if !field.PrimaryKey &&
    					(len(matches2) == 1 && matches2[0][1] != fmt.Sprint(length) && ok) {
    					alterColumn = true
    				}
    			}
    		}
    
    		// check precision
    		if precision, _, ok := columnType.DecimalSize(); ok && int64(field.Precision) != precision {
    			if regexp.MustCompile(fmt.Sprintf("[^0-9]%d[^0-9]", field.Precision)).MatchString(m.DataTypeOf(field)) {
    				alterColumn = true
    			}
    		}
    	}
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Fri Apr 26 07:15:49 UTC 2024
    - 29K bytes
    - Viewed (0)
  6. src/database/sql/sql.go

    // by the driver ok is false.
    func (ci *ColumnType) Length() (length int64, ok bool) {
    	return ci.length, ci.hasLength
    }
    
    // DecimalSize returns the scale and precision of a decimal type.
    // If not applicable or if not supported ok is false.
    func (ci *ColumnType) DecimalSize() (precision, scale int64, ok bool) {
    	return ci.precision, ci.scale, ci.hasPrecisionScale
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:16:53 UTC 2024
    - 103.6K bytes
    - Viewed (0)
  7. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"TBSCertificateList.ThisUpdate", Field, 0},
    		{"TBSCertificateList.Version", Field, 0},
    	},
    	"database/sql": {
    		{"(*ColumnType).DatabaseTypeName", Method, 8},
    		{"(*ColumnType).DecimalSize", Method, 8},
    		{"(*ColumnType).Length", Method, 8},
    		{"(*ColumnType).Name", Method, 8},
    		{"(*ColumnType).Nullable", Method, 8},
    		{"(*ColumnType).ScanType", Method, 8},
    		{"(*Conn).BeginTx", Method, 9},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 534.2K bytes
    - Viewed (0)
Back to top