Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for QuoteTo (0.16 sec)

  1. statement.go

    // WriteQuoted write quoted value
    func (stmt *Statement) WriteQuoted(value interface{}) {
    	stmt.QuoteTo(&stmt.SQL, value)
    }
    
    // QuoteTo write quoted value to writer
    func (stmt *Statement) QuoteTo(writer clause.Writer, field interface{}) {
    	write := func(raw bool, str string) {
    		if raw {
    			writer.WriteString(str)
    		} else {
    			stmt.DB.Dialector.QuoteTo(writer, str)
    		}
    	}
    
    	switch v := field.(type) {
    	case clause.Table:
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Fri Jan 12 08:42:21 GMT 2024
    - 19.8K bytes
    - Viewed (0)
  2. utils/tests/dummy_dialecter.go

    func (DummyDialector) Migrator(*gorm.DB) gorm.Migrator {
    	return nil
    }
    
    func (DummyDialector) BindVarTo(writer clause.Writer, stmt *gorm.Statement, v interface{}) {
    	writer.WriteByte('?')
    }
    
    func (DummyDialector) QuoteTo(writer clause.Writer, str string) {
    	var (
    		underQuoted, selfQuoted bool
    		continuousBacktick      int8
    		shiftDelimiter          int8
    	)
    
    	for _, v := range []byte(str) {
    		switch v {
    		case '`':
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Mon Mar 06 06:03:31 GMT 2023
    - 2.2K bytes
    - Viewed (0)
  3. interfaces.go

    	Name() string
    	Initialize(*DB) error
    	Migrator(db *DB) Migrator
    	DataTypeOf(*schema.Field) string
    	DefaultValueOf(*schema.Field) clause.Expression
    	BindVarTo(writer clause.Writer, stmt *Statement, v interface{})
    	QuoteTo(clause.Writer, string)
    	Explain(sql string, vars ...interface{}) string
    }
    
    // Plugin GORM plugin interface
    type Plugin interface {
    	Name() string
    	Initialize(*DB) error
    }
    
    type ParamsFilter interface {
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Sat Aug 19 13:33:31 GMT 2023
    - 2.2K bytes
    - Viewed (0)
  4. migrator/migrator.go

    		return gorm.ErrSubQueryRequired
    	}
    
    	sql := new(strings.Builder)
    	sql.WriteString("CREATE ")
    	if option.Replace {
    		sql.WriteString("OR REPLACE ")
    	}
    	sql.WriteString("VIEW ")
    	m.QuoteTo(sql, name)
    	sql.WriteString(" AS ")
    
    	m.DB.Statement.AddVar(sql, option.Query)
    
    	if option.CheckOption != "" {
    		sql.WriteString(" ")
    		sql.WriteString(option.CheckOption)
    	}
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Mon Mar 18 11:24:16 GMT 2024
    - 28.5K bytes
    - Viewed (0)
Back to top