Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for DSN (0.15 sec)

  1. internal/event/target/mysql.go

    			return fmt.Errorf("unrecognized format")
    		}
    	}
    
    	if m.Table == "" {
    		return fmt.Errorf("table unspecified")
    	}
    
    	if m.DSN != "" {
    		if _, err := mysql.ParseDSN(m.DSN); err != nil {
    			return err
    		}
    	} else {
    		// Some fields need to be specified when DSN is unspecified
    		if m.Port == "" {
    			return fmt.Errorf("unspecified port")
    		}
    		if _, err := strconv.Atoi(m.Port); err != nil {
    Go
    - Registered: Sun Apr 07 19:28:10 GMT 2024
    - Last Modified: Sat Oct 07 15:07:38 GMT 2023
    - 11.5K bytes
    - Viewed (0)
  2. .github/workflows/tests.yml

          uses: actions/cache@v4
          with:
            path: ~/go/pkg/mod
            key: ${{ runner.os }}-go-${{ matrix.go }}-${{ hashFiles('tests/go.mod') }}
    
        - name: Tests
          run: GITHUB_ACTION=true GORM_DIALECT=mysql GORM_DSN="gorm:gorm@tcp(localhost:9910)/gorm?charset=utf8&parseTime=True" ./tests/tests_all.sh
    
      mariadb:
        strategy:
          matrix:
            dbversion: [ 'mariadb:latest' ]
            go: ['1.21', '1.20', '1.19']
    Others
    - Registered: Sun Apr 14 09:35:11 GMT 2024
    - Last Modified: Mon Jan 29 02:34:20 GMT 2024
    - 6.6K bytes
    - Viewed (0)
  3. tests/tests_test.go

    	dbDSN := os.Getenv("GORM_DSN")
    	switch os.Getenv("GORM_DIALECT") {
    	case "mysql":
    		log.Println("testing mysql...")
    		if dbDSN == "" {
    			dbDSN = mysqlDSN
    		}
    		db, err = gorm.Open(mysql.Open(dbDSN), cfg)
    	case "postgres":
    		log.Println("testing postgres...")
    		if dbDSN == "" {
    			dbDSN = postgresDSN
    		}
    		db, err = gorm.Open(postgres.New(postgres.Config{
    			DSN:                  dbDSN,
    Go
    - Registered: Sun Apr 14 09:35:11 GMT 2024
    - Last Modified: Fri Dec 15 08:36:08 GMT 2023
    - 3.3K bytes
    - Viewed (1)
  4. tests/gorm_test.go

    package tests_test
    
    import (
    	"testing"
    
    	"gorm.io/driver/mysql"
    
    	"gorm.io/gorm"
    )
    
    func TestOpen(t *testing.T) {
    	dsn := "gorm:gorm@tcp(localhost:9910)/gorm?loc=Asia%2FHongKong" // invalid loc
    	_, err := gorm.Open(mysql.Open(dsn), &gorm.Config{})
    	if err == nil {
    		t.Fatalf("should returns error but got nil")
    	}
    }
    
    func TestReturningWithNullToZeroValues(t *testing.T) {
    	dialect := DB.Dialector.Name()
    	switch dialect {
    Go
    - Registered: Sun Apr 14 09:35:11 GMT 2024
    - Last Modified: Thu Jun 01 07:22:21 GMT 2023
    - 3.3K bytes
    - Viewed (0)
  5. docs/bucket/notifications/README.md

    > port         (port)               MySQL server port (used only if `dsn_string` is empty)
    > username     (string)             database username (used only if `dsn_string` is empty)
    > password     (string)             database password (used only if `dsn_string` is empty)
    > database     (string)             database name (used only if `dsn_string` is empty)
    > ```
    >
    Plain Text
    - Registered: Sun Apr 14 19:28:10 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 84K bytes
    - Viewed (2)
  6. tests/connpool_test.go

    	return c.db.QueryRowContext(ctx, query, args...)
    }
    
    func TestConnPoolWrapper(t *testing.T) {
    	dialect := os.Getenv("GORM_DIALECT")
    	if dialect != "mysql" {
    		t.SkipNow()
    	}
    
    	dbDSN := os.Getenv("GORM_DSN")
    	if dbDSN == "" {
    		dbDSN = "gorm:gorm@tcp(localhost:9910)/gorm?charset=utf8&parseTime=True&loc=Local"
    	}
    	nativeDB, err := sql.Open("mysql", dbDSN)
    	if err != nil {
    		t.Fatalf("Should open db success, but got %v", err)
    Go
    - Registered: Sun Apr 14 09:35:11 GMT 2024
    - Last Modified: Tue Feb 06 02:54:40 GMT 2024
    - 5.5K bytes
    - Viewed (0)
  7. internal/config/notify/legacy.go

    			Key:   config.Enable,
    			Value: config.EnableOn,
    		},
    		config.KV{
    			Key:   target.MySQLFormat,
    			Value: cfg.Format,
    		},
    		config.KV{
    			Key:   target.MySQLDSNString,
    			Value: cfg.DSN,
    		},
    		config.KV{
    			Key:   target.MySQLTable,
    			Value: cfg.Table,
    		},
    		config.KV{
    			Key:   target.MySQLHost,
    			Value: cfg.Host.String(),
    		},
    		config.KV{
    			Key:   target.MySQLPort,
    Go
    - Registered: Sun Apr 14 19:28:10 GMT 2024
    - Last Modified: Tue Mar 19 04:37:54 GMT 2024
    - 13.1K bytes
    - Viewed (0)
  8. internal/config/notify/parse.go

    		if cErr != nil {
    			return nil, cErr
    		}
    
    		mysqlArgs := target.MySQLArgs{
    			Enable:             enabled,
    			Format:             env.Get(formatEnv, kv.Get(target.MySQLFormat)),
    			DSN:                env.Get(dsnStringEnv, kv.Get(target.MySQLDSNString)),
    			Table:              env.Get(tableEnv, kv.Get(target.MySQLTable)),
    			QueueDir:           env.Get(queueDirEnv, kv.Get(target.MySQLQueueDir)),
    Go
    - Registered: Sun Apr 14 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 46.4K bytes
    - Viewed (0)
Back to top