@@ -494,7 +494,7 @@ func TestFloat64ColumnBinary(t *testing.T) {
494494 }
495495}
496496
497- func TestDecimalColumnScaled (t * testing.T ) {
497+ func TestDecimalColumn (t * testing.T ) {
498498 negative , err := qdb .NewDecimal (big .NewInt (- 12345 ), 3 )
499499 assert .NoError (t , err )
500500
@@ -524,14 +524,14 @@ func TestDecimalColumnScaled(t *testing.T) {
524524 for _ , tc := range testCases {
525525 t .Run (tc .name , func (t * testing.T ) {
526526 buf := newTestBuffer ()
527- err := buf .Table (testTable ).DecimalColumnScaled ("price" , tc .value ).At (time.Time {}, false )
527+ err := buf .Table (testTable ).DecimalColumn ("price" , tc .value ).At (time.Time {}, false )
528528 assert .NoError (t , err )
529529 assert .Equal (t , tc .expected , buf .Messages ())
530530 })
531531 }
532532}
533533
534- func TestDecimalColumnScaledTrimmingAndPadding (t * testing.T ) {
534+ func TestDecimalColumnTrimmingAndPadding (t * testing.T ) {
535535 prefix := []byte (testTable + " price==" )
536536
537537 testCases := []struct {
@@ -595,7 +595,7 @@ func TestDecimalColumnScaledTrimmingAndPadding(t *testing.T) {
595595 t .Run (tc .name , func (t * testing.T ) {
596596 buf := newTestBuffer ()
597597
598- err := buf .Table (testTable ).DecimalColumnScaled ("price" , tc .value ).At (time.Time {}, false )
598+ err := buf .Table (testTable ).DecimalColumn ("price" , tc .value ).At (time.Time {}, false )
599599 assert .NoError (t , err )
600600
601601 expected := append (append ([]byte {}, prefix ... ), tc .expectedBytes ... )
@@ -654,7 +654,7 @@ func TestDecimalColumnShopspring(t *testing.T) {
654654 }
655655}
656656
657- func TestDecimalColumnStringValidation (t * testing.T ) {
657+ func TestDecimalColumnFromStringValidation (t * testing.T ) {
658658 t .Run ("valid strings" , func (t * testing.T ) {
659659 testCases := []struct {
660660 name string
@@ -672,7 +672,7 @@ func TestDecimalColumnStringValidation(t *testing.T) {
672672 for _ , tc := range testCases {
673673 t .Run (tc .name , func (t * testing.T ) {
674674 buf := newTestBuffer ()
675- err := buf .Table (testTable ).DecimalColumnString ("price" , tc .value ).At (time.Time {}, false )
675+ err := buf .Table (testTable ).DecimalColumnFromString ("price" , tc .value ).At (time.Time {}, false )
676676 assert .NoError (t , err )
677677 expected := []byte (testTable + " price=" + tc .expected + "\n " )
678678 assert .Equal (t , expected , buf .Messages ())
@@ -696,7 +696,7 @@ func TestDecimalColumnStringValidation(t *testing.T) {
696696 for _ , tc := range testCases {
697697 t .Run (tc .name , func (t * testing.T ) {
698698 buf := newTestBuffer ()
699- err := buf .Table (testTable ).DecimalColumnString ("price" , tc .value ).At (time.Time {}, false )
699+ err := buf .Table (testTable ).DecimalColumnFromString ("price" , tc .value ).At (time.Time {}, false )
700700 assert .Error (t , err )
701701 assert .Contains (t , err .Error (), "decimal" )
702702 assert .Empty (t , buf .Messages ())
@@ -709,7 +709,7 @@ func TestDecimalColumnErrors(t *testing.T) {
709709 t .Run ("invalid scale" , func (t * testing.T ) {
710710 buf := newTestBuffer ()
711711 dec := qdb .NewDecimalFromInt64 (1 , 100 )
712- err := buf .Table (testTable ).DecimalColumnScaled ("price" , dec ).At (time.Time {}, false )
712+ err := buf .Table (testTable ).DecimalColumn ("price" , dec ).At (time.Time {}, false )
713713 assert .ErrorContains (t , err , "decimal scale" )
714714 assert .Empty (t , buf .Messages ())
715715 })
0 commit comments