- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for TrimSpace (0.24 sec)
-
schema/utils.go
k := strings.TrimSpace(strings.ToUpper(values[0])) if len(values) >= 2 { settings[k] = strings.Join(values[1:], ":") } else if k != "" { settings[k] = k } } return settings } func toColumns(val string) (results []string) { if val != "" { for _, v := range strings.Split(val, ",") { results = append(results, strings.TrimSpace(v)) } } return }
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Sat Aug 19 13:35:14 GMT 2023 - 5.5K bytes - Viewed (0) -
schema/index.go
} func parseFieldIndexes(field *Field) (indexes []Index, err error) { for _, value := range strings.Split(field.Tag.Get("gorm"), ";") { if value != "" { v := strings.Split(value, ":") k := strings.TrimSpace(strings.ToUpper(v[0])) if k == "INDEX" || k == "UNIQUEINDEX" { var ( name string tag = strings.Join(v[1:], ":") idx = strings.Index(tag, ",")
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Sun Feb 04 07:49:19 GMT 2024 - 3.7K bytes - Viewed (0) -
migrator/migrator.go
func (m Migrator) MigrateColumn(value interface{}, field *schema.Field, columnType gorm.ColumnType) error { if field.IgnoreMigration { return nil } // found, smart migrate fullDataType := strings.TrimSpace(strings.ToLower(m.DB.Migrator().FullDataTypeOf(field).SQL)) realDataType := strings.ToLower(columnType.DatabaseTypeName()) var ( alterColumn bool isSameType = fullDataType == realDataType )
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Fri Apr 26 07:15:49 GMT 2024 - 29K bytes - Viewed (0) -
finisher_api.go
defer delete(tx.Statement.Clauses, "SELECT") } if len(tx.Statement.Selects) == 0 { tx.Statement.AddClause(clause.Select{Expression: clause.Expr{SQL: "count(*)"}}) } else if !strings.HasPrefix(strings.TrimSpace(strings.ToLower(tx.Statement.Selects[0])), "count(") { expr := clause.Expr{SQL: "count(*)"} if len(tx.Statement.Selects) == 1 { dbName := tx.Statement.Selects[0]
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Fri Jan 12 08:42:21 GMT 2024 - 22.7K bytes - Viewed (0) -
statement.go
} if len(args) > 0 && strings.Contains(s, "@") { // looks like a named query return []clause.Expression{clause.NamedExpr{SQL: s, Vars: args}} } if strings.Contains(strings.TrimSpace(s), " ") { // looks like a where condition return []clause.Expression{clause.Expr{SQL: s, Vars: args}} } if len(args) == 1 { return []clause.Expression{clause.Eq{Column: s, Value: args[0]}}
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Fri Jan 12 08:42:21 GMT 2024 - 19.8K bytes - Viewed (0) -
clause/clause_test.go
if _, ok := buildNamesMap[c.Name()]; !ok { buildNames = append(buildNames, c.Name()) buildNamesMap[c.Name()] = true } stmt.AddClause(c) } 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 Apr 28 09:35:09 GMT 2024 - Last Modified: Tue Jun 02 02:50:38 GMT 2020 - 1012 bytes - Viewed (0) -
schema/relationship.go
typeName = polymorphic + "Type" typeId = polymorphic + "ID" ) if value, ok := field.TagSettings["POLYMORPHICTYPE"]; ok { typeName = strings.TrimSpace(value) } if value, ok := field.TagSettings["POLYMORPHICID"]; ok { typeId = strings.TrimSpace(value) } relation.Polymorphic.PolymorphicType = relation.FieldSchema.FieldsByName[typeName]
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Mon Apr 15 03:20:20 GMT 2024 - 22.4K bytes - Viewed (0) -
tests/sql_builder_test.go
returningRe := regexp.MustCompile(`(?i)RETURNING "id"`) actually = returningRe.ReplaceAllString(actually, ``) expected = returningRe.ReplaceAllString(expected, ``) actually = strings.TrimSpace(actually) expected = strings.TrimSpace(expected) if actually != expected { t.Fatalf("\nexpected: %s\nactually: %s", expected, actually) } } func replaceQuoteInSQL(sql string) string {
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Fri Jan 12 08:42:21 GMT 2024 - 16.7K bytes - Viewed (0) -
schema/field.go
} if s, ok := field.TagSettings["SCALE"]; ok { field.Scale, _ = strconv.Atoi(s) } // default value is function or null or blank (primary keys) field.DefaultValue = strings.TrimSpace(field.DefaultValue) skipParseDefaultValue := strings.Contains(field.DefaultValue, "(") && strings.Contains(field.DefaultValue, ")") || strings.ToLower(field.DefaultValue) == "null" || field.DefaultValue == ""
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Mon Apr 15 03:20:20 GMT 2024 - 32K bytes - Viewed (1)