Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 29 for Begin (0.69 sec)

  1. internal/config/certs_test.go

    	if err != nil {
    		t.Fatalf("Unable to create temporary file. %v", err)
    	}
    	defer os.Remove(tempFile1)
    
    	tempFile2, err := createTempFile("public-cert-file",
    		`-----BEGIN CERTIFICATE-----
    MIICdTCCAd4CCQCO5G/W1xcE9TANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJa
    WTEOMAwGA1UECBMFTWluaW8xETAPBgNVBAcTCEludGVybmV0MQ4wDAYDVQQKEwVN
    aW5pbzEOMAwGA1UECxMFTWluaW8xDjAMBgNVBAMTBU1pbmlvMR0wGwYJKoZIhvcN
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Sep 19 18:05:16 GMT 2022
    - 21.6K bytes
    - Viewed (0)
  2. callbacks/callbacks.go

    	}
    	if len(config.UpdateClauses) == 0 {
    		config.UpdateClauses = updateClauses
    	}
    
    	createCallback := db.Callback().Create()
    	createCallback.Match(enableTransaction).Register("gorm:begin_transaction", BeginTransaction)
    	createCallback.Register("gorm:before_create", BeforeCreate)
    	createCallback.Register("gorm:save_before_associations", SaveBeforeAssociations(true))
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Wed Oct 27 23:56:55 GMT 2021
    - 3.3K bytes
    - Viewed (0)
  3. tests/prepared_stmt_test.go

    		t.Fatalf("no error should happen but got %v", err)
    	}
    }
    
    func TestPreparedStmtFromTransaction(t *testing.T) {
    	db := DB.Session(&gorm.Session{PrepareStmt: true, SkipDefaultTransaction: true})
    
    	tx := db.Begin()
    	defer func() {
    		if r := recover(); r != nil {
    			tx.Rollback()
    		}
    	}()
    	if err := tx.Error; err != nil {
    		t.Errorf("Failed to start transaction, got error %v\n", err)
    	}
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Mar 21 07:55:43 GMT 2024
    - 4K bytes
    - Viewed (0)
  4. internal/event/target/kafka_scram_client_contrib.go

    	*scram.Client
    	*scram.ClientConversation
    	scram.HashGeneratorFcn
    }
    
    // Begin constructs a SCRAM client component based on a given hash.Hash
    // factory receiver.  This constructor will normalize the username, password
    // and authzID via the SASLprep algorithm, as recommended by RFC-5802.  If
    // SASLprep fails, the method returns an error.
    func (x *XDGSCRAMClient) Begin(userName, password, authzID string) (err error) {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Nov 09 04:04:01 GMT 2023
    - 3.2K bytes
    - Viewed (0)
  5. internal/http/listener_test.go

    	certificate, err := getTLSCert()
    	if err != nil {
    		return nil, err
    	}
    	return &certificate, nil
    }
    
    func getTLSCert() (tls.Certificate, error) {
    	keyPEMBlock := []byte(`-----BEGIN RSA PRIVATE KEY-----
    MIIEpAIBAAKCAQEApEkbPrT6wzcWK1W5atQiGptvuBsRdf8MCg4u6SN10QbslA5k
    6BYRdZfFeRpwAwYyzkumug6+eBJatDZEd7+0FF86yxB7eMTSiHKRZ5Mi5ZyCFsez
    dndknGBeK6I80s1jd5ZsLLuMKErvbNwSbfX+X6d2mBeYW8Scv9N+qYnNrHHHohvX
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Jun 12 16:09:28 GMT 2023
    - 11.8K bytes
    - Viewed (0)
  6. tests/connpool_test.go

    		}
    	}()
    
    	db, err := gorm.Open(mysql.New(mysql.Config{Conn: conn, DisableWithReturning: true}))
    	if err != nil {
    		t.Fatalf("Should open db success, but got %v", err)
    	}
    
    	tx := db.Begin()
    	user := *GetUser("transaction", Config{})
    
    	if err = tx.Save(&user).Error; err != nil {
    		t.Fatalf("No error should raise, but got %v", err)
    	}
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Tue Feb 06 02:54:40 GMT 2024
    - 5.5K bytes
    - Viewed (0)
  7. scan.go

    					} else {
    						reflectValue.SetLen(0)
    						db.Statement.ReflectValue.Set(reflectValue)
    					}
    				}
    			}
    
    			for initialized || rows.Next() {
    			BEGIN:
    				initialized = false
    
    				if update {
    					if int(db.RowsAffected) >= reflectValue.Len() {
    						return
    					}
    					elem = reflectValue.Index(int(db.RowsAffected))
    					if onConflictDonothing {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Apr 26 09:53:11 GMT 2024
    - 9.8K bytes
    - Viewed (0)
  8. tests/transaction_test.go

    package tests_test
    
    import (
    	"context"
    	"errors"
    	"testing"
    
    	"gorm.io/gorm"
    	. "gorm.io/gorm/utils/tests"
    )
    
    func TestTransaction(t *testing.T) {
    	tx := DB.Begin()
    	user := *GetUser("transaction", Config{})
    
    	if err := tx.Save(&user).Error; err != nil {
    		t.Fatalf("No error should raise, but got %v", err)
    	}
    
    	if err := tx.First(&User{}, "name = ?", "transaction").Error; err != nil {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Sat Jun 10 13:05:19 GMT 2023
    - 10.9K bytes
    - Viewed (0)
  9. logger/logger.go

    	}
    }
    
    // Trace print sql message
    //
    //nolint:cyclop
    func (l *logger) Trace(ctx context.Context, begin time.Time, fc func() (string, int64), err error) {
    	if l.LogLevel <= Silent {
    		return
    	}
    
    	elapsed := time.Since(begin)
    	switch {
    	case err != nil && l.LogLevel >= Error && (!errors.Is(err, ErrRecordNotFound) || !l.IgnoreRecordNotFoundError):
    		sql, rows := fc()
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Tue Nov 07 02:19:41 GMT 2023
    - 5.8K bytes
    - Viewed (0)
  10. internal/logger/target/kafka/kafka_scram_client_contrib.go

    	*scram.Client
    	*scram.ClientConversation
    	scram.HashGeneratorFcn
    }
    
    // Begin constructs a SCRAM client component based on a given hash.Hash
    // factory receiver.  This constructor will normalize the username, password
    // and authzID via the SASLprep algorithm, as recommended by RFC-5802.  If
    // SASLprep fails, the method returns an error.
    func (x *XDGSCRAMClient) Begin(userName, password, authzID string) (err error) {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Nov 09 04:04:01 GMT 2023
    - 3.3K bytes
    - Viewed (1)
Back to top