Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 232 for vars (0.14 sec)

  1. cmd/bucket-lifecycle-handlers.go

    	if objAPI == nil {
    		writeErrorResponse(ctx, w, errorCodes.ToAPIErr(ErrServerNotInitialized), r.URL)
    		return
    	}
    
    	vars := mux.Vars(r)
    	bucket := vars["bucket"]
    
    	var withUpdatedAt bool
    	if updatedAtStr := r.Form.Get("withUpdatedAt"); updatedAtStr != "" {
    		var err error
    		withUpdatedAt, err = strconv.ParseBool(updatedAtStr)
    		if err != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Nov 21 17:48:06 GMT 2023
    - 7K bytes
    - Viewed (0)
  2. chainable_api.go

    			tx.Statement.AddClause(clause.Select{
    				Distinct:   db.Statement.Distinct,
    				Expression: clause.Expr{SQL: v, Vars: args},
    			})
    		} else if strings.Count(v, "@") > 0 && len(args) > 0 {
    			tx.Statement.AddClause(clause.Select{
    				Distinct:   db.Statement.Distinct,
    				Expression: clause.NamedExpr{SQL: v, Vars: args},
    			})
    		} else {
    			tx.Statement.Selects = []string{v}
    
    			for _, arg := range args {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Wed Apr 17 03:38:55 GMT 2024
    - 14.3K bytes
    - Viewed (1)
  3. clause/set_test.go

    package clause_test
    
    import (
    	"fmt"
    	"sort"
    	"strings"
    	"testing"
    
    	"gorm.io/gorm/clause"
    )
    
    func TestSet(t *testing.T) {
    	results := []struct {
    		Clauses []clause.Interface
    		Result  string
    		Vars    []interface{}
    	}{
    		{
    			[]clause.Interface{
    				clause.Update{},
    				clause.Set([]clause.Assignment{{clause.PrimaryColumn, 1}}),
    			},
    			"UPDATE `users` SET `users`.`id`=?",
    			[]interface{}{1},
    		},
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Jan 06 07:02:53 GMT 2022
    - 1.4K bytes
    - Viewed (0)
  4. migrator/migrator.go

    		constraint, table := m.GuessConstraintInterfaceAndTable(stmt, name)
    		if constraint != nil {
    			vars := []interface{}{clause.Table{Name: table}}
    			if stmt.TableExpr != nil {
    				vars[0] = stmt.TableExpr
    			}
    			sql, values := constraint.Build()
    			return m.DB.Exec("ALTER TABLE ? ADD "+sql, append(vars, values...)...).Error
    		}
    		return nil
    	})
    }
    
    // DropConstraint drop constraint
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Apr 26 07:15:49 GMT 2024
    - 29K bytes
    - Viewed (0)
  5. schema/constraint.go

    	"gorm.io/gorm/clause"
    )
    
    // reg match english letters and midline
    var regEnLetterAndMidline = regexp.MustCompile(`^[\w-]+$`)
    
    type CheckConstraint struct {
    	Name       string
    	Constraint string // length(phone) >= 10
    	*Field
    }
    
    func (chk *CheckConstraint) GetName() string { return chk.Name }
    
    func (chk *CheckConstraint) Build() (sql string, vars []interface{}) {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Mar 18 07:33:54 GMT 2024
    - 1.9K bytes
    - Viewed (0)
  6. cmd/bucket-handlers.go

    func (api objectAPIHandlers) GetBucketLocationHandler(w http.ResponseWriter, r *http.Request) {
    	ctx := newContext(r, w, "GetBucketLocation")
    
    	defer logger.AuditLog(ctx, w, r, mustGetClaimsFromToken(r))
    
    	vars := mux.Vars(r)
    	bucket := vars["bucket"]
    
    	objectAPI := api.ObjectAPI()
    	if objectAPI == nil {
    		writeErrorResponse(ctx, w, errorCodes.ToAPIErr(ErrServerNotInitialized), r.URL)
    		return
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 25 16:27:27 GMT 2024
    - 61.6K bytes
    - Viewed (0)
  7. clause/clause_test.go

    	}
    
    	stmt.Build(buildNames...)
    
    	if strings.TrimSpace(stmt.SQL.String()) != result {
    		t.Errorf("SQL expects %v got %v", result, stmt.SQL.String())
    	}
    
    	if !reflect.DeepEqual(stmt.Vars, vars) {
    		t.Errorf("Vars expects %+v got %v", stmt.Vars, vars)
    	}
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Jun 02 02:50:38 GMT 2020
    - 1012 bytes
    - Viewed (0)
  8. cmd/bucket-listobjects-handlers.go

    	ctx := newContext(r, w, "ListObjectVersions")
    
    	defer logger.AuditLog(ctx, w, r, mustGetClaimsFromToken(r))
    
    	vars := mux.Vars(r)
    	bucket := vars["bucket"]
    
    	objectAPI := api.ObjectAPI()
    	if objectAPI == nil {
    		writeErrorResponse(ctx, w, errorCodes.ToAPIErr(ErrServerNotInitialized), r.URL)
    		return
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 11.4K bytes
    - Viewed (0)
  9. clause/insert_test.go

    package clause_test
    
    import (
    	"fmt"
    	"testing"
    
    	"gorm.io/gorm/clause"
    )
    
    func TestInsert(t *testing.T) {
    	results := []struct {
    		Clauses []clause.Interface
    		Result  string
    		Vars    []interface{}
    	}{
    		{
    			[]clause.Interface{clause.Insert{}},
    			"INSERT INTO `users`", nil,
    		},
    		{
    			[]clause.Interface{clause.Insert{Modifier: "LOW_PRIORITY"}},
    			"INSERT LOW_PRIORITY INTO `users`", 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)
  10. clause/update_test.go

    package clause_test
    
    import (
    	"fmt"
    	"testing"
    
    	"gorm.io/gorm/clause"
    )
    
    func TestUpdate(t *testing.T) {
    	results := []struct {
    		Clauses []clause.Interface
    		Result  string
    		Vars    []interface{}
    	}{
    		{
    			[]clause.Interface{clause.Update{}},
    			"UPDATE `users`", nil,
    		},
    		{
    			[]clause.Interface{clause.Update{Modifier: "LOW_PRIORITY"}},
    			"UPDATE LOW_PRIORITY `users`", nil,
    		},
    		{
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Jun 02 01:18:01 GMT 2020
    - 722 bytes
    - Viewed (0)
Back to top