Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for Point (0.23 sec)

  1. tests/scanner_valuer_test.go

    }
    
    type NullString struct {
    	sql.NullString
    }
    
    type Point struct {
    	X, Y int
    }
    
    func (point Point) GormDataType() string {
    	return "geo"
    }
    
    func (point Point) GormValue(ctx context.Context, db *gorm.DB) clause.Expr {
    	return clause.Expr{
    		SQL:  "ST_PointFromText(?)",
    		Vars: []interface{}{fmt.Sprintf("POINT(%d %d)", point.X, point.Y)},
    	}
    }
    
    func TestGORMValuer(t *testing.T) {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Jun 07 07:02:07 UTC 2023
    - 10.6K bytes
    - Viewed (0)
  2. callbacks/preload.go

    		names = append(names, embeddedValues(relations)...)
    	}
    	return names
    }
    
    // preloadEntryPoint enters layer by layer. It will call real preload if it finds the right entry point.
    // If the current relationship is embedded or joined, current query will be ignored.
    //
    //nolint:cyclop
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Jun 12 10:52:33 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  3. tests/transaction_test.go

    	tx := DB.Begin()
    
    	user := *GetUser("transaction-save-point", Config{})
    	tx.Create(&user)
    
    	if err := tx.First(&User{}, "name = ?", user.Name).Error; err != nil {
    		t.Fatalf("Should find saved record")
    	}
    
    	if err := tx.SavePoint("save_point1").Error; err != nil {
    		t.Fatalf("Failed to save point, got error %v", err)
    	}
    
    	user1 := *GetUser("transaction-save-point-1", Config{})
    	tx.Create(&user1)
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed May 08 04:07:58 UTC 2024
    - 10.9K bytes
    - Viewed (0)
Back to top