Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 46 for insert (0.33 sec)

  1. clause/insert.go

    package clause
    
    type Insert struct {
    	Table    Table
    	Modifier string
    }
    
    // Name insert clause name
    func (insert Insert) Name() string {
    	return "INSERT"
    }
    
    // Build build insert clause
    func (insert Insert) Build(builder Builder) {
    	if insert.Modifier != "" {
    		builder.WriteString(insert.Modifier)
    		builder.WriteByte(' ')
    	}
    
    	builder.WriteString("INTO ")
    	if insert.Table.Name == "" {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Mar 09 09:07:00 GMT 2020
    - 767 bytes
    - Viewed (0)
  2. clause/insert_test.go

    		Vars    []interface{}
    	}{
    		{
    			[]clause.Interface{clause.Insert{}},
    			"INSERT INTO `users`", nil,
    		},
    		{
    			[]clause.Interface{clause.Insert{Modifier: "LOW_PRIORITY"}},
    			"INSERT LOW_PRIORITY INTO `users`", nil,
    		},
    		{
    			[]clause.Interface{clause.Insert{Table: clause.Table{Name: "products"}, Modifier: "LOW_PRIORITY"}},
    			"INSERT LOW_PRIORITY INTO `products`", nil,
    		},
    	}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Jun 02 01:18:01 GMT 2020
    - 737 bytes
    - Viewed (0)
  3. clause/values_test.go

    		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}},
    				},
    			},
    			"INSERT INTO `users` (`name`,`age`) VALUES (?,?),(?,?)",
    			[]interface{}{"jinzhu", 18, "josh", 1},
    		},
    	}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Jan 06 07:02:53 GMT 2022
    - 691 bytes
    - Viewed (0)
  4. tests/connpool_test.go

    	conn := &wrapperConnPool{
    		db: nativeDB,
    		expect: []string{
    			"SELECT VERSION()",
    			"INSERT INTO `users` (`created_at`,`updated_at`,`deleted_at`,`name`,`age`,`birthday`,`company_id`,`manager_id`,`active`) VALUES (?,?,?,?,?,?,?,?,?)",
    			"SELECT * FROM `users` WHERE name = ? AND `users`.`deleted_at` IS NULL ORDER BY `users`.`id` LIMIT ?",
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Feb 06 02:54:40 GMT 2024
    - 5.5K bytes
    - Viewed (0)
  5. cmd/benchmark-utils_test.go

    	b.ReportAllocs()
    	// the actual benchmark for PutObject starts here. Reset the benchmark timer.
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		// insert the object.
    		objInfo, err := obj.PutObject(context.Background(), bucket, "object"+strconv.Itoa(i),
    			mustGetPutObjReader(b, bytes.NewReader(textData), int64(len(textData)), md5hex, sha256hex), ObjectOptions{})
    		if err != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Dec 23 15:46:00 GMT 2022
    - 8.2K bytes
    - Viewed (0)
  6. src/cmd/cgo/godefs.go

    }
    
    // gofmtLineReplacer is used to put a gofmt-formatted string for an
    // AST expression onto a single line. The lexer normally inserts a
    // semicolon at each newline, so we can replace newline with semicolon.
    // However, we can't do that in cases where the lexer would not insert
    // a semicolon. We only have to worry about cases that can occur in an
    // expression passed through gofmt, which means composite literals and
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Sep 08 14:33:35 GMT 2022
    - 4.5K bytes
    - Viewed (0)
  7. cni/pkg/install/binaries.go

    				installLog.Errorf("Failed file copy of %s to %s: %s", srcFilepath, targetDir, err.Error())
    				return copiedFilenames, err
    			}
    			installLog.Infof("Copied %s to %s.", filename, targetDir)
    		}
    
    		copiedFilenames.Insert(filename)
    	}
    
    	return copiedFilenames, nil
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Mon Dec 11 19:10:54 GMT 2023
    - 1.5K bytes
    - Viewed (0)
  8. istioctl/pkg/writer/envoy/configdump/route.go

    		stripFull := strings.TrimSuffix(h, ".svc.cluster.local")
    		if unique.Contains(stripFull) && stripFull != h {
    			shouldDelete.Insert(h)
    		}
    		stripPartial := strings.TrimSuffix(h, ".svc")
    		if unique.Contains(stripPartial) && stripPartial != h {
    			shouldDelete.Insert(h)
    		}
    	}
    	// Filter from original list to keep original order
    	ret := make([]string, 0, len(domains))
    	for _, h := range domains {
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Thu May 11 05:38:17 GMT 2023
    - 7.2K bytes
    - Viewed (0)
  9. utils/tests/dummy_dialecter.go

    }
    
    func (DummyDialector) Name() string {
    	return "dummy"
    }
    
    func (DummyDialector) Initialize(db *gorm.DB) error {
    	callbacks.RegisterDefaultCallbacks(db, &callbacks.Config{
    		CreateClauses:        []string{"INSERT", "VALUES", "ON CONFLICT", "RETURNING"},
    		UpdateClauses:        []string{"UPDATE", "SET", "WHERE", "RETURNING"},
    		DeleteClauses:        []string{"DELETE", "FROM", "WHERE", "RETURNING"},
    		LastInsertIDReversed: true,
    	})
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Mar 06 06:03:31 GMT 2023
    - 2.2K bytes
    - Viewed (0)
  10. prepare_stmt.go

    	// 1. g1 begin tx, g1 is requeue because of waiting for the system call, now `db.ConnPool` db.numOpen == 1.
    	// 2. g2 select lock `conn.PrepareContext(ctx, query)`, now db.numOpen == db.maxOpen , wait for release.
    	// 3. g1 tx exec insert, wait for unlock `conn.PrepareContext(ctx, query)` to finish tx and release.
    	stmt, err := conn.PrepareContext(ctx, query)
    	if err != nil {
    		cacheStmt.prepareErr = err
    		db.Mux.Lock()
    		delete(db.Stmts, query)
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Mar 28 08:47:39 GMT 2024
    - 6.4K bytes
    - Viewed (0)
Back to top