Search Options

Results per page
Sort
Preferred Languages
Advance

Results 921 - 930 of 1,179 for _func (0.03 sec)

  1. callbacks/transaction.go

    import (
    	"gorm.io/gorm"
    )
    
    func BeginTransaction(db *gorm.DB) {
    	if !db.Config.SkipDefaultTransaction && db.Error == nil {
    		if tx := db.Begin(); tx.Error == nil {
    			db.Statement.ConnPool = tx.Statement.ConnPool
    			db.InstanceSet("gorm:started_transaction", true)
    		} else if tx.Error == gorm.ErrInvalidTransaction {
    			tx.Error = nil
    		} else {
    			db.Error = tx.Error
    		}
    	}
    }
    
    func CommitOrRollbackTransaction(db *gorm.DB) {
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Mon Nov 29 01:33:20 UTC 2021
    - 675 bytes
    - Viewed (0)
  2. clause/values_test.go

    package clause_test
    
    import (
    	"fmt"
    	"testing"
    
    	"gorm.io/gorm/clause"
    )
    
    func TestValues(t *testing.T) {
    	results := []struct {
    		Clauses []clause.Interface
    		Result  string
    		Vars    []interface{}
    	}{
    		{
    			[]clause.Interface{
    				clause.Insert{},
    				clause.Values{
    					Columns: []clause.Column{{Name: "name"}, {Name: "age"}},
    					Values:  [][]interface{}{{"jinzhu", 18}, {"josh", 1}},
    				},
    			},
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Thu Jan 06 07:02:53 UTC 2022
    - 691 bytes
    - Viewed (0)
  3. docs/debugging/s3-check-md5/main.go

    	debug                          bool
    	versions                       bool
    	insecure                       bool
    )
    
    // getMD5Sum returns MD5 sum of given data.
    func getMD5Sum(data []byte) []byte {
    	hash := md5.New()
    	hash.Write(data)
    	return hash.Sum(nil)
    }
    
    func main() {
    	flag.StringVar(&endpoint, "endpoint", "https://play.min.io", "S3 endpoint URL")
    	flag.StringVar(&accessKey, "access-key", "Q3AM3UQ867SPQQA43P2F", "S3 Access Key")
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Feb 17 01:15:57 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  4. internal/kms/config.go

    // KMS implementations are present.
    func Connect(ctx context.Context, opts *ConnectionOptions) (*KMS, error) {
    	if present, err := IsPresent(); !present || err != nil {
    		if err != nil {
    			return nil, err
    		}
    		return nil, errors.New("kms: no KMS configuration specified")
    	}
    
    	lookup := func(key string) bool {
    		_, ok := os.LookupEnv(key)
    		return ok
    	}
    	switch {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Aug 15 11:46:39 UTC 2024
    - 14.2K bytes
    - Viewed (0)
  5. tests/associations_belongs_to_test.go

    package tests_test
    
    import (
    	"testing"
    
    	"gorm.io/gorm"
    	. "gorm.io/gorm/utils/tests"
    )
    
    func TestBelongsToAssociation(t *testing.T) {
    	user := *GetUser("belongs-to", Config{Company: true, Manager: true})
    
    	if err := DB.Create(&user).Error; err != nil {
    		t.Fatalf("errors happened when create: %v", err)
    	}
    
    	CheckUser(t, user, user)
    
    	// Find
    	var user2 User
    	DB.Find(&user2, "id = ?", user.ID)
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Mon Oct 30 09:15:49 UTC 2023
    - 9.3K bytes
    - Viewed (0)
  6. cmd/object-api-deleteobject_test.go

    	"encoding/hex"
    	"strings"
    	"testing"
    )
    
    // Wrapper for calling DeleteObject tests for both Erasure multiple disks and single node setup.
    func TestDeleteObject(t *testing.T) {
    	ExecObjectLayerTest(t, testDeleteObject)
    }
    
    // Unit test for DeleteObject in general.
    func testDeleteObject(obj ObjectLayer, instanceType string, t TestErrHandler) {
    	type objectUpload struct {
    		name    string
    		content string
    	}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Aug 29 01:40:52 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  7. cmd/rebalstatus_string.go

    // Code generated by "stringer -type=rebalStatus -trimprefix=rebal erasure-server-pool-rebalance.go"; DO NOT EDIT.
    
    package cmd
    
    import "strconv"
    
    func _() {
    	// An "invalid array index" compiler error signifies that the constant values have changed.
    	// Re-run the stringer command to generate them again.
    	var x [1]struct{}
    	_ = x[rebalNone-0]
    	_ = x[rebalStarted-1]
    	_ = x[rebalCompleted-2]
    	_ = x[rebalStopped-3]
    	_ = x[rebalFailed-4]
    }
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Oct 25 19:36:57 UTC 2022
    - 795 bytes
    - Viewed (0)
  8. src/bytes/bytes_js_wasm_test.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    //go:build js && wasm
    
    package bytes_test
    
    import (
    	"bytes"
    	"testing"
    )
    
    func TestIssue65571(t *testing.T) {
    	b := make([]byte, 1<<31+1)
    	b[1<<31] = 1
    	i := bytes.IndexByte(b, 1)
    	if i != 1<<31 {
    		t.Errorf("IndexByte(b, 1) = %d; want %d", i, 1<<31)
    	}
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Wed Jul 17 07:00:20 UTC 2024
    - 417 bytes
    - Viewed (0)
  9. internal/mountinfo/mountinfo_linux_test.go

    }
    
    // Helpers for tests.
    
    // Check if two `mountInfo` are equal.
    func mountPointsEqual(a, b mountInfo) bool {
    	if a.Device != b.Device || a.Path != b.Path || a.FSType != b.FSType || !slicesEqual(a.Options, b.Options) || a.Pass != b.Pass || a.Freq != b.Freq {
    		return false
    	}
    	return true
    }
    
    // Checks if two string slices are equal.
    func slicesEqual(a, b []string) bool {
    	if len(a) != len(b) {
    		return false
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Jan 18 07:03:17 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  10. cmd/generic-handlers_contrib.go

     * limitations under the License.
     */
    
    package cmd
    
    import (
    	"net/http"
    	"strings"
    )
    
    // guessIsLoginSTSReq - returns true if incoming request is Login STS user
    func guessIsLoginSTSReq(req *http.Request) bool {
    	if req == nil {
    		return false
    	}
    	return strings.HasPrefix(req.URL.Path, loginPathPrefix) ||
    		(req.Method == http.MethodPost && req.URL.Path == SlashSeparator &&
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Apr 30 15:50:39 UTC 2021
    - 995 bytes
    - Viewed (0)
Back to top