Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for amatch (0.36 sec)

  1. callbacks.go

    	return &callback{before: name, processor: p}
    }
    
    func (p *processor) After(name string) *callback {
    	return &callback{after: name, processor: p}
    }
    
    func (p *processor) Match(fc func(*DB) bool) *callback {
    	return &callback{match: fc, processor: p}
    }
    
    func (p *processor) Register(name string, fn func(*DB)) error {
    	return (&callback{processor: p}).Register(name, fn)
    }
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Mar 26 03:33:36 GMT 2024
    - 8.6K bytes
    - Viewed (1)
  2. schema/constraint.go

    package schema
    
    import (
    	"regexp"
    	"strings"
    
    	"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)
  3. tests/callbacks_test.go

    			}
    
    			if c.before != "" {
    				callMethod(v, "Before", c.before)
    			}
    
    			if c.after != "" {
    				callMethod(v, "After", c.after)
    			}
    
    			if c.match != nil {
    				callMethod(v, "Match", c.match)
    			}
    
    			if c.remove {
    				callMethod(v, "Remove", c.name)
    			} else if c.replace {
    				callMethod(v, "Replace", c.name, c.h)
    			} else {
    				callMethod(v, "Register", c.name, c.h)
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Mar 26 03:33:36 GMT 2024
    - 7.2K bytes
    - Viewed (0)
  4. schema/schema_helper_test.go

    			if len(relations.Relations) != len(rs.Relations) {
    				t.Errorf("schema relations count don't match, expects %d, got %d", len(rs.Relations), len(relations.Relations))
    			}
    			if len(relations.EmbeddedRelations) != len(rs.EmbeddedRelations) {
    				t.Errorf("schema embedded relations count don't match, expects %d, got %d", len(rs.EmbeddedRelations), len(relations.EmbeddedRelations))
    			}
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Dec 15 08:31:23 GMT 2023
    - 7.5K bytes
    - Viewed (0)
  5. errors.go

    	// ErrInvalidValue invalid value
    	ErrInvalidValue = errors.New("invalid value, should be pointer to struct or slice")
    	// ErrInvalidValueOfLength invalid values do not match length
    	ErrInvalidValueOfLength = errors.New("invalid association values, length doesn't match")
    	// ErrPreloadNotAllowed preload is not allowed when count is used
    	ErrPreloadNotAllowed = errors.New("preload is not allowed when count is used")
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Apr 26 02:53:17 GMT 2024
    - 2.5K bytes
    - Viewed (0)
  6. callbacks/callbacks.go

    	deleteCallback.Match(enableTransaction).Register("gorm:begin_transaction", BeginTransaction)
    	deleteCallback.Register("gorm:before_delete", BeforeDelete)
    	deleteCallback.Register("gorm:delete_before_associations", DeleteBeforeAssociations)
    	deleteCallback.Register("gorm:delete", Delete(config))
    	deleteCallback.Register("gorm:after_delete", AfterDelete)
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Wed Oct 27 23:56:55 GMT 2021
    - 3.3K bytes
    - Viewed (0)
  7. statement_test.go

    		`"User__Company".*`:  {"User__Company", "*"},
    		`"table"."*"`:        {"", ""},
    	} {
    		if table, column := matchName(k); table != v[0] || column != v[1] {
    			t.Errorf("failed to match value: %v, got %v, expect: %v", k, []string{table, column}, v)
    		}
    	}
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Sat Dec 23 13:19:41 GMT 2023
    - 1.9K bytes
    - Viewed (0)
  8. README.md

    * Hooks (Before/After Create/Save/Update/Delete/Find)
    * Eager loading with `Preload`, `Joins`
    * Transactions, Nested Transactions, Save Point, RollbackTo to Saved Point
    * Context, Prepared Statement Mode, DryRun Mode
    * Batch Insert, FindInBatches, Find To Map
    * SQL Builder, Upsert, Locking, Optimizer/Index/Comment Hints, NamedArg, Search/Update/Create with SQL Expr
    * Composite Primary Key
    * Auto Migrations
    * Logger
    Plain Text
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Nov 07 02:20:06 GMT 2023
    - 1.8K bytes
    - Viewed (0)
Back to top