Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 88 for insert (0.17 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 Apr 21 09:35:09 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 Apr 21 09:35:09 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 Apr 21 09:35:09 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 Apr 21 09:35:09 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 Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Dec 23 15:46:00 GMT 2022
    - 8.2K bytes
    - Viewed (0)
  6. internal/event/target/postgresql.go

    	psqlCreateAccessTable    = `CREATE TABLE %s (event_time TIMESTAMP WITH TIME ZONE NOT NULL, event_data JSONB);`
    
    	psqlUpdateRow = `INSERT INTO %s (key, value) VALUES ($1, $2) ON CONFLICT (key) DO UPDATE SET value = EXCLUDED.value;`
    	psqlDeleteRow = `DELETE FROM %s WHERE key = $1;`
    	psqlInsertRow = `INSERT INTO %s (event_time, event_data) VALUES ($1, $2);`
    )
    
    // Postgres constants
    const (
    	PostgresFormat             = "format"
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sat Oct 07 15:07:38 GMT 2023
    - 12.2K bytes
    - Viewed (0)
  7. cni/pkg/iptables/iptables.go

    		"-p", iptablesconstants.TCP,
    		"-i", "lo",
    		"-j", "ACCEPT")
    
    	// CLI: -A ISTIO_PRERT -p tcp -m tcp --dport <INPORT> -m mark ! --mark 0x539/0xfff -j TPROXY --on-port <INPORT> --on-ip 127.0.0.1 --tproxy-mark 0x111/0xfff
    	//
    	// DESC: Anything heading to <INPORT> that does not have the mark, TPROXY to ztunnel inbound port <INPORT>
    	iptablesBuilder.AppendRule(
    		iptableslog.UndefinedCommand, ChainInpodPrerouting, iptablesconstants.MANGLE,
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri Apr 12 01:42:30 GMT 2024
    - 19.2K bytes
    - Viewed (0)
  8. tests/table_test.go

    	}
    
    	r = dryDB.Create(&UserWithTable{}).Statement
    	if DB.Dialector.Name() != "sqlite" {
    		if !regexp.MustCompile(`INSERT INTO .gorm.\..user. (.*name.*) VALUES (.*)`).MatchString(r.Statement.SQL.String()) {
    			t.Errorf("Table with escape character, got %v", r.Statement.SQL.String())
    		}
    	} else {
    		if !regexp.MustCompile(`INSERT INTO .user. (.*name.*) VALUES (.*)`).MatchString(r.Statement.SQL.String()) {
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Sat Mar 09 09:31:28 GMT 2024
    - 10.6K bytes
    - Viewed (0)
  9. tests/create_test.go

    		},
    		{
    			"name":    "dog",
    			"user_id": gorm.Expr("@uid"),
    		},
    	})
    
    	if !regexp.MustCompile(`INSERT INTO .pets. \(.name.,.user_id.\) .*VALUES \(.+,\(SELECT @uid:=id FROM \(SELECT id FROM .users. WHERE name=.+\) as tmp\)\),\(.+,@uid\)`).MatchString(result.Statement.SQL.String()) {
    		t.Errorf("invalid insert SQL, got %v", result.Statement.SQL.String())
    	}
    }
    
    func TestCreateNilPointer(t *testing.T) {
    	var user *User
    
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Tue Mar 19 03:50:28 GMT 2024
    - 26.4K bytes
    - Viewed (0)
  10. 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 Apr 24 22:53:08 GMT 2024
    - Last Modified: Mon Dec 11 19:10:54 GMT 2023
    - 1.5K bytes
    - Viewed (0)
Back to top